/*
  Static clone of the live HeyHi online quiz (demo.heyhi.sg, measured 2026-12-02 at 1440 px wide).
  Values come from the production SCSS (sj-onlinequiz resources/sass/template/_user.scss) and
  from computed styles on the live page. The demo branch turns on Poppins inside the quiz
  (.usePoppinsFont, BRANCH_USE_SINGLE_STORIED_FONT), so the quiz screen uses Poppins and the
  landing card uses Montserrat + Nunito Sans, as live.
*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Nunito+Sans:wght@400;700&family=Poppins:wght@400;700&display=swap");

@font-face {
  font-family: "Feather";
  src: url("../assets/fonts/Feather.woff") format("woff"), url("../assets/fonts/Feather.ttf") format("truetype");
  font-display: block;
}

:root {
  /* The quiz is light only, as live; keeps native controls and <dialog> light in a dark-mode browser */
  color-scheme: light;

  /* Production SCSS variables (_user.scss) */
  --blue-first: #0fb0f8;
  --blue-nd: #302574;
  --blue-5th: #ddefff;
  --blue-bar: #53caff;
  --gray-first: #8a8a8a;
  --gray-nd: #616161;
  --gray-rd: #e0e0e0;
  --green-first: #16d8a7;
  --green-nd: #00e676;
  --green-rd: #dbfbe5;
  --yellow-th: #ffb300;
  --yellow-header: #fec53c;
  --yellow-arrow: #ffca6c;
  --red-first: #ff1744;
  --ink: #12263f;
  --page: #f6f8fa;
  --progress-track: #edf2f9;

  --font-first: "Montserrat", sans-serif;
  --font-second: "Nunito Sans", sans-serif;
  --font-poppins: "Poppins", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Light scrollbars and controls even when the host (e.g. the artifact viewer in dark mode)
   sets color-scheme: dark on the root: set it on every element that scrolls, too. */
html,
body,
.sidebar,
.sidebar-mobile,
.modal,
textarea,
select {
  color-scheme: light !important;
}
/* Scrolling lists: thin light scrollbar in production's own colours (_user.scss dropdown scrollbar) */
.sidebar,
.sidebar-mobile {
  scrollbar-width: thin;
  scrollbar-color: #ced4da #f8f9fa;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-first);
}
h1,
h2,
h4,
h5,
p,
ul {
  margin: 0;
}
button {
  font: inherit;
  cursor: pointer;
}
.fe {
  font-family: "Feather" !important;
  font-style: normal;
  font-weight: normal;
  -webkit-font-smoothing: antialiased;
}
.fe-x::before { content: "\ea02"; }
.fe-chevron-left::before { content: "\e92f"; }
.fe-chevron-right::before { content: "\e930"; }
.fe-chevron-down::before { content: "\e92e"; }
.fe-paperclip::before { content: "\e9a3"; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

/* Shared production button (.btn.btn-primary) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--blue-first);
  border-radius: 16px;
  background: var(--blue-first);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.btn-primary:hover {
  filter: brightness(0.95);
}
.btn-primary:disabled {
  opacity: 0.65;
  cursor: default;
}

/* ============ Landing (quiz.vue before the quiz starts) ============ */
.landing-header {
  position: relative;
  height: 100px;
  background: var(--blue-first) url("../assets/images/bg-smartjen.png");
}
.landing-header__icon {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 68px;
  height: 68px;
  transform: translateX(-50%);
}
.exit-quiz {
  position: absolute;
  top: 12px;
  right: 72px;
  display: inline-flex;
  align-items: center;
  padding: 4px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--yellow-th);
  color: #fff;
  font: 700 18px/27px var(--font-first);
  text-decoration: none;
}
.exit-quiz .fe {
  padding-right: 8px;
  font-size: 17px;
}
.landing-card {
  position: relative;
  width: 864px;
  max-width: calc(100% - 32px);
  margin: -16px auto 40px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.06);
}
.landing-card .subti {
  margin-bottom: 9px;
  color: var(--green-first);
  font: 700 12px/16px var(--font-first);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.landing-card .ti {
  margin-bottom: 15px;
  color: var(--blue-nd);
  font: 700 34px/40px var(--font-first);
  letter-spacing: -0.02em;
}
.landing-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.landing-meta h4 {
  padding-bottom: 5px;
  color: var(--gray-nd);
  font: 700 12px/16px var(--font-first);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.landing-meta p {
  margin-bottom: 16px;
  color: var(--gray-nd);
  font: 400 16px/24px var(--font-second);
}
.landing-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.landing-actions .btn-primary {
  width: 240px;
  font: 700 16px/24px var(--font-first);
}
.landing-or {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 16px 0 8px;
  color: var(--gray-nd);
  font: 700 14px/24px var(--font-first);
}
.landing-or::before,
.landing-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-rd);
}
.link-upload {
  padding: 8px 0;
  border: 0;
  background: none;
  color: #12b0fa;
  font: 700 15px/1.5 var(--font-first);
}

