:root {
  --bg: #0a0908;
  --card: #171514;
  --card2: #100f0e;
  --line: #2a2624;
  --red: #e11d2e;
  --red2: #ff4757;
  --red-deep: #3a0d12; /* Colour variables used everywhere (backgrounds, cards, red, amber, green, blue) */
  --amber: #ffb020;
  --amber-deep: #2e1e02;
  --green: #2ecc71;
  --green-deep: #0d2417;
  --blue: #3b82f6;
  --blue-deep: #0e1e3a;
  --white: #f6f4f2;
  --muted: #9a938d; /* More colour variables and the text colours */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
} /* Keep content away from the phone notch and bottom bar */
* {
  box-sizing: border-box;
} /* Padding and borders count inside the width of every element */
html,
body {
  height: 100%;
} /* Page and body fill the whole screen height */
body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(
      900px 480px at 50% -8%,
      rgba(225, 29, 46, 0.18) 0%,
      transparent 62%
    ),
    radial-gradient(
      560px 300px at 92% 100%,
      rgba(255, 176, 32, 0.05) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, #000, #0b0a0a 55%, #000);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
} /* Page body: font, background glow and text colour */
h1,
h2,
h3 {
  font-family: "Poppins", sans-serif;
  margin: 0.2em 0;
  letter-spacing: -0.01em;
} /* Headings use the Poppins font */
.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 100px;
  min-height: 100%;
} /* Main centered column (maximum 520 px wide) */
.hero {
  padding: 32px 4px 12px;
  text-align: center;
  animation: drop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1);
} /* Hero (the welcome block at the top) with a drop-in animation */
@keyframes drop {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
} /* Animation: slide down and fade in */
.logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: linear-gradient(150deg, var(--red2), var(--red) 55%, #6b0000);
  box-shadow:
    0 10px 26px -8px rgba(225, 29, 46, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
} /* Round logo box */
.hero h1 {
  font-size: 1.4rem;
  font-weight: 800;
} /* Hero title size */
.hero p {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 3px;
} /* Hero paragraph (grey and small) */
.card {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 10px 24px -12px rgba(0, 0, 0, 0.6);
  animation: fade 0.35s ease;
} /* Card: dark box with a border and rounded corners */
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
} /* Animation: fade in while moving up */
label {
  font-size: 0.76rem;
  color: var(--muted);
  display: block;
  margin: 10px 2px 3px;
  font-weight: 500;
} /* Form labels */
input,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e0c0c;
  color: var(--white);
  margin-top: 4px;
  font-size: 15px;
  font-family: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
} /* Text boxes and text areas */
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--red2);
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.15);
} /* Red glow when a text box is selected */
button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 15px;
  font-family: "Inter", sans-serif;
  transition:
    transform 0.12s,
    filter 0.15s;
} /* Buttons: shape, font and pointer cursor */
button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
} /* Outline around a button when using the keyboard */
button:active {
  transform: scale(0.97);
} /* Buttons shrink slightly when pressed */
.btn-red {
  background: linear-gradient(135deg, var(--red2), var(--red));
  color: #fff;
  width: 100%;
  box-shadow: 0 8px 20px -6px rgba(225, 29, 46, 0.5);
} /* Main red button */
.btn-red:hover {
  filter: brightness(1.08);
} /* Red button gets brighter on hover */
.btn-icon {
  background: #1c1a19;
  color: #fff;
  width: auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
} /* Small icon button */
.btn-outline {
  background: transparent;
  color: var(--red2);
  width: 100%;
  border: 1.5px solid var(--red2);
  margin-top: 6px;
} /* Outlined (empty) red button */
.btn-outline:hover {
  background: rgba(225, 29, 46, 0.08);
} /* Outlined button hover colour */
.btn-outline:active {
  transform: scale(0.98);
} /* Outlined button pressed size */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-deep);
  border: 1px solid #4a1015;
  color: #ff9298;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
} /* Small tag label */
.nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(8, 7, 6, 0.86);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
} /* Bottom navigation bar fixed to the bottom of the screen */
.nav button {
  background: none;
  flex: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px;
  border-radius: 12px;
  transition:
    color 0.15s,
    background 0.15s;
} /* Buttons inside the bottom bar */
.nav button.active {
  color: #fff;
  background: rgba(225, 29, 46, 0.14);
} /* Highlight of the active tab button */
.nav span:first-child {
  font-size: 19px;
  transition: transform 0.18s ease;
} /* Icon size inside the nav buttons */
.nav button:hover span:first-child {
  transform: translateY(-2px) scale(1.08);
} /* Icon moves up a little on hover */
.nav button:active {
  transform: scale(0.92);
} /* Nav button pressed size */
.nav button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
  background: rgba(255, 176, 32, 0.08);
} /* Nav button keyboard outline */
.nav button.active span:first-child {
  transform: scale(1.12);
} /* Active tab icon is bigger */
.hidden {
  display: none !important;
} /* Hide anything with the class "hidden" */
.msgrow {
  display: flex;
  gap: 7px;
  margin: 6px 0;
  align-items: flex-end;
} /* Old chat row layout */
.msgrow.me {
  flex-direction: row-reverse;
} /* Old chat row for my own messages */
.msgav {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #2a2624;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
} /* Old chat small avatar */
.msg {
  padding: 9px 13px;
  border-radius: 15px;
  max-width: 78%;
  font-size: 14px;
  line-height: 1.4;
} /* Old chat message bubble */
.msg.me {
  background: linear-gradient(135deg, var(--red2), var(--red));
  border-bottom-right-radius: 4px;
} /* Old chat bubble of my own messages (red) */
.msg.admin,
.msg.user {
  background: #211f1e;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
} /* Old chat bubble of other people (dark) */
.chatbox {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 2px 2px 8px;
} /* Chat box scroll area (first version) */
.imgprev {
  max-width: 100%;
  border-radius: 12px;
  margin: 10px 0;
  border: 1px solid var(--line);
} /* Picture preview inside forms */
.msgimg {
  width: 140px;
  max-width: 65%;
  height: auto;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  margin: 2px 0;
} /* Small picture inside a chat message */
#imgModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
} /* Full-screen picture viewer background */
#imgModal img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
} /* Picture inside the viewer */
#imgModal img.avbig {
  width: min(92vw, 520px);
  height: auto;
  max-height: 80vh;
  object-fit: contain;
} /* Large avatar picture inside the viewer */
.small {
  color: var(--muted);
  font-size: 12.5px;
} /* Small grey text */
.opt.correct {
  border-color: var(--green) !important;
  background: var(--green-deep);
} /* Correct answer (green) */
.opt.wrong {
  border-color: var(--red) !important;
  background: #2a0f10;
} /* Wrong answer (red) */
.linklike {
  color: #ff6b74;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
} /* Clickable text link style */
.linklike:hover {
  color: #ff8a90;
  text-decoration: underline;
} /* Link colour on hover */
.linklike:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
} /* Link keyboard outline */
.floaty {
  animation: float 3.2s ease-in-out infinite;
} /* Floating animation class */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-6px) rotate(-3deg);
  }
} /* Animation: move up and down while tilting */
.loader {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
} /* Loading message block */
.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin 0.8s linear infinite;
} /* Loading spinner circle */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
} /* Animation: rotate the spinner */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 10px 0;
} /* Thin divider line with fading ends */
.row {
  display: flex;
  align-items: center;
  gap: 10px;
} /* Horizontal row of items */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
} /* Two-column grid */
.fcard {
  position: relative;
  height: 132px;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--line);
  outline-offset: 2px;
} /* Feature card on the Home screen */
.fcard-visual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  transition:
    transform 0.4s ease,
    filter 0.4s ease;
} /* Big emoji area of the feature card */
.fcard-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px 13px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent 90%);
  transform: translateY(58%);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
} /* Text area at the bottom of the feature card */
.fcard-content h3 {
  margin: 0 0 2px;
  font-size: 0.92rem;
  font-weight: 700;
} /* Feature card title */
.fcard-content p {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
} /* Feature card description */
.fcard:hover .fcard-visual,
.fcard:focus-within .fcard-visual,
.fcard.tap .fcard-visual {
  transform: scale(1.1);
  filter: blur(1px) brightness(0.55);
} /* Zoom the emoji and darken it on hover or tap */
.fcard:hover .fcard-content,
.fcard:focus-within .fcard-content,
.fcard.tap .fcard-content {
  transform: translateY(0);
} /* Slide the text up on hover or tap */
.fcard:focus-visible {
  outline: 2px solid var(--amber);
} /* Feature card keyboard outline */
@keyframes authIn {
  from {
    opacity: 0;
    transform: translateX(var(--slide-x, 60px)) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
} /* Animation: login card slides in */
.auth-card {
  animation: authIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) !important;
} /* Login card animation */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
} /* Remove animations for users who prefer less motion */
.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
} /* Section title */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #221f1e;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
} /* Round avatar picture */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
} /* Row of filter chips (scrolls sideways) */
.chip {
  white-space: nowrap;
  background: #171514;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 20px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
} /* One filter chip */
.chip.on {
  background: linear-gradient(135deg, var(--red2), var(--red));
  color: #fff;
  border-color: transparent;
} /* Selected filter chip (red) */
.opt {
  display: block;
  background: #100f0e;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 15px;
  margin: 8px 0;
  font-size: 14.5px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
} /* Quiz answer option box */
.opt.sel {
  border-color: var(--blue) !important;
  background: var(--blue-deep);
} /* Selected option (blue) */
.opt.lt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
} /* Option laid out as a row with a letter circle */
.opt .ol {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #26211f;
  color: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
} /* Letter circle of an option (A, B, C, D) */
.opt .ot {
  flex: 1;
  min-width: 0;
} /* Text part of an option */
.opt.sel .ol {
  background: var(--blue);
  color: #fff;
} /* Selected option letter circle */
.opt.correct .ol {
  background: var(--green);
  color: #fff;
} /* Correct option letter circle */
.opt.wrong .ol {
  background: var(--red);
  color: #fff;
} /* Wrong option letter circle */
.qimg {
  display: flex;
  justify-content: center;
  margin: 10px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #100f0e;
} /* Box around a question picture */
.qimg img {
  display: block;
  max-width: 100%;
  max-height: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
} /* Question picture size and zoom cursor */
.bar {
  height: 6px;
  background: #221f1e;
  border-radius: 6px;
  overflow: hidden;
  margin: 6px 0 2px;
} /* Progress bar track */
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red2), var(--red));
  transition: width 0.3s;
} /* Progress bar fill (red) */
.timer {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  background: var(--amber-deep);
  border: 1px solid #5a3a00;
  color: var(--amber);
  border-radius: 10px;
  padding: 4px 12px;
} /* Exam countdown timer pill */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
} /* Disabled buttons look faded */
.nav button {
  font-size: 10px;
} /* Nav button text size */
.star {
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
} /* Bookmark star */
.explain {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.5;
} /* Explanation box under an answer */
.explain.good {
  background: #0d2417;
  border: 1px solid #1e4a30;
} /* Explanation for a correct answer (green) */
.explain.bad {
  background: #2a0f10;
  border: 1px solid #4a1015;
} /* Explanation for a wrong answer (red) */
.badge-block {
  background: #3a0b0b;
  color: #ff8a90;
  border: 1px solid #5a1515;
  border-radius: 8px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
} /* "Blocked" badge */
.macts {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.65;
  cursor: pointer;
} /* Small action links under a message */
.kpi {
  text-align: center;
} /* Statistics number card centered */
.kpi b {
  display: block;
  font-size: 1.4rem;
  font-family: "Poppins", sans-serif;
} /* Big number in a statistics card */
.barrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
} /* Row of a bar chart */
.barbg {
  flex: 1;
  height: 10px;
  background: #222;
  border-radius: 6px;
  overflow: hidden;
} /* Bar chart track */
.barbg i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red2), var(--red));
} /* Bar chart fill (red) */
#offline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #4a1015;
  color: #ffb3b8;
  text-align: center;
  font-size: 12.5px;
  padding: 6px calc(6px + env(safe-area-inset-top, 0px)) 6px 6px;
  z-index: 20;
} /* "You are offline" banner at the top */