/* ============ Quiz screen (quizcontainer.vue) ============ */
.quiz {
  font-family: var(--font-poppins);
}
.quiz-top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
}

/* Header: yellow memphis band, 62 px */
.quiz-header {
  position: relative;
  height: 62px;
  background: var(--yellow-header) url("../assets/images/bg-smartjen.png");
}
.header-title {
  padding: 15px 0;
  color: #fff;
  font: 700 20px/24px var(--font-poppins);
  text-align: center;
}
.header-title span {
  display: inline-block;
  max-width: 700px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.header-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 3px;
  padding: 10px 32px 10px 20px;
}
.header-actions .btn-primary {
  font: 700 14px/24px var(--font-poppins);
}

/* Progress + timer row, 61 px */
.quiz-navigation {
  display: flex;
  height: 61px;
  padding: 8px 0 8px 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.09);
  overflow: hidden;
}
.ques {
  flex: none;
  width: 210px;
  padding-left: 12px;
}
.ques .first {
  margin-bottom: 5px;
  color: var(--gray-nd);
  font: 700 12px/16px var(--font-poppins);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ques .second {
  color: var(--gray-nd);
  font: 400 14px/24px var(--font-poppins);
}
.protime {
  display: flex;
  flex: 1;
  gap: 20px;
}
.progress {
  flex: 1;
  height: 16px;
  margin-top: 14px;
  border-radius: 200px;
  background: var(--progress-track);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--blue-bar);
  transition: width 0.3s ease;
}
.times {
  flex: none;
  width: 125px;
  height: 38px;
  margin-top: 4px;
  padding: 0 7px;
  border-radius: 8px 0 0 8px;
  background: var(--blue-first) url("../assets/images/icon-times.png") no-repeat left 8px center;
}
.times span {
  display: block;
  margin-left: 25px;
  padding: 7px;
  background: var(--blue-5th);
  color: var(--blue-first);
  font: 400 16px/24px var(--font-poppins);
  font-variant-numeric: tabular-nums;
}

/* Question sidebar, 70 px, fixed under the top rows */
.sidebar {
  position: fixed;
  top: 123px;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 70px;
  padding: 20px 0 20px 15px;
  overflow: auto;
  background: #fff;
  box-shadow: 0 12px 24px rgb(18 38 63 / 0.03);
}
.step {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: gray;
  font-family: var(--font-poppins);
}
.step + .step {
  padding-top: 24px;
}
.circle {
  position: relative;
  width: 37px;
  height: 37px;
  border: 2px solid var(--gray-rd);
  border-radius: 100%;
  background: #fff;
  box-shadow: 0 0 0 3px #fff;
  color: var(--gray-nd);
  font-size: 16px;
  line-height: 33px;
  text-align: center;
}
.step-done .circle {
  border-color: var(--blue-first);
  color: var(--blue-first);
}
.step-active .circle {
  border-color: var(--blue-first);
  background: var(--blue-first);
  color: #fff;
  font-weight: 700;
}
/* Bookmarked: the circle becomes the flag shape */
.step-flag .circle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  border: 0;
  border-radius: 0;
  background: url("../assets/images/bg_flag_active.png") no-repeat top center;
  box-shadow: none;
  color: #fff;
  font-weight: 700;
}
.step-active.step-flag .circle {
  background: #fff url("../assets/images/bg_flag_active_selected.png") no-repeat top center;
  line-height: 25px;
}

/* Question area */
.question-content {
  width: calc(100% - 130px);
  margin-left: 80px;
  padding: 143px 18px 40px;
}
.qcard {
  position: relative;
  margin-bottom: 15px;
  border-radius: 19.2px;
  background: #fff;
  box-shadow: 0 12px 24px rgb(18 38 63 / 0.03);
}
.qcard-body {
  padding: 24px;
}
.arrowsticky {
  position: sticky;
  top: 143px;
  z-index: 20;
  height: 0;
}
.btn-arrow {
  position: absolute;
  top: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 35px;
  line-height: 52.5px;
}
.btn-arrow .fe {
  display: block;
  width: 35px;
  height: 35px;
  margin-top: 8px;
  line-height: 35px;
  background: var(--yellow-arrow);
}
.btn-arrow.prev-nav {
  right: 46px;
}
.btn-arrow.next-nav {
  right: 10px;
}
.btn-arrow.prev-nav .fe {
  border-radius: 4px 0 0 4px;
}
.btn-arrow.next-nav .fe {
  border-radius: 0 4px 4px 0;
}
.btn-arrow:disabled {
  color: var(--ink);
  opacity: 0.65;
  cursor: default;
}
.qcard h1 {
  margin-bottom: 15px;
  color: var(--ink);
  font: 700 34px/40px var(--font-poppins);
}
.ques-body {
  padding-bottom: 12px;
  color: var(--gray-nd);
  font: 400 18px/24px var(--font-poppins);
}
.quiz-instruction {
  line-height: normal;
}
.marked {
  margin-bottom: 16px;
  color: var(--gray-first);
  font: 400 14px/24px var(--font-poppins);
}

/* MCQ (label.custom-input) */
.custom-input {
  position: relative;
  display: flex;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--gray-rd);
  border-radius: 12px;
  background: #fff;
  color: var(--gray-nd);
  font-weight: 500;
  cursor: pointer;
}
.custom-input input {
  position: absolute;
  left: -6px;
  width: 100%;
  height: 28px;
  opacity: 0;
  cursor: pointer;
}
.custom-input p {
  display: flex;
  align-items: center;
  margin: 0;
  transition: 0.25s ease;
}
.custom-input p::before {
  content: "";
  display: flex;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-right: 0.375em;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 0.125em var(--gray-first);
  transition: 0.25s ease;
}
.custom-input input:checked + p::before {
  border: 3px solid #fff;
  box-shadow: inset 0 0 0 4px var(--blue-first);
}
.custom-input.select {
  border-color: var(--blue-first);
  background: var(--blue-first);
  color: #fff;
}
.custom-input:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* FITB: word box, numbered blanks */
.fitb-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 15px;
  width: 100%;
  margin: 0;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 12px;
  list-style: none;
}
.fitb-box li {
  width: calc((100% - 45px) / 4);
  text-align: center;
}
.fitb-text {
  line-height: 33px;
}
.fitb-number-answer {
  color: var(--red-first);
  font-weight: 700;
}
/* Free-text blank: grey underline, green and bold once answered */
.fitb-input {
  width: 90px;
  margin: 0 4px;
  padding: 0 6px;
  border: 0;
  border-bottom: 2px solid var(--gray-rd);
  background: none;
  color: var(--blue-bar);
  font: inherit;
  text-align: center;
}
.fitb-input:focus {
  outline: none;
  border-bottom-color: var(--blue-first);
}
.fitb-input.fitb-answered {
  border-bottom-color: #2abb9b;
  color: #2abb9b;
  font-weight: 700;
}
/* Other blanks of a multi-blank FITB (3B, 3C... while on 3A): a link to that sub-question
   with its answer on a grey underline, green and bold once answered (_user.scss .fitb-other-answer) */