/* WhatsApp-style chat */
.chatbox {
  max-height: 62vh;
  min-height: 260px;
  background: #0b141a;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px
  );
  background-size: 18px 18px;
  border-radius: 14px;
  padding: 10px 8px;
} /* WhatsApp-style chat box (dark green-blue background) */
.wm {
  position: relative;
  max-width: 82%;
  padding: 6px 8px 4px;
  border-radius: 9px;
  font-size: 14.2px;
  line-height: 1.35;
  margin: 2px 0;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  color: #e9edef;
} /* Message bubble */
.wm.out {
  background: #005c4b;
  align-self: flex-end;
  border-top-right-radius: 2px;
} /* Bubble of my own messages (green, right) */
.wm.in {
  background: #202c33;
  align-self: flex-start;
  border-top-left-radius: 2px;
} /* Bubble of other people (dark, left) */
.wm .wt {
  float: right;
  margin: 7px 0 0 10px;
  font-size: 10.5px;
  color: rgba(233, 237, 239, 0.6);
  white-space: nowrap;
} /* Time shown inside a bubble */
.tk {
  margin-left: 3px;
  font-size: 11px;
} /* Message tick marks */
.tk.rd {
  color: #53bdeb;
} /* Blue ticks (read) */
.wl {
  display: block;
  font-size: 12.5px;
  color: #53bdeb;
  margin-bottom: 2px;
} /* Sender name label inside a bubble */
.wq {
  background: rgba(0, 0, 0, 0.25);
  border-left: 4px solid #06cf9c;
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 4px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
} /* Quoted reply box inside a bubble */
.wq b {
  color: #06cf9c;
} /* Name in the quote */
.wq span {
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
} /* Text in the quote (one line) */
.wd {
  align-self: center;
  margin: 8px 0;
} /* Date heading in the chat (centered) */
.wd span {
  background: #182229;
  color: #8696a0;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
} /* Date heading pill */
.wr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #1f2c34;
  border-left: 4px solid #06cf9c;
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 8px;
  font-size: 12.5px;
} /* Reply bar above the message box */
.wr div {
  display: flex;
  flex-direction: column;
  min-width: 0;
} /* Reply bar text column */
.wr b {
  color: #06cf9c;
} /* Reply bar sender name */
.wr span {
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} /* Reply bar text */
.wr > span {
  cursor: pointer;
  font-size: 16px;
} /* Reply bar cancel button */
.wm .msgimg {
  width: 220px;
  max-width: 100%;
  border-radius: 7px;
  margin: 0 0 3px;
} /* Picture inside a bubble */
.wm .macts {
  clear: both;
  display: flex;
  gap: 16px;
  padding-top: 6px;
} /* Action links inside a bubble */
.nav button {
  position: relative;
} /* Nav button position (for the badge) */
.nb {
  position: absolute;
  top: 2px;
  left: calc(50% + 6px);
  background: #25d366;
  color: #08130c;
  border-radius: 20px;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
} /* Unread number badge on a tab */
.btn-icon.rec {
  background: #e11d2e !important;
  animation: recp 1s infinite;
} /* Red button while recording */
@keyframes recp {
  50% {
    opacity: 0.55;
  }
} /* Animation: blink while recording */
.wm audio {
  display: block;
  width: 210px;
  max-width: 100%;
  height: 38px;
  margin: 2px 0;
} /* Voice note player inside a bubble */
.dr {
  background: #1f2c34;
  border-radius: 12px;
  padding: 10px;
  margin-top: 8px;
  border-left: 4px solid #06cf9c;
} /* Draft box (preview before sending) */
.dr audio {
  width: 100%;
  height: 40px;
  display: block;
} /* Audio player inside the draft */
.dr img {
  max-height: 220px;
  max-width: 100%;
  border-radius: 10px;
  display: block;
} /* Picture preview inside the draft */
.dr .row {
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
} /* Buttons inside the draft */
.dr .small {
  margin-top: 6px;
} /* Small text inside the draft */
/* responsive chat */
.wrap.chatwide {
  max-width: 920px;
} /* Wider page when the chat is open */
.chatbox {
  height: calc(100vh - 330px);
  height: calc(100dvh - 330px);
  min-height: 300px;
  max-height: none;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: #2a3942 transparent;
} /* Chat box height fills the screen */
.chatbox::-webkit-scrollbar {
  width: 6px;
} /* Thin scrollbar for the chat */
.chatbox::-webkit-scrollbar-thumb {
  background: #2a3942;
  border-radius: 6px;
} /* Scrollbar colour */
.wm {
  max-width: min(78%, 640px);
} /* Bubble can be wider on big screens */
.wm .msgimg {
  width: 320px;
  max-width: 100%;
} /* Bigger pictures on big screens */
@media (max-width: 600px) {
  .wrap.chatwide {
    padding-left: 8px;
    padding-right: 8px;
  }
  .chatwide .card {
    padding: 10px;
  }
  .wm {
    max-width: 88%;
  }
  .wm .msgimg {
    width: 100%;
  }
} /* Phone layout: smaller margins in the chat */
/* account menu */
.mlabel {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 18px 4px 6px;
} /* Profile menu label */
.mlist {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  margin: 8px 0 14px;
} /* Profile menu list box */
.mrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  font-size: 1.02rem;
  transition: background 0.15s;
} /* One profile menu row */
.mrow:last-child {
  border-bottom: none;
} /* No line under the last row */
.mrow:hover,
.mrow:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
} /* Row highlight on hover or keyboard */
.mrow:active {
  background: rgba(255, 255, 255, 0.08);
} /* Row pressed colour */
.mrow .mi {
  display: flex;
  align-items: center;
  gap: 12px;
} /* Left part of a menu row (icon and text) */
.mrow .ch {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
} /* Arrow on the right of a menu row */
/* result rows */
.xr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
} /* One exam result row */
.xr:last-child {
  border-bottom: none;
} /* No line under the last result */
.pill {
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.95rem;
  white-space: nowrap;
} /* Score pill */
.pill.ok {
  background: rgba(46, 204, 113, 0.14);
  color: #2ecc71;
} /* Green pill for a pass */
.pill.bad {
  background: rgba(225, 29, 46, 0.16);
  color: #ff6b74;
} /* Red pill for a fail */
.xs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
} /* Row of small info chips */
.xs span {
  background: #1c1a19;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
} /* One small info chip */
.navav {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 2px solid transparent;
} /* Profile picture inside the nav button */
.nav button.active .navav {
  border-color: var(--red);
} /* Red border for the active tab picture */
/* chat list */
.chcard {
  transition: border-color 0.15s;
} /* Chat menu card transition */
.chcard.has {
  border-color: rgba(37, 211, 102, 0.5);
} /* Chat card with unread messages (green border) */
.chcard .ct {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
} /* Top row of a chat card */
.chcard .ct b {
  font-size: 1.05rem;
} /* Chat card title */
.chcard .cp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
} /* Bottom row of a chat card */
.chcard .cp span.pv {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
} /* Last message preview (one line) */
.cbadge {
  background: #25d366;
  color: #08130c;
  font-weight: 800;
  font-size: 0.8rem;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
} /* Green unread counter */
.chcard .tm {
  font-size: 0.78rem;
  color: var(--muted);
} /* Chat card time */
.chcard.has .tm {
  color: #25d366;
} /* Time in green when unread */
/* reactions, forward, status */
.mreact {
  display: flex;
  gap: 12px;
  padding: 6px 0 2px;
  font-size: 21px;
  clear: both;
} /* Emoji reaction picker row */
.mreact span {
  cursor: pointer;
} /* Reaction emoji cursor */
.rxs {
  clear: both;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 4px;
} /* Row of reactions under a message */
.rx {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1px 8px;
  font-size: 12.5px;
  cursor: pointer;
} /* One reaction chip */
.rx.me {
  outline: 1px solid #06cf9c;
} /* My own reaction outline */
.wf {
  font-size: 11.5px;
  opacity: 0.7;
  font-style: italic;
  margin-bottom: 2px;
} /* "Forwarded" label */
.fwd {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
} /* Forward box dark background */
.fwdc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(420px, 100%);
  max-height: 80vh;
  overflow: auto;
  padding: 14px;
} /* Forward box */
.fwdt {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #25d366;
  color: #08130c;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  z-index: 70;
} /* Small "sent" notice at the bottom */
/* branding + splash */
.logo {
  background: none !important;
  border: none !important;
  overflow: hidden;
} /* Logo without background or border */
.logo svg {
  display: block;
  width: 100%;
  height: 100%;
} /* Logo picture fills its box */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 80vh;
  text-align: center;
} /* Splash (loading) screen layout */
.splash .sl {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 14px 30px rgba(225, 29, 46, 0.45));
  animation: spl 1.4s ease-in-out infinite;
} /* Splash logo with animation */
.splash .sl svg {
  width: 100%;
  height: 100%;
  display: block;
} /* Splash logo picture */
.splash b {
  font-family: Poppins, sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.3px;
} /* Splash app name */
.splash small {
  color: var(--muted);
} /* Splash small text */
.sbar {
  width: 140px;
  height: 3px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
} /* Splash loading bar track */
.sbar i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--red);
  border-radius: 3px;
  animation: sbar 1.1s infinite;
} /* Splash loading bar moving part */
@keyframes spl {
  50% {
    transform: scale(1.06);
  }
} /* Animation: splash logo pulses */
@keyframes sbar {
  from {
    margin-left: -40%;
  }
  to {
    margin-left: 100%;
  }
} /* Animation: loading bar slides */
/* back button */
.backbar {
  padding: 12px 0 2px;
} /* Back bar at the top of sub-pages */
.bbtn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--white);
  border-radius: 30px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: inherit;
  width: auto;
  box-shadow: none;
} /* "Back" button */
.bbtn:active {
  background: var(--card2);
} /* Back button pressed colour */
.mback {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 14px;
  z-index: 2;
} /* Floating back button */
/* WHITE PAGE BACKGROUND - dark cards, bars, dialogs and buttons are unchanged */
.avatar,.bar,.barbg,.bbtn:active,.card,.divider,.dr,.explain.bad,.explain.good,.mlist,.msg.admin,.msg.user,.opt,.opt.correct,.opt.sel,.opt.wrong,.sbar,.wm.in,.wr,.xs span,/* WhatsApp-style chat */  /* Dark boxes keep their dark colour on the red page */
.chatbox {
  color: var(--white);
} /* Chat text colour */
.nav {
  background: #070605;
} /* Bottom bar background */
.fwdc {
  color: var(--white);
} /* Forward box text colour */
.fcard,
.fcard-content {
  color: var(--white);
} /* Feature card text colour */
/* FULL RED + BLACK BACKGROUND (dark cards, bars, dialogs unchanged) */
html {
  background: #8f0c18;
} /* Red page background colour */
body {
  background: transparent !important;
  color: #fff;
  position: relative;
} /* Page transparent so the red background shows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none; /* Glow layer behind the page */
  background:
    radial-gradient(
      520px 380px at 100% 0,
      rgba(255, 255, 255, 0.16),
      transparent 62%
    ),
    radial-gradient(
      640px 460px at 0 100%,
      rgba(0, 0, 0, 0.72),
      transparent 66%
    ),
    linear-gradient(155deg, #e11d2e 0%, #c0121f 38%, #7d0a15 70%, #14090a 100%);
} /* Glow colours (white top-right, black bottom-left) */
#app {
  position: relative;
  z-index: 1;
} /* App container above the glow */
#app > .hero h1,
#app > .hero h2,
#app > h1,
#app > h2,
#app > h3,
#backBar + h2 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
} /* White headings with a soft shadow */
#app > .hero p,
#app > .hero .small,
#app > .small,
#app > p,
.splash small,
.mlabel {
  color: rgba(255, 255, 255, 0.86);
} /* Soft white small text */
.hero .logo {
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 12px 28px -8px rgba(0, 0, 0, 0.6);
} /* White ring around the hero logo */
.splash b {
  color: #fff;
} /* White splash name */
#app > h2,
#app > h3,
.mlabel {
  border-left: 4px solid #fff;
  padding-left: 10px;
} /* White bar before headings and labels */
.mlabel {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.76rem;
} /* Menu label style (capital letters) */
.sbar {
  background: rgba(255, 255, 255, 0.3);
} /* Splash bar track on red */
.sbar i {
  background: #fff;
} /* Splash bar fill white */
.bbtn {
  background: #0a0908;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
} /* Back button colours on red */
.topbar .linklike {
  background: #0a0908;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 600;
  display: inline-block;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.6);
} /* Top bar link style */

/* documents + upload progress */
.doc {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
} /* Document row */
.doc:last-child {
  border-bottom: none;
} /* No line under the last document */
.doc .ic {
  font-size: 26px;
} /* Document icon size */
.doc .t {
  flex: 1;
  min-width: 0;
} /* Document text column */
.doc .t b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
} /* Document name (one line) */
.pbar {
  height: 6px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0 2px;
} /* Upload progress track */
.pbar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
  transition: width 0.2s;
} /* Upload progress fill */
/* in-site document viewer */
.dv {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: #0a0908;
  display: flex;
  flex-direction: column;
} /* Full-screen PDF viewer */
.dvbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: #0a0908;
  border-bottom: 1px solid var(--line);
} /* Viewer top bar */
.dvt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
} /* Viewer title (one line) */
.dvbody {
  flex: 1;
  overflow: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
} /* Viewer scroll area */
.dvpage {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  flex-shrink: 0;
} /* One PDF page (white with shadow) */
.dvmsg {
  color: #bbb;
  padding: 30px 10px;
  text-align: center;
  line-height: 1.6;
} /* Viewer error message */
.netoff {
  text-align: center;
  padding: 34px 20px;
} /* "Internet needed" card */
.netoff-ic {
  font-size: 54px;
  margin-bottom: 6px;
} /* Big emoji of the card */
.netoff h2 {
  margin: 6px 0 10px;
} /* Card title spacing */
.netoff p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 10px;
} /* Card text */
.netoff .btn {
  margin-top: 10px;
} /* Space above each button of the card */
.updbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #1c1a19;
  border: 1px solid var(--line);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
} /* "New version" bar above the bottom menu */
.updbtn {
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
} /* Update button */
.dvframe-wrap {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: #fff;
  gap: 0;
} /* Area that holds the Word/Excel/PowerPoint viewer */
.dvframe-wrap .dvmsg {
  color: #444;
} /* Loading text on the white area */
.dvframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
} /* The embedded online viewer fills the area */
.dvtext {
  margin: 0;
  padding: 14px;
  width: 100%;
  align-self: stretch;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e8e8e8;
  font:
    14px/1.65 ui-monospace,
    Menlo,
    Consolas,
    monospace;
} /* Text file shown as text */

/* ---- Payments: bottom sheet ---- */
.pm {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade 0.2s ease;
}
.pmbox {
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  max-height: 92vh;
  overflow: auto;
}
.pmprice {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  background: var(--red-deep);
  border: 1px solid #5b1a22;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.pmprice b {
  font-size: 1.5rem;
  color: #fff;
}
.pmerr {
  color: #ff6b74;
  font-size: 13px;
  margin: 8px 0;
}
.pmbox input {
  width: 100%;
  margin: 6px 0 10px;
}
.pmspin {
  font-size: 46px;
  animation: pmpulse 1.2s ease-in-out infinite;
}
@keyframes pmpulse {
  50% {
    transform: scale(1.12);
    opacity: 0.7;
  }
}
@media (min-width: 600px) {
  .pm {
    align-items: center;
  }
  .pmbox {
    border-radius: 22px;
    border-bottom: 1px solid var(--line);
  }
}