.fitb-other-answer-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}
.fitb-other-answer-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.fitb-other-answer {
  position: relative;
  top: 5px;
  display: inline-block;
  min-width: 60px;
  padding: 0 15px;
  border-bottom: 2px solid var(--gray-rd);
  text-align: center;
}
.fitb-other-answer.fitb-answered {
  top: auto;
  border-bottom-color: #2abb9b;
  color: #2abb9b;
  font-weight: 700;
}
/* Blank with options: dropdown with a green border */
.fitb-select {
  margin: 2px 4px;
  padding: 6px 32px 6px 12px;
  border: 2px solid var(--green-first);
  border-radius: 5px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2312263f' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--ink);
  font: 400 18px/25.2px var(--font-poppins);
  appearance: none;
}
.fitb-select.is-placeholder {
  color: var(--gray-first);
}

/* OEQ: Bootstrap .form-control.textbox */
.textbox {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d2ddec;
  border-radius: 6px;
  color: var(--ink);
  font: 400 15px/1.5 var(--font-poppins);
  resize: vertical;
}
.textbox:focus {
  outline: none;
  border-color: var(--blue-first);
  box-shadow: 0 0 0 0.15rem rgb(15 176 248 / 0.25);
}

/* Tools beside the card (ul.option) */
.option {
  position: absolute;
  top: 25px;
  right: -44px;
  padding: 0;
  list-style: none;
}
.option li {
  padding-bottom: 4px;
}
.option button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: var(--blue-5th);
  color: var(--blue-first);
}
.option button img {
  width: 24px;
  height: 24px;
}
.option .fe {
  font-size: 24px;
}
.option button.is-raised {
  background: var(--green-rd);
}
/* Hover description (production popper) */
.option li {
  position: relative;
}
.popper {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.09);
  color: var(--ink);
  font-size: 13px;
  white-space: nowrap;
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.option li:hover .popper,
.option button:focus-visible + .popper {
  opacity: 1;
}

.feedback {
  display: block;
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--blue-first);
  font: 700 14px/16px var(--font-poppins);
}

/* Toast (.toast.bg-success-nd) */
.toast {
  position: fixed;
  top: 142px;
  right: 20px;
  z-index: 15;
  padding: 8px 16px 9px 50px;
  border-radius: 8px;
  background: var(--green-rd) url("../assets/images/icon-tick.png") no-repeat left 10px center;
  box-shadow: 0 4px 16px rgb(0 0 0 / 0.09);
  color: var(--green-nd);
  font-weight: 700;
}

/* Modals (.modal-content) */
.modal {
  width: min(500px, calc(100vw - 32px));
  padding: 32px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}
.modal::backdrop {
  background: rgb(0 0 0 / 0.5);
}
.modal h2 {
  margin-bottom: 10px;
  padding: 0 24px; /* clear of the close button */
  color: var(--blue-nd);
  font: 700 34px/40px var(--font-poppins);
}
.modal p {
  color: var(--blue-nd);
  font: 700 14px/24px var(--font-poppins);
}
.modal p.ndtype {
  color: var(--gray-nd);
  font: 400 16px/24px var(--font-poppins);
}
.modal .icon-thanks {
  display: block;
  max-width: 160px;
  margin: 16px auto;
}
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--gray-nd);
  font-size: 20px;
}

/* ============ Mobile (live, measured at 375 px wide) ============
   Phone layout from quizcontainer.vue: compact header, list icon + progress + timer row,
   no question sidebar (a full-screen question list opens from the list icon instead),
   lined-paper card, and the tools + yellow prev/next arrows in a bar fixed to the bottom. */