.pmoffer {
  background: var(--red-deep);
  border: 1px solid #5b1a22;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
} /* One price offer in the pay screen */
.pmo1 b {
  font-size: 1.6rem;
  color: #fff;
}
.pmo1 span {
  color: #cbb;
} /* Price and RWF */
.pmo2 {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 4px 0 10px;
  color: #eee;
} /* What the offer gives */
.dvdl {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid #e11d2e;
  background: linear-gradient(145deg, #050404 0%, #3a060c 55%, #a3121f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
} /* Download button: round, middle of the right side of the viewer */
.dvdl span {
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
} /* Word "Download" under the icon */
.dvdl:active {
  background: #2a2624;
}
.ftsr {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.ftsr:first-of-type {
  border-top: 0;
}
.ftsr mark {
  background: #ffd600;
  color: #000;
  border-radius: 3px;
  padding: 0 2px;
} /* A page found inside a file */
.dvdl {
  animation: dvbeat 1.3s ease-in-out infinite;
} /* Download button beats (grows and shrinks, with a red glow) to attract the user */
.dvdl svg {
  animation: dvbob 1.3s ease-in-out infinite;
} /* The arrow moves down a little with each beat */
@keyframes dvbeat {
  0%,
  100% {
    transform: translateY(-50%) scale(1);
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.55),
      0 0 0 0 rgba(225, 29, 46, 0.65);
  }
  50% {
    transform: translateY(-50%) scale(1.12);
    box-shadow:
      0 4px 14px rgba(0, 0, 0, 0.55),
      0 0 0 12px rgba(225, 29, 46, 0);
  }
}
@keyframes dvbob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(2px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .dvdl,
  .dvdl svg {
    animation: none;
  }
}
.bbtn.bk {
  background: linear-gradient(145deg, #050404 0%, #3a060c 60%, #8f101c 100%);
  border: 1px solid #e11d2e;
  color: #fff;
  animation: none;
  transition: none;
} /* Back button: black-red, no animation */
.bbtn.bk:active {
  background: linear-gradient(145deg, #050404 0%, #2a0509 60%, #6e0c16 100%);
}
.sqwrap {
  position: sticky;
  top: 0;
  z-index: 6;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 0 10px;
  margin: 0;
  background: linear-gradient(180deg, #8f0c18 78%, rgba(143, 12, 24, 0));
} /* Lesson search box stays at the top while scrolling */
.sqwrap input {
  margin: 0;
}
html.kb .nav {
  display: none;
} /* Phone keyboard open: hide the bottom menu to free space */
html.kb .chatbox {
  height: calc(var(--vvh, 100dvh) - 200px);
  min-height: 130px;
} /* Phone keyboard open: the chat fits above the keyboard */

/* ===== Real-looking buttons for every clickable text action (names stay the same): black-red, like the back button ===== */
.linklike {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(145deg, #050404 0%, #3a060c 60%, #8f101c 100%);
  border: 1px solid #e11d2e;
  color: #fff;
  border-radius: 30px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  animation: none;
} /* Looks like a real button */
.linklike.small {
  font-size: 0.82rem;
  padding: 6px 12px;
  color: #fff;
} /* Smaller ones stay small but are still buttons */
.linklike:hover {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.18);
} /* A little brighter on hover */
.linklike:active {
  filter: brightness(0.88);
} /* A little darker when pressed */
.topbar .linklike {
  background: linear-gradient(145deg, #050404 0%, #3a060c 60%, #8f101c 100%);
  border: 1px solid #e11d2e;
  border-radius: 30px;
  box-shadow: none;
} /* Top bar buttons match */

/* ===== Big screens (PC): use more of the screen instead of a narrow middle strip. Phones are not affected. ===== */
@media (min-width: 900px) {
  .wrap {
    max-width: 900px;
  }
} /* Laptops */
@media (min-width: 1200px) {
  .wrap,
  .wrap.chatwide {
    max-width: 1100px;
  }
} /* Desktop screens */
@media (min-width: 1600px) {
  .wrap,
  .wrap.chatwide {
    max-width: 1360px;
  }
} /* Very large screens */
.auth-card {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
} /* The login card stays a normal size */

/* ===== Clean icons on buttons (instead of emoji) ===== */
.ic {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  display: inline-block;
  flex-shrink: 0;
} /* Icon size follows the text size */
.wm .ic {
  width: 1.2em;
  height: 1.2em;
} /* Chat bubble action icons */

/* ===== No text selection (no blue highlight) on titles, buttons, menus, quiz and exam. Chat messages and typing boxes stay selectable. ===== */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.wm,
.wm *,
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

/* ===== Clean icons on the bottom menu, home buttons and menu rows ===== */
.nav span:first-child .ic {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto;
  stroke-width: 1.9;
} /* Bottom menu icons */
.fcard-visual .ic {
  width: 46px;
  height: 46px;
  stroke-width: 1.5;
  color: #fff;
  opacity: 0.92;
} /* Big icons on the four home buttons */
.mrow .mi .ic {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
  color: #ff6b74;
} /* Menu row icons */
.mrow .mi > span:first-child {
  display: inline-flex;
} /* Keep the icon centred */

/* ===== Account button: round, in the top right corner of the site (it moved from the bottom menu) ===== */
.acctbtn {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070605;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  z-index: 12;
  overflow: hidden;
  cursor: pointer;
} /* Round button */
.acctbtn.hidden {
  display: none;
} /* Hidden when logged out */
.acctbtn.active {
  border-color: var(--red);
} /* Red ring while the account page is open */
.acctbtn .ic {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
} /* Icon size */
.acctbtn .acctav {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
} /* Profile picture fills the circle */
body.hasacct #app > :first-child {
  padding-right: 52px;
} /* Keep the first line away from the button */
html.kb .acctbtn {
  display: none;
} /* Phone keyboard open: hide it to free space */

/* ===== Account button: name "Account" under the round picture ===== */
.acctbtn {
  width: auto;
  height: auto;
  border: 0;
  background: none;
  border-radius: 0;
  flex-direction: column;
  gap: 3px;
  overflow: visible;
} /* Button is now picture + name */
.acctbtn .acctc {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #070605;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
} /* The round picture */
.acctbtn.active .acctc {
  border-color: var(--red);
} /* Red ring while the account page is open */
.acctbtn .acctl {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
} /* The name "Account" */
body.hasacct #app > :first-child {
  padding-right: 60px;
} /* A little more room for the name */

/* ===== Chat pictures: very small, they grow only when tapped (the viewer opens) ===== */
.msgimg,
.wm .msgimg {
  width: 84px;
  height: 84px;
  object-fit: cover;
  max-width: 100%;
  border-radius: 8px;
  margin: 2px 0 3px;
  cursor: zoom-in;
} /* Small square picture in a message */
.chatwide .wm .msgimg {
  width: 84px;
} /* Same size on phones */

/* ===== Amasomo filter buttons look like the other black-red buttons ===== */
.lch .chip {
  background: linear-gradient(145deg, #050404 0%, #3a060c 60%, #8f101c 100%);
  border: 1px solid #e11d2e;
  color: #fff;
  border-radius: 30px;
  padding: 8px 16px;
  font-weight: 600;
} /* Black-red real button */
.lch .chip.on {
  background: linear-gradient(135deg, #ff4d5a, #e11d2e);
  border-color: #ff8a90;
  color: #fff;
} /* Selected one is bright red */

/* ===== Chat messages: no blue selection or Copy menu. Press and hold opens the message menu instead. ===== */
.wm,
.wm * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
} /* Messages cannot be selected */

/* ===== Phone keyboard on the chat: the page is pinned, the chat board fills the space above the keyboard ===== */
html.kbchat,
html.kbchat body {
  overflow: hidden;
  overscroll-behavior: none;
} /* The page cannot be scrolled or moved */
html.kbchat body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  top: var(--vvt, 0px);
  height: var(--vvh);
} /* Exactly the visible part above the keyboard */
html.kbchat .chatbox {
  height: var(--chath, 200px);
  min-height: 0;
  max-height: none;
} /* The chat board fits the free space */
html.kbchat .nav {
  display: none;
} /* Bottom menu hidden while typing */

/* ===== "Typing..." dots bubble inside the chat (like WhatsApp) ===== */
.wm.typ {
  width: auto;
  min-width: 0;
  padding: 10px 14px;
  align-self: flex-start;
} /* Small bubble on the left */
.wm.typ .dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 14px;
} /* Three dots in a row */
.wm.typ .dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8696a0;
  animation: typb 1.2s infinite ease-in-out;
} /* One dot */
.wm.typ .dots i:nth-child(2) {
  animation-delay: 0.18s;
}
.wm.typ .dots i:nth-child(3) {
  animation-delay: 0.36s;
} /* Dots jump one after another */
@keyframes typb {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
} /* The jump */

/* ===== Logo + name "TwaraX" always in the top left corner (the Account button is in the top right corner) ===== */
.brandtl {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 12px;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
} /* Fixed in the corner; it never blocks a tap (the Account button stays above it) */
.brandtl::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(76px + env(safe-area-inset-top, 0px));
  z-index: -1;
  background: rgba(192, 18, 31, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
} /* Bar behind the logo: invisible at the top of a page */
body.scrolled .brandtl::before {
  opacity: 1;
  pointer-events: auto;
} /* Visible once the page is scrolled: content slides UNDER it and never over the logo */
.brandtl.hidden {
  display: none;
} /* Hidden when logged out */
.brandtl .brandlogo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.9),
    0 6px 14px -6px rgba(0, 0, 0, 0.6);
} /* Small logo with a white ring */
.brandtl .brandlogo svg {
  display: block;
  width: 100%;
  height: 100%;
} /* Logo picture fills its box */
.brandtl .brandname {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
} /* The name */
html.kb .brandtl {
  display: none;
} /* Phone keyboard open: hide it to free space (like the Account button) */
html:not(.kb) body.hasbrand #app {
  padding-top: calc(44px + env(safe-area-inset-top, 0px));
} /* Room for the logo above the first line of every screen */
@supports selector(:has(*)) {
  html:not(.kb) body.hasbrand #app:has(> .hero:first-child) {
    padding-top: calc(56px + env(safe-area-inset-top, 0px));
  }
} /* The centred welcome block starts below the logo-and-name bar (with the colour switch, bell and Account button), so the big logo never goes into it */
body.hasacct #app > .homehero:first-child {
  padding-left: 60px;
} /* Home welcome block: same free space on the left as on the right, so the logo and name are exactly in the centre */

/* ===== PDF viewer: the words of a page can be selected and COPIED (they cannot be edited) ===== */
.dvpg {
  position: relative;
  flex-shrink: 0;
  max-width: 100%;
} /* Holds one page picture and its text layer */
.dvpg > canvas {
  display: block;
} /* No gap under the picture */
.textLayer {
  position: absolute;
  inset: 0;
  overflow: clip;
  line-height: 1;
  text-align: initial;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  forced-color-adjust: none;
  transform-origin: 0 0;
  z-index: 0;
  --min-font-size: 1;
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
} /* Invisible text exactly over the page picture */
.textLayer span,
.textLayer br {
  color: transparent;
  position: absolute;
  white-space: pre;
  cursor: text;
  transform-origin: 0% 0%;
  -webkit-user-select: text;
  user-select: text;
} /* Every word is real text you can select */
.textLayer span {
  --font-height: 0;
  --scale-x: 1;
  --rotate: 0deg;
  --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size));
  --min-font-size-inv: calc(1 / var(--min-font-size));
  font-size: calc(var(--text-scale-factor) * var(--font-height));
  transform: rotate(var(--rotate)) scaleX(var(--scale-x))
    scale(var(--min-font-size-inv));
  z-index: 1;
} /* Size and place each word like the picture below it */
.textLayer ::selection {
  background: rgba(0, 0, 255, 0.25);
} /* Selected words are shaded blue */
.dvtext {
  -webkit-user-select: text;
  user-select: text;
} /* Text files (.txt) in the viewer can be selected and copied too */

/* ===== Message information box and a person's picture with name and number ===== */
.inf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
} /* One line of the message information */
.inf b {
  font-weight: 600;
  text-align: right;
} /* Its value */
.infw {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
} /* A person with a small picture */
#infoBox h4 {
  margin: 14px 0 2px;
  font-size: 13px;
  color: var(--muted);
} /* Heading of a group of people */
#imgModalCap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #fff;
  text-align: center;
  pointer-events: none;
} /* Name and number under a person's picture */
#imgModalCap b {
  font-size: 20px;
} /* The name */
#imgModalCap span {
  font-size: 16px;
  opacity: 0.8;
} /* The number */

/* ===== Pages open with their animation once; new data no longer replays it (no flicker) ===== */
#app .card,
#app .hero {
  animation-delay: var(--ad, 0ms);
} /* A redraw during the animation carries on from the same moment */
#app.still .card,
#app.still .hero {
  animation: none;
} /* A redraw after the animation: boards stay still */

/* Password box with a small eye button at the right end */
.pwf {
  position: relative;
}
.pwf input {
  padding-right: 44px;
}
.pweye {
  position: absolute;
  right: 6px;
  top: 4px;
  bottom: 0;
  width: 36px;
  padding: 0;
  background: none;
  border-radius: 10px;
  color: #ffa500;
  display: flex;
  align-items: center;
  justify-content: center;
} /* Eye button: shows or hides the typed password */

/* Loading sign in the centre of the page while the first data arrives */
.pgload {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
} /* The loading sign sits in the exact centre of the screen */
body.hasacct #app > .pgload:first-child {
  padding: 0;
} /* The Account-button spacing must not push the loading sign off the centre */
.dvframe-wrap .pgload .spinner {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #e11d2e;
} /* On the white Word/Excel viewer the sign is dark */
.pgload .spinner {
  margin: 0;
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
}

/* =====================================================================
   NOV 2026 UPGRADES: toasts, score ring + confetti, new Ahabanza, file cards,
   answer feedback, swipe, question map, theme page.
   (Everything here is new; nothing above was changed. Each part can be switched off in js/config/config.js -> FEATURES.)
   ===================================================================== */

/* ----- Toast messages (small, bottom, never block the screen) ----- */
.toastbox {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  background: #1b1716;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.7);
  animation: toastIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.toast.out {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.26s,
    transform 0.26s;
}
.toasti {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: #2ecc71;
  color: #06210f;
}
.toast.err .toasti {
  background: #ff4757;
  color: #fff;
}
.toast.info .toasti {
  background: #3b82f6;
  color: #fff;
}
.toastt {
  min-width: 0;
  overflow-wrap: anywhere;
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ----- Score ring (Ahabanza and result screens) ----- */
.ring {
  display: block;
  overflow: visible;
  flex: none;
}
.ring .rg-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 10;
}
.ring .rg-fg {
  fill: none;
  stroke: #2ecc71;
  stroke-width: 10;
  stroke-linecap: round;
  animation: ringIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.ring.mid .rg-fg {
  stroke: #ffb020;
}
.ring .rg-t {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 27px;
  fill: var(--white);
}
.ring .rg-s {
  font-size: 11px;
  font-weight: 600;
  fill: var(--muted);
}
@keyframes ringIn {
  from {
    stroke-dashoffset: var(--c);
  }
}
.ringwrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
}
.ringwrap .ring {
  background: rgba(10, 9, 8, 0.55);
  border-radius: 50%;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.6);
}

/* ----- Confetti (plays once when a result is good) ----- */
.confetti {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  overflow: hidden;
}
.confetti i {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 14px;
  opacity: 0;
  border-radius: 2px;
  animation: cfall linear forwards;
}
@keyframes cfall {
  0% {
    opacity: 1;
    transform: translate3d(0, -10px, 0) rotate(0);
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--dx, 0), 105vh, 0) rotate(var(--rot, 360deg));
  }
}

/* ----- New Ahabanza: progress card, quick tiles ----- */
.prog {
  padding: 16px;
}
.pstat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.pstat:last-child {
  border-bottom: 0;
}
.pstat span {
  color: var(--muted);
}
.pstat b {
  font-weight: 700;
  white-space: nowrap;
}
.prog .btn-outline {
  margin-top: 14px;
}
.qtiles {
  margin: 14px 0;
}
.qtile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 118px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.15s,
    border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.qtile:hover {
  border-color: rgba(255, 255, 255, 0.28);
}
.qtile:active {
  transform: scale(0.97);
}
.qtile:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.qti {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qti .ic {
  width: 24px;
  height: 24px;
  stroke-width: 1.9;
  color: #fff;
}
.qtx h3 {
  margin: 0 0 2px;
  font-size: 1.02rem;
  font-weight: 700;
}
.qtx p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ----- "Komeza gusoma" card and clearer file cards ----- */
.resume {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 16px;
  cursor: pointer;
  color: var(--white);
  background: linear-gradient(135deg, var(--card), var(--card2));
  border: 1px solid var(--line);
  border-left: 4px solid var(--red2);
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.7);
}
.resume:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.resume .t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.resume .t b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rtag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff9298;
}
.rgo {
  color: var(--muted);
  display: flex;
}
.rgo .ic {
  width: 20px;
  height: 20px;
}
.ic.fi {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.07);
}
.ic.fi .ic {
  width: 24px;
  height: 24px;
}
.ic.fi-pdf {
  background: rgba(225, 29, 46, 0.2);
  color: #ff6b74;
}
.ic.fi-doc {
  background: rgba(59, 130, 246, 0.2);
  color: #7db2ff;
}
.ic.fi-xls {
  background: rgba(46, 204, 113, 0.18);
  color: #4fdc8e;
}
.ic.fi-ppt {
  background: rgba(255, 140, 40, 0.2);
  color: #ffa457;
}
.doc.fcrd {
  padding: 12px 8px;
  margin: 0 -8px;
  border-radius: 14px;
  transition: background 0.15s;
}
.doc.fcrd:hover {
  background: rgba(255, 255, 255, 0.04);
}
.doc.fcrd:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: -2px;
}
.ftype {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  margin-right: 3px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}
.ft-pdf {
  color: #ff8a90;
  background: rgba(225, 29, 46, 0.16);
}
.ft-doc {
  color: #7db2ff;
  background: rgba(59, 130, 246, 0.16);
}
.ft-xls {
  color: #4fdc8e;
  background: rgba(46, 204, 113, 0.14);
}
.ft-ppt {
  color: #ffa457;
  background: rgba(255, 140, 40, 0.16);
}