.fe-list::before { content: "\e985"; }
.btn-list,
.marrow,
.sidebar-mobile {
  display: none;
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }

  /* Header, 54 px: title left with ellipsis, small buttons right */
  .quiz-header {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 54px;
    padding: 0 8px 0 12px;
  }
  .header-title {
    flex: 1;
    min-width: 0;
    padding: 0;
    font-size: 18px;
    text-align: left;
  }
  .header-title span {
    display: block;
    max-width: 100%;
  }
  .header-actions {
    position: static;
    flex: none;
    padding: 0;
  }
  .header-actions .btn-primary {
    padding: 4px 8px;
    font-size: 11px;
    line-height: 24px;
  }

  /* Progress row, 58 px: list icon, bar, "0/178 (0.00%)", timer */
  .quiz-navigation {
    align-items: center;
    gap: 3px;
    height: 58px;
  }
  .ques,
  .protime {
    display: contents;
  }
  .ques .first {
    display: none;
  }
  .btn-list {
    display: block;
    order: 0;
    padding: 0 6px 0 0;
    border: 0;
    background: none;
    color: var(--blue-bar);
    font-size: 24px;
    line-height: 1;
  }
  .progress {
    order: 1;
    height: 10px;
    margin: 0 8px 0 4px;
  }
  .ques .second {
    order: 2;
    white-space: nowrap;
  }
  .times {
    order: 3;
    width: auto;
    min-width: 68px;
    margin: 0 0 0 8px;
  }
  .times span {
    font-size: 14px;
  }

  /* No desktop sidebar; the card takes the full width */
  .sidebar {
    display: none;
  }
  .question-content {
    width: 100%;
    margin: 0;
    padding: 136px 18px 84px;
  }
  .qcard {
    background: #fff url("../assets/images/bg_quiz.jpg");
  }
  .qcard h1 {
    font-size: 24px;
    line-height: 32px;
  }
  .ques-body {
    font-size: 16px;
  }
  .fitb-box li {
    width: auto;
  }
  .fitb-select {
    max-width: 100%;
    font-size: 16px;
  }

  /* The card arrows move to the bottom bar on a phone */
  .arrowsticky {
    display: none;
  }

  /* Tools + prev/next: bar fixed to the bottom, 60 px */
  .option {
    position: fixed;
    inset: auto 0 0;
    z-index: 12;
    display: flex;
    justify-content: center;
    height: 60px;
    background: #fff;
    box-shadow: 0 -4px 4px rgb(0 0 0 / 0.05);
  }
  .option li {
    padding: 8px 4px;
  }
  .option button {
    border-radius: 8px;
  }
  .popper {
    display: none;
  }
  .marrow {
    display: block;
  }
  .marrow button {
    width: 42px;
    padding: 0;
    background: var(--yellow-th);
    color: #fff;
    font-size: 22px;
  }
  .marrow button:disabled {
    opacity: 0.5;
    cursor: default;
  }

  .toast {
    top: 124px;
    right: 12px;
    left: 12px;
  }
  .modal {
    padding: 32px 20px 24px;
  }
  .modal h2 {
    padding: 0 16px;
    font-size: 26px;
    line-height: 32px;
  }

  /* Full-screen question list (sidebar-mobile) */
  .sidebar-mobile:not([hidden]) {
    position: fixed;
    inset: 54px 0 0;
    z-index: 20;
    display: block;
    padding: 20px;
    overflow: auto;
    background: #fff;
  }
  .list-close {
    display: block;
    margin: 0 0 6px auto;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 24px;
  }
  .list-title {
    margin-bottom: 16px;
    color: var(--blue-nd);
    font: 700 20px/22px var(--font-poppins);
  }
  .list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 15px;
  }
  .list-meta h3 {
    margin: 0;
    color: var(--gray-nd);
    font: 700 17px/19px var(--font-poppins);
    text-transform: uppercase;
  }
  .sidebar-mobile .progress {
    margin: 0 0 12px;
  }
  .sidebar-mobile hr {
    margin: 4px -20px 16px;
    border: 0;
    border-top: 1px solid #e3ebf6;
  }
  .step-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
  }
  .step-row .circle {
    display: block;
    flex: none;
  }
  .step-row__label {
    flex: 1;
    font-size: 15px;
  }
  .step-row img {
    width: 24px;
    height: 24px;
  }
}