/* ----- Clearer right / wrong feedback in Imyitozo ----- */
.opt {
  position: relative;
}
html:not(.nofx) .opt.correct,
html:not(.nofx) .opt.wrong {
  padding-right: 52px;
}
html:not(.nofx) .opt.correct::after,
html:not(.nofx) .opt.wrong::after {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}
html:not(.nofx) .opt.correct::after {
  content: "✓";
  background: var(--green);
}
html:not(.nofx) .opt.wrong::after {
  content: "✕";
  background: var(--red);
}
html:not(.nofx) .opt.correct {
  animation: optPop 0.35s ease;
}
html:not(.nofx) .opt.wrong {
  animation: optShake 0.38s ease;
}
html:not(.nofx) .explain {
  animation: explIn 0.3s ease;
}
@keyframes optPop {
  50% {
    transform: scale(1.015);
  }
}
@keyframes optShake {
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}
@keyframes explIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.card.slide-r {
  animation: slideR 0.26s ease both;
}
.card.slide-l {
  animation: slideL 0.26s ease both;
}
@keyframes slideR {
  from {
    opacity: 0;
    transform: translateX(34px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slideL {
  from {
    opacity: 0;
    transform: translateX(-34px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.swhint {
  text-align: center;
  margin: 10px 0 0;
}
@media (hover: hover) {
  .swhint {
    display: none;
  }
}

/* ----- Question map in Ikizamini ----- */
.qmap {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  margin: 10px 0 4px;
}
.qm {
  padding: 0;
  min-width: 0;
  aspect-ratio: 1;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line);
}
.qm.done {
  background: var(--blue-deep);
  border-color: var(--blue);
  color: #fff;
}
.qm.cur {
  background: linear-gradient(135deg, var(--red2), var(--red));
  border-color: transparent;
  color: #fff;
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}
@media (min-width: 900px) {
  .qmap {
    grid-template-columns: repeat(20, 1fr);
  }
}

/* ----- Theme page (Konti > Isura y'urubuga) ----- */
.thopt {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card2);
  cursor: pointer;
}
.thopt:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.thopt.on {
  border-color: var(--red2);
  background: var(--red-deep);
}
.thic {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.thic .ic {
  width: 22px;
  height: 22px;
}
.thtx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.thsw {
  display: flex;
  gap: 3px;
}
.thsw i {
  width: 14px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid rgba(128, 128, 128, 0.45);
}
.thck {
  width: 22px;
  text-align: center;
  font-weight: 800;
  color: var(--red2);
}

/* =====================================================================
   LIGHT THEME (Konti > Isura y'urubuga). Only applies when <html data-theme="light">.
   ===================================================================== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6efed;
  --card: #ffffff;
  --card2: #fbf7f6;
  --line: #e7dcd9;
  --red-deep: #fde9eb;
  --amber-deep: #fff3d8;
  --green-deep: #e3f6ea;
  --blue-deep: #e4eeff;
  --white: #201817;
  --muted: #6c615d;
  background: #f6efed;
}
html[data-theme="light"] body {
  color: #201817;
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(520px 380px at 100% 0, rgba(225, 29, 46, 0.16), transparent 62%),
    radial-gradient(640px 460px at 0 100%, rgba(255, 176, 32, 0.14), transparent 66%),
    linear-gradient(180deg, #fbf6f4 0%, #f4eae7 100%);
}
html[data-theme="light"] #app > .hero h1,
html[data-theme="light"] #app > .hero h2,
html[data-theme="light"] #app > h1,
html[data-theme="light"] #app > h2,
html[data-theme="light"] #app > h3,
html[data-theme="light"] #backBar + h2,
html[data-theme="light"] .splash b {
  color: #201817;
  text-shadow: none;
}
html[data-theme="light"] #app > .hero p,
html[data-theme="light"] #app > .hero .small,
html[data-theme="light"] #app > .small,
html[data-theme="light"] #app > p,
html[data-theme="light"] .splash small,
html[data-theme="light"] .mlabel {
  color: #6c615d;
}
html[data-theme="light"] #app > h2,
html[data-theme="light"] #app > h3,
html[data-theme="light"] .mlabel {
  border-left-color: #e11d2e;
}
html[data-theme="light"] .hero .logo {
  box-shadow: 0 0 0 3px #fff, 0 12px 26px -10px rgba(120, 20, 30, 0.45);
}
html[data-theme="light"] .sbar {
  background: rgba(0, 0, 0, 0.1);
}
html[data-theme="light"] .sbar i {
  background: #e11d2e;
}
html[data-theme="light"] .pgload .spinner {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #e11d2e;
}
/* top-left brand and account button */
html[data-theme="light"] .brandtl::before {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 18px -14px rgba(60, 20, 20, 0.5);
}
html[data-theme="light"] .brandtl .brandname {
  color: #201817;
  text-shadow: none;
}
html[data-theme="light"] .brandtl .brandlogo {
  box-shadow: 0 0 0 2px #fff, 0 6px 14px -6px rgba(60, 20, 20, 0.4);
}
html[data-theme="light"] .acctbtn {
  color: #201817;
}
html[data-theme="light"] .acctbtn .acctc {
  background: #fff;
  border-color: #e7dcd9;
  color: #201817;
}
html[data-theme="light"] .acctbtn.active .acctc {
  border-color: var(--red);
}
html[data-theme="light"] .acctbtn .acctl {
  color: #201817;
  text-shadow: none;
}
/* cards, inputs, buttons, chips */
html[data-theme="light"] .card,
html[data-theme="light"] .mlist {
  box-shadow: 0 1px 2px rgba(60, 20, 20, 0.06), 0 12px 26px -16px rgba(80, 20, 20, 0.35);
}
html[data-theme="light"] input,
html[data-theme="light"] textarea {
  background: #fff;
}
html[data-theme="light"] .btn-icon {
  background: #fff;
  color: #201817;
}
html[data-theme="light"] .btn-outline {
  color: #c0121f;
  border-color: #c0121f;
}
html[data-theme="light"] .tag {
  border-color: #f5c2c7;
  color: #b3101f;
}
html[data-theme="light"] .chip {
  background: #fff;
  color: #6c615d;
}
html[data-theme="light"] .bbtn:not(.bk) {
  background: #fff;
  color: #201817;
  border-color: var(--line);
}
html[data-theme="light"] .avatar,
html[data-theme="light"] .msgav {
  background: #efe6e3;
}
html[data-theme="light"] .xs span {
  background: #fff;
}
html[data-theme="light"] .pill.ok {
  color: #14803f;
  background: rgba(46, 204, 113, 0.18);
}
html[data-theme="light"] .pill.bad {
  color: #c0121f;
  background: rgba(225, 29, 46, 0.12);
}
html[data-theme="light"] .badge-block {
  background: #fde9eb;
  color: #b3101f;
  border-color: #f5c2c7;
}
html[data-theme="light"] .mrow:hover,
html[data-theme="light"] .mrow:focus-visible {
  background: rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .mrow:active {
  background: rgba(0, 0, 0, 0.07);
}
html[data-theme="light"] .mrow .mi .ic {
  color: #e11d2e;
}
html[data-theme="light"] .sqwrap {
  background: linear-gradient(180deg, #f6efed 78%, rgba(246, 239, 237, 0));
}
/* bottom menu */
html[data-theme="light"] .nav {
  background: rgba(255, 255, 255, 0.94);
  border-top-color: var(--line);
}
html[data-theme="light"] .nav button.active {
  color: #c0121f;
  background: rgba(225, 29, 46, 0.1);
}
html[data-theme="light"] .fwd {
  background: rgba(30, 12, 12, 0.5);
}
/* questions */
html[data-theme="light"] .opt {
  background: #fff;
}
html[data-theme="light"] .opt .ol {
  background: #efe6e3;
  color: #4a3f3b;
}
html[data-theme="light"] .opt.wrong {
  background: var(--red-deep);
}
html[data-theme="light"] .opt.sel .ol,
html[data-theme="light"] .opt.correct .ol,
html[data-theme="light"] .opt.wrong .ol {
  color: #fff;
}
html[data-theme="light"] .qimg {
  background: #fff;
}
html[data-theme="light"] .bar,
html[data-theme="light"] .barbg,
html[data-theme="light"] .pbar {
  background: #eadfdc;
}
html[data-theme="light"] .timer {
  border-color: #f0cf8a;
  color: #8a5200;
}
html[data-theme="light"] .explain.good {
  background: #e3f6ea;
  border-color: #b6e3c8;
}
html[data-theme="light"] .explain.bad {
  background: #fde9eb;
  border-color: #f5c2c7;
}
html[data-theme="light"] .qm.done,
html[data-theme="light"] .qm.cur {
  color: #fff;
}
html[data-theme="light"] .qm.done {
  background: #3b82f6;
}
/* new parts */
html[data-theme="light"] .ring .rg-bg {
  stroke: rgba(0, 0, 0, 0.09);
}
html[data-theme="light"] .ringwrap .ring {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px -14px rgba(80, 20, 20, 0.4);
}
html[data-theme="light"] .qtile,
html[data-theme="light"] .resume {
  box-shadow: 0 10px 22px -16px rgba(80, 20, 20, 0.4);
}
html[data-theme="light"] .qtile:hover {
  border-color: rgba(225, 29, 46, 0.35);
}
html[data-theme="light"] .qti {
  background: rgba(225, 29, 46, 0.1);
}
html[data-theme="light"] .qti .ic {
  color: #c0121f;
}
html[data-theme="light"] .rtag {
  color: #c0121f;
}
html[data-theme="light"] .ic.fi {
  background: rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .ic.fi-pdf {
  background: rgba(225, 29, 46, 0.12);
  color: #c0121f;
}
html[data-theme="light"] .ic.fi-doc {
  background: rgba(59, 130, 246, 0.14);
  color: #1d5fd0;
}
html[data-theme="light"] .ic.fi-xls {
  background: rgba(46, 204, 113, 0.16);
  color: #14803f;
}
html[data-theme="light"] .ic.fi-ppt {
  background: rgba(255, 140, 40, 0.18);
  color: #b85a00;
}
html[data-theme="light"] .doc.fcrd:hover {
  background: rgba(0, 0, 0, 0.03);
}
html[data-theme="light"] .ftype {
  background: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .ft-pdf {
  color: #c0121f;
  background: rgba(225, 29, 46, 0.1);
}
html[data-theme="light"] .ft-doc {
  color: #1d5fd0;
  background: rgba(59, 130, 246, 0.12);
}
html[data-theme="light"] .ft-xls {
  color: #14803f;
  background: rgba(46, 204, 113, 0.14);
}
html[data-theme="light"] .ft-ppt {
  color: #b85a00;
  background: rgba(255, 140, 40, 0.15);
}
html[data-theme="light"] .thic {
  background: rgba(0, 0, 0, 0.05);
}
/* old tiles (when homeV2 is off) */
html[data-theme="light"] .fcard-visual .ic {
  color: #c0121f;
}
html[data-theme="light"] .fcard-content {
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.92), transparent 90%);
}
/* inline colours written inside the JS files */
html[data-theme="light"] [style*="color:#ff6b74"] {
  color: #c0121f !important;
}
html[data-theme="light"] [style*="color:#fff"] {
  color: #6c615d !important;
}
/* payment sheet */
html[data-theme="light"] .pmprice b,
html[data-theme="light"] .pmo1 b {
  color: #201817;
}
html[data-theme="light"] .pmprice,
html[data-theme="light"] .pmoffer {
  border-color: #f5c2c7;
}
html[data-theme="light"] .pmo1 span {
  color: #6c615d;
}
html[data-theme="light"] .pmo2 {
  color: #3a302d;
}
html[data-theme="light"] .pmerr {
  color: #c0121f;
}
/* chat */
html[data-theme="light"] .chatbox {
  background-color: #efe6e1;
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  color-scheme: light;
  scrollbar-color: #cdbfba transparent;
}
html[data-theme="light"] .chatbox::-webkit-scrollbar-thumb {
  background: #cdbfba;
}
html[data-theme="light"] .wm {
  color: #1d1a19;
  box-shadow: 0 1px 1px rgba(60, 20, 20, 0.15);
}
html[data-theme="light"] .wm.in {
  background: #fff;
}
html[data-theme="light"] .wm.out {
  background: #dcf8c6;
}
html[data-theme="light"] .wm .wt {
  color: rgba(29, 26, 25, 0.55);
}
html[data-theme="light"] .wd span {
  background: #fff;
  color: #6c615d;
}
html[data-theme="light"] .wr,
html[data-theme="light"] .dr {
  background: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .wq {
  background: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .rx {
  background: rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .msg.admin,
html[data-theme="light"] .msg.user {
  background: #fff;
}
html[data-theme="light"] .wm.typ .dots i {
  background: #9b8f8a;
}
html[data-theme="light"] .qtile[data-t="chat"] {
  background: linear-gradient(155deg, #ebe6f7, var(--card2)) !important;
}
html[data-theme="light"] .opt.sel .ol {
  background: var(--blue);
}
html[data-theme="light"] .opt.correct .ol {
  background: var(--green);
}
html[data-theme="light"] .opt.wrong .ol {
  background: var(--red);
}

/* ----- Choosing many chat messages (like WhatsApp) ----- */
.selbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #c0121f, #8f0c18);
  color: #fff;
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.6);
}
.selbar .selcount {
  font-size: 0.95rem;
  margin: 0 8px 0 2px;
}
.selbtn {
  width: 44px;
  height: 44px;
  padding: 0;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border-radius: 50%;
  font-size: 18px;
}
.selbtn:active {
  background: rgba(255, 255, 255, 0.18);
}
.selbtn .ic {
  width: 22px;
  height: 22px;
}
.wm.selmode {
  cursor: pointer;
}
.wm.picked {
  outline: 2px solid #25d366;
  outline-offset: 1px;
}
.selck {
  position: absolute;
  top: -8px;
  left: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #25d366;
  color: #08130c;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.wm.out .selck {
  left: auto;
  right: -8px;
}
.selbar + .chatbox {
  height: calc(100vh - 392px);
  height: calc(100dvh - 392px);
} /* While messages are chosen the bar takes some room above, so the chat box is a little shorter and the message box stays visible */

/* ===== An open chat fills the whole screen, exactly like WhatsApp (bottom menu and corner buttons are hidden while a conversation is open) ===== */
html.chatfull,
html.chatfull body {
  overflow: hidden;
  overscroll-behavior: none;
} /* The page itself never scrolls: only the messages scroll */
html.chatfull .nav,
html.chatfull .brandtl,
html.chatfull .acctbtn,
html.chatfull #backBar {
  display: none !important;
} /* No bottom menu, no logo bar, no account button and no old Back bar: the chat has its own top bar */
html.chatfull body #app.wrap.chatwide {
  position: fixed;
  top: var(--vvt, 0px);
  left: 0;
  right: 0;
  width: 100%;
  height: var(--vvh, 100dvh);
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
} /* The chat takes exactly the visible screen (also above the phone keyboard) */
html.chatfull body #app.wrap.chatwide > .cxhead {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px 4px;
  background: #1f2c34;
  color: #e9edef;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 2;
} /* Top bar of the chat (dark, like WhatsApp) */
html.chatfull .cxback {
  flex: none;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
} /* Round back arrow */
html.chatfull .cxback:active {
  background: rgba(255, 255, 255, 0.14);
} /* Pressed arrow */
html.chatfull .cxback .ic {
  width: 24px;
  height: 24px;
} /* Arrow size */
html.chatfull .cxav {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2a3942;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 20px;
} /* Round picture of the chat */
html.chatfull .cxav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
} /* The picture fills the circle */
html.chatfull .cxht {
  flex: 1;
  min-width: 0;
} /* Name and status take the free room */
html.chatfull .cxht h2 {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} /* Name of the chat (one line) */
html.chatfull .cxht .small {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: #8696a0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} /* Small line under the name (online, typing...) */
html.chatfull .cxht .small:empty {
  display: none;
} /* Nothing to show: no room taken */
html.chatfull body #app.wrap.chatwide > .card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
} /* The card around the messages becomes the free area under the top bar */
html.chatfull .card > .ctools {
  flex: none;
  flex-wrap: nowrap;
  margin: 0;
  padding: 6px 10px;
  overflow-x: auto;
  background: #111b21;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
} /* Search / starred buttons: one thin strip under the top bar */
html.chatfull .card > .ctools button {
  flex: none;
  white-space: nowrap;
} /* Buttons never wrap */
html.chatfull .chatbox {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0;
  border-radius: 0;
  overscroll-behavior: contain;
} /* The messages fill all the room between the top bar and the message box */
html.chatfull .card > .selbar {
  flex: none;
  margin: 0;
  border-radius: 0;
} /* Bar shown while messages are chosen */
html.chatfull .card > .small {
  flex: none;
  margin: 0 !important;
  padding: 6px 14px;
  background: #111b21;
} /* \"You are editing a message\" notice */
html.chatfull .card > .wr,
html.chatfull .card > .dr {
  flex: none;
  margin: 0;
  border-radius: 0;
  padding: 8px 14px;
  background: #1f2c34;
} /* Reply bar and the photo / voice note waiting to be sent */
html.chatfull .card > .row {
  flex: none;
  margin: 0 !important;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  gap: 6px;
  align-items: flex-end;
  background: #111b21;
} /* The message box row sits at the very bottom (buttons stay at the bottom while the box grows) */
html.kb.chatfull .card > .row {
  padding-bottom: 6px;
} /* Keyboard open: no extra space under the row */
html.chatfull .card > .row #chatMsg {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 22px;
  background: #2a3942;
  color: #e9edef;
  font-size: 16px;
  line-height: 22px;
  min-height: 42px;
  max-height: 136px;
  resize: none;
  overflow-y: hidden;
  display: block;
} /* Message box: a rounded pill that grows with the text */
html.chatfull .card > .row .btn-icon:not(.rec) {
  flex: none;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
} /* Round buttons (photo, microphone, emoji) */
html.chatfull .card > .row .btn-icon.rec {
  flex: none;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
} /* The microphone button while recording keeps its own look, only round */
html.chatfull .card > .row .btn-red.btn-icon:not(.rec) {
  background: linear-gradient(135deg, #ff4d5a, #e11d2e);
  color: #fff;
} /* Send button stays red */
html.chatfull .card > .row .btn-red.btn-icon .ic {
  width: 20px;
  height: 20px;
} /* Send icon size */
@media (min-width: 900px) {
  html.chatfull .chatbox {
    padding-left: 8%;
    padding-right: 8%;
  }
} /* Big screens: the messages keep a calm margin on both sides */

/* ----- Light look of the full-screen chat ----- */
html[data-theme="light"].chatfull body #app.wrap.chatwide > .cxhead {
  background: linear-gradient(180deg, #c0121f, #a50f1b);
  color: #fff;
} /* Top bar in the light look: red */
html[data-theme="light"].chatfull .cxav {
  background: rgba(255, 255, 255, 0.22);
} /* Picture circle on the red bar */
html[data-theme="light"].chatfull .cxht .small {
  color: rgba(255, 255, 255, 0.85);
} /* Status line on the red bar */
html[data-theme="light"].chatfull .card > .ctools,
html[data-theme="light"].chatfull .card > .small,
html[data-theme="light"].chatfull .card > .row {
  background: #f6efed;
  border-bottom-color: var(--line);
} /* Strips around the messages in the light look */
html[data-theme="light"].chatfull .card > .wr,
html[data-theme="light"].chatfull .card > .dr {
  background: #ece2de;
} /* Reply bar and draft in the light look */
html[data-theme="light"].chatfull .card > .row #chatMsg {
  background: #fff;
  color: #1d1a19;
  border: 1px solid var(--line);
} /* Message box in the light look */

/* ===== Chat list arranged like WhatsApp: search, filters, then one clean row per chat (round picture, name, time, last message, green unread number) ===== */
.chwrap {
  padding: 0 !important;
  overflow: hidden;
}
.chsearch {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 12px 4px;
  padding: 0 14px;
  height: 42px;
  border-radius: 22px;
  background: rgba(127, 127, 127, 0.16);
  color: var(--muted);
} /* The round search box on top */
.chsearch .ic {
  width: 18px;
  height: 18px;
  flex: none;
}
.chsearch input {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  height: 100%;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
  font-size: 15px;
  outline: none;
}
.chpills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 12px 10px;
  scrollbar-width: none;
} /* The filter buttons: one line, slide sideways when many */
.chpills::-webkit-scrollbar {
  display: none;
}
.chpill {
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}
.chpill .ic {
  width: 14px;
  height: 14px;
}
.chpill b {
  font-weight: 700;
  opacity: 0.85;
}
.chpill.on {
  background: rgba(37, 211, 102, 0.16);
  border-color: rgba(37, 211, 102, 0.45);
  color: #25d366;
} /* The chosen filter is green */
.chlist {
  display: flex;
  flex-direction: column;
}
.chrow {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.chrow + .chrow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 77px;
  right: 0;
  border-top: 1px solid var(--line);
  opacity: 0.6;
} /* A thin line between rows, starting after the picture */
.chrow:hover,
.chrow:focus-visible {
  background: rgba(127, 127, 127, 0.12);
  outline: none;
}
.chrow:active {
  background: rgba(127, 127, 127, 0.2);
}
.chav {
  flex: none;
  width: 49px;
  height: 49px;
  border-radius: 50%;
  background: rgba(127, 127, 127, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  overflow: hidden;
} /* The round picture of the chat */
.chav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chbody {
  flex: 1;
  min-width: 0;
}
.chrow .cht,
.chrow .chp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chrow .cht b {
  min-width: 0;
  font-size: 1.02rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} /* Name: one line */
.chrow .cht .cxlbl {
  margin-left: 6px;
}
.chrow .tm {
  flex: none;
  font-size: 0.76rem;
  color: var(--muted);
}
.chrow.has .tm {
  color: #25d366;
  font-weight: 600;
} /* Time in green while there are unread messages */
.chrow .chp {
  margin-top: 3px;
}
.chrow .pv {
  min-width: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} /* Last message: one line */
.chrow .chmeta {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-style: normal;
}
.chrow .chmeta i {
  font-style: normal;
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
}
.chrow .chpin .ic {
  width: 14px;
  height: 14px;
}
.chrow .cbadge {
  background: #25d366;
  color: #08130c;
  font-weight: 800;
  font-size: 0.78rem;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
} /* Green unread number */
.chrow .chmore {
  margin: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
} /* The small three-dots button of a row */
.chrow .chmore:hover {
  background: rgba(127, 127, 127, 0.22);
}
.chnone {
  padding: 18px 16px;
  margin: 0;
  text-align: center;
}

/* ----- Top bar of an open chat: search icon and three-dots menu on the right (the old strip of buttons is gone) ----- */
.cx0 {
  display: none !important;
}
.cxacts {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.cxbtn {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}
.cxbtn:active {
  background: rgba(255, 255, 255, 0.14);
}
.cxbtn .ic {
  width: 22px;
  height: 22px;
}
.cxdots {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
}

/* ===================================================================
   RESPONSIVE LAYER - fits every phone, tablet and desktop screen.
   Text and spacing shrink on small phones, nothing gets cut off.
   =================================================================== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
} /* Stop phones from enlarging text on their own */
body {
  overflow-x: hidden;
  overflow-wrap: anywhere;
} /* No sideways scrolling; very long words wrap instead of being cut */
img,
video,
canvas,
svg,
iframe {
  max-width: 100%;
} /* Pictures and videos never go wider than the screen */
input,
select,
textarea,
button {
  max-width: 100%;
  min-width: 0;
} /* Fields and buttons shrink to fit instead of overflowing */
.wrap {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
} /* Keep content away from the notch when the phone is turned sideways */
.fcard {
  height: auto;
  min-height: 132px;
} /* Cards grow with their text instead of hiding it */
.nav button {
  min-width: 0;
  font-size: clamp(8.5px, 2.7vw, 10px);
  line-height: 1.15;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
} /* Bottom menu labels shrink on narrow phones */
.qmap {
  grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
} /* Question map fits as many numbers as the screen allows */
#imgModal img.avbig,
#imgModal img {
  max-height: 80dvh;
} /* Picture viewer fits the visible screen */

/* Modern phones: use the really visible height (browser bars move) */
@supports (height: 100dvh) {
  .fcard,
  .splash {
    max-height: none;
  }
}

/* Small phones (360px and below): slightly smaller text and spacing */
@media (max-width: 359px) {
  .wrap,
  .nav,
  .topbar {
    zoom: 0.92;
  }
}
@media (max-width: 339px) {
  .wrap,
  .nav,
  .topbar {
    zoom: 0.87;
  }
  .grid2 {
    gap: 8px;
  }
}
@media (max-width: 319px) {
  .wrap,
  .nav,
  .topbar {
    zoom: 0.82;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
}

/* Phone turned sideways or very short screens: give chat and lists room */
@media (max-height: 500px) {
  .chatbox {
    height: calc(100dvh - 170px);
    min-height: 150px;
  }
  .selbar + .chatbox {
    height: calc(100dvh - 220px);
  }
  .hero {
    padding-top: 12px;
  }
  .wrap {
    padding-bottom: 84px;
  }
}

/* Big text set in the phone's accessibility settings: allow wrapping */
.mrow,
.row,
.card h3,
.card h4 {
  min-width: 0;
}

/* ===== Chat list: show full names (wrap to the next line instead of "...") ===== */
.chrow .cht,
.chrow .chp {
  align-items: flex-start;
}
.chrow .cht b {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.25;
} /* Name shows fully, on two lines if needed */
.chrow .pv {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.3;
} /* Last message: up to two lines */
.chrow {
  gap: 10px;
}
@media (max-width: 359px) {
  .chrow {
    padding: 9px 8px;
  }
}

/* ===================================================================
   HEADER TOOLS: colour switch + announcements bell (left of Account)
   =================================================================== */
.hdrtools {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 68px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 12;
} /* Sits on the left side of the round Account button */
.hdrtools.hidden,
html.kb .hdrtools,
html.chatfull .hdrtools {
  display: none;
} /* Hidden when logged out, while typing, and inside an open chat (like the Account button) */
.skinpill {
  position: relative;
  display: block;
  flex: none;
  width: 60px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: #170f10;
  box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.3);
  color: #fff;
  transition:
    box-shadow 0.2s,
    background 0.2s;
} /* The switch: dark pill with a glow ring */
.skinpill .skl,
.skinpill .skr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  color: rgba(255, 255, 255, 0.45);
}
.skinpill .skl {
  left: 8px;
}
.skinpill .skr {
  right: 8px;
} /* Two small dim moons, one on each side */
.skinpill .ic {
  width: 15px;
  height: 15px;
}
.skinpill .skknob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e11d2e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.22s cubic-bezier(0.3, 0.9, 0.3, 1),
    background 0.2s;
} /* The round knob that slides across */
.skinpill[aria-checked="true"] .skknob {
  transform: translateX(26px);
  background: #186aee;
}
.skinpill[aria-checked="true"] {
  background: #0f2242;
  box-shadow: 0 0 0 3px rgba(24, 106, 238, 0.35);
} /* Second position: Intouch colours */
.newsbell {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.newsbell .ic {
  width: 23px;
  height: 23px;
}
.newsbell .newsdot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3b9bff;
  box-shadow: 0 0 0 2px rgba(10, 9, 8, 0.55);
  display: none;
}
.newsbell.has .newsdot {
  display: block;
} /* Blue dot while there are unread announcements */
.hdrtools::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 8px;
  height: 26px;
  width: 1px;
  background: rgba(255, 255, 255, 0.22);
} /* Thin divider before the Account button */
@media (max-width: 359px) {
  .hdrtools {
    right: 62px;
    gap: 4px;
  }
  .skinpill {
    width: 54px;
    height: 29px;
  }
  .skinpill .skknob {
    width: 23px;
    height: 23px;
  }
  .skinpill[aria-checked="true"] .skknob {
    transform: translateX(23px);
  }
  .newsbell {
    width: 32px;
  }
}

/* Announcements panel (opens from the bell) */
.newsov {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 12px 12px;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.newsbox {
  width: min(440px, 100%);
  max-height: min(72dvh, 560px);
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 14px;
  animation: drop 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.newshd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.newsbd {
  overflow-y: auto;
  margin-top: 6px;
  min-height: 0;
}
.newsx {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.newsx .ic {
  width: 18px;
  height: 18px;
}

/* ===================================================================
   INTOUCH COLOURS (second option of the colour switch)
   Navy blue like the Intouch dashboard. The first option is the
   original red + black look and is not changed at all.
   =================================================================== */
html[data-skin="intouch"] {
  --bg: #0b1729;
  --card: #0d1a30;
  --card2: #0e1d38;
  --line: #132a4e;
  --red: #186aee;
  --red2: #3b82f6;
  --red-deep: #0f2242;
  --muted: #8fa3c4;
  background: #0b1729;
}
html[data-skin="intouch"] body::before {
  background:
    radial-gradient(
      620px 380px at 100% 0,
      rgba(24, 106, 238, 0.14),
      transparent 62%
    ),
    linear-gradient(180deg, #0b1729 0%, #0a1527 100%);
} /* Calm navy background instead of the red glow */
html[data-skin="intouch"] .nav {
  background: #10203e;
  border-top-color: #132a4e;
}
html[data-skin="intouch"] .nav button.active {
  background: rgba(24, 106, 238, 0.18);
  color: #fff;
}
html[data-skin="intouch"] .brandtl::before {
  background: rgba(16, 32, 62, 0.96);
}
html[data-skin="intouch"] .card,
html[data-skin="intouch"] .mlist {
  border-color: #132a4e;
}
html[data-skin="intouch"] input,
html[data-skin="intouch"] textarea {
  background: #0d1b33;
  border-color: #132a4e;
}
html[data-skin="intouch"] input:focus,
html[data-skin="intouch"] textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(24, 106, 238, 0.2);
}
html[data-skin="intouch"] .btn-red {
  box-shadow: 0 8px 20px -6px rgba(24, 106, 238, 0.5);
}
html[data-skin="intouch"] .btn-outline:hover {
  background: rgba(24, 106, 238, 0.1);
}
html[data-skin="intouch"] .logo {
  box-shadow: 0 10px 26px -8px rgba(24, 106, 238, 0.55);
}
html[data-skin="intouch"] .splash .sl {
  filter: drop-shadow(0 14px 30px rgba(24, 106, 238, 0.45));
}
html[data-skin="intouch"] .dvdl,
html[data-skin="intouch"] .bbtn.bk,
html[data-skin="intouch"] .linklike,
html[data-skin="intouch"] .topbar .linklike,
html[data-skin="intouch"] .lch .chip {
  border-color: #186aee;
}
html[data-skin="intouch"] .lch .chip.on {
  background: linear-gradient(135deg, #3b82f6, #186aee);
}
html[data-skin="intouch"] .sqwrap {
  background: linear-gradient(180deg, #0b1729 78%, rgba(11, 23, 41, 0));
}
html[data-skin="intouch"] .selbar {
  background: linear-gradient(135deg, #186aee, #10203e);
}
html[data-skin="intouch"] .dvframe-wrap .pgload .spinner {
  border-top-color: #186aee;
}
html[data-skin="intouch"] .acctbtn.active .acctc {
  border-color: #186aee;
}
html[data-skin="intouch"] .acctbtn .acctc {
  border-color: rgba(255, 255, 255, 0.32);
}
html[data-skin="intouch"] .hdrtools::after {
  background: #132a4e;
}
html[data-skin="intouch"] .newsbell .newsdot {
  box-shadow: 0 0 0 2px #0b1729;
}
html[data-skin="intouch"] .newsx {
  background: #132a4e;
}
