/* Gameficate Craft — Getting started: 🏠 Start here, ✨ the new-test questions, 🧩 What it has, 👉 the next-step guide,
   the step footer and ＋ Add question. */

/* ---------- Shared pieces ---------- */
.btn.big {
  height: 50px;
  padding: 0 24px;
  font-size: 17px;
  border-radius: 14px;
}
.big-in {
  width: 100%;
  height: 52px;
  font-size: 19px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  font-family: inherit;
  font-weight: 700;
  background: #fff;
}
.big-in:focus {
  border-color: var(--orange);
  outline: none;
}
.num-in {
  width: 90px;
  height: 40px;
  padding: 0 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-weight: 800;
}
.q-label {
  display: block;
  margin: 4px 0 6px;
  font-size: 14px;
  font-weight: 900;
  color: var(--navy);
}
.chips,
.lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
span.chip,
button.chip.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
span.chip small {
  color: var(--muted);
}
.chip-x {
  margin-left: 4px;
  color: var(--muted);
  font-weight: 900;
}
.chip-x:hover {
  color: var(--red);
}
button.chip.link:hover {
  border-color: var(--orange);
  color: var(--orange-d);
}

/* ---------- Pick-cards: the setup choices ---------- */
.pick-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.pick-cards.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px 14px 14px;
  text-align: start;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.pick-card:hover {
  border-color: #f6b28e;
}
.pick-card.on {
  border-color: var(--orange);
  background: #fff6f0;
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.15);
}
.pc-tick {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: #fff;
}
.pick-card[role='radio'] .pc-tick {
  border-radius: 50%;
}
.pick-card.on .pc-tick {
  background: var(--orange);
  border-color: var(--orange);
}
.pc-icon {
  font-size: 28px;
  line-height: 1.1;
}
.pick-card b {
  font-size: 16px;
  color: var(--navy);
  padding-right: 26px;
}
.pc-short {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}
.pc-eg {
  font-size: 12.5px;
  font-weight: 700;
  font-style: italic;
  color: #7f8fa0;
}
.pc-note {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color: var(--teal);
}
.pick-card:not(.on) .pc-note {
  color: #8a97a5;
}
.setup-sub {
  margin-top: 14px;
}
.setup-sub.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.setup-help {
  margin: -4px 0 12px;
}
.setup-now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--soft);
}
.setup-again p {
  margin-bottom: 10px;
}

/* ---------- ✨ Make a new test (wizard) ---------- */
.modal.wizard {
  width: min(980px, 96vw);
  max-height: 92vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.wiz-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.wiz-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 2px solid var(--line);
}
.wiz-dots {
  display: flex;
  gap: 8px;
  flex: 1;
}
.wiz-dots .dot {
  width: 34px;
  height: 8px;
  border-radius: 99px;
  background: var(--line);
}
.wiz-dots .dot.done {
  background: #f6b28e;
}
.wiz-dots .dot.on {
  background: var(--orange);
}
.wiz-x {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
  color: var(--muted);
}
.wiz-x:hover {
  background: var(--soft);
}
.wiz-main {
  padding: 22px 28px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
}
.wiz-icon {
  font-size: 40px;
  line-height: 1;
}
.wiz-main h2 {
  font-family: var(--display);
  font-size: 28px;
  color: var(--navy);
  margin: 8px 0 4px;
}
.wiz-lead {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 18px;
  max-width: 720px;
  line-height: 1.5;
}
.wiz-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-top: 2px solid var(--line);
  background: var(--soft);
}
.wiz-foot .spacer {
  flex: 1;
}
.sum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.sum-col h4,
.sum-like h4 {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 900;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sum-col h4:first-child {
  margin-top: 0;
}
.sum-name {
  font-family: var(--display);
  font-size: 22px;
  color: var(--navy);
}
.sum-steps {
  padding-left: 22px;
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.sum-steps li b {
  color: var(--navy);
  margin-right: 6px;
}
.sum-steps li span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.sum-like {
  margin-top: 18px;
  padding-top: 6px;
  border-top: 2px dashed var(--line);
}
.like-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.like-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: start;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.like-card:hover {
  border-color: var(--orange);
}
.like-card b {
  color: var(--navy);
}
.like-card span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- 🏠 Start here ---------- */
.welcome {
  max-width: 1100px;
  margin-bottom: 22px;
}
.wl-kicker,
.nc-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-d);
}
.welcome h1 {
  font-size: 40px;
  margin: 4px 0 2px;
}
.welcome .lead {
  font-size: 17px;
}
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 26px;
}
.how-steps li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
}
.how-steps b {
  color: var(--navy);
  font-size: 16px;
}
.how-steps span {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.wl-h2 {
  font-family: var(--display);
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 12px;
}
.start-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.start-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px;
  text-align: start;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
}
.start-card:hover,
.start-card:focus-visible {
  border-color: var(--orange);
  background: #fff8f3;
  outline: none;
}
.start-card.main {
  border-color: var(--orange);
  background: linear-gradient(160deg, #fff4ec, #fff);
  box-shadow: 0 6px 18px rgba(255, 122, 61, 0.18);
}
.start-card.main b::after {
  content: 'Recommended';
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  vertical-align: 2px;
}
.sc-icon {
  font-size: 30px;
}
.start-card b {
  font-size: 17px;
  color: var(--navy);
}
.start-card > span:not(.sc-icon) {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}
.start-cards.compact .start-card {
  flex-direction: row;
  align-items: center;
  padding: 12px 14px;
}
.start-cards.compact .sc-icon {
  font-size: 22px;
}
.start-cards.compact .start-card.main b::after {
  display: none;
}
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.cap {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 8px;
  padding: 10px 12px;
  background: var(--soft);
  border-radius: 14px;
}
.cap-icon {
  grid-row: span 2;
  font-size: 24px;
}
.cap b {
  color: var(--navy);
  font-size: 15px;
}
.cap span:not(.cap-icon) {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.4;
}
.home-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.home-name {
  font-family: var(--display);
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 4px;
}
.home-label {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- 👉 Next step ---------- */
.next-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(120deg, #17324d, #214667);
  color: #fff;
}
.next-card.done {
  background: linear-gradient(120deg, #13806f, #1e9e62);
}
.nc-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 34px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}
.nc-text {
  flex: 1;
  min-width: 0;
}
.next-card .nc-kicker {
  color: #ffc83d;
}
.nc-text h2 {
  font-family: var(--display);
  font-size: 26px;
  margin: 2px 0;
}
.nc-text p {
  font-size: 15px;
  font-weight: 700;
  color: #d8e4ef;
  line-height: 1.45;
}
.journey {
  list-style: none;
  display: grid;
  gap: 6px;
}
.journey li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}
.journey li.now {
  background: #fff4ec;
  box-shadow: inset 0 0 0 2px var(--orange);
}
.j-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--soft);
  font-size: 15px;
}
.journey li.done .j-mark {
  background: var(--green);
  color: #fff;
  font-weight: 900;
}
.j-title {
  flex: 1;
  font-weight: 800;
  color: var(--navy);
}
.journey li.done .j-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.next-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: -6px 0 18px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid #ffd2bb;
  max-width: 1100px;
}
.nb-label {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.nb-icon {
  font-size: 22px;
}
.nb-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.nb-text b {
  color: var(--navy);
}
.nb-text span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.step-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 2px dashed var(--line);
  max-width: 1100px;
}
.sf-k {
  font-weight: 700;
  opacity: 0.85;
}
.off-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: var(--soft);
}
nav.side button.icon-nav .num {
  font-size: 15px;
  background: #fff1e8;
}
nav.side button.icon-nav.on .num {
  background: var(--orange);
}

/* ---------- ＋ Add question ---------- */
.modal.addq-dialog,
.modal.new-dialog {
  width: min(880px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
}
.new-dialog .start-cards {
  margin-top: 12px;
}
.addq-groups {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}
.addq-way {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 900;
  color: var(--navy);
}
.addq-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}
.addq-type {
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 6px;
  padding: 10px 12px;
  text-align: start;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.addq-type:hover,
.addq-type:focus-visible {
  border-color: var(--orange);
  background: #fff8f3;
  outline: none;
}
.aq-icon {
  grid-row: span 2;
  font-size: 22px;
}
.addq-type b {
  color: var(--navy);
  font-size: 14.5px;
}
.addq-type span:not(.aq-icon) {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .how-steps,
  .home-cols,
  .sum-grid {
    grid-template-columns: 1fr;
  }
  .next-card {
    flex-wrap: wrap;
  }
}

/* Before a test is set up (🏠 welcome), the top bar keeps only what helps to begin: New, Open and the languages. */
body.not-ready #docTitle,
body.not-ready #status,
body.not-ready #undoBtn,
body.not-ready #redoBtn,
body.not-ready #exportBtn,
body.not-ready #previewBtn {
  display: none;
}

/* ---------- ⚡ Quick add (top of the Questions step) ---------- */
details.quick-add > summary {
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  color: var(--navy);
}
details.quick-add > summary::-webkit-details-marker {
  display: none;
}
details.quick-add > summary::before {
  content: '▸ ';
  color: var(--orange);
}
details.quick-add[open] > summary {
  margin-bottom: 12px;
}
details.quick-add[open] > summary::before {
  content: '▾ ';
}
.quick-add textarea,
.quick-add input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
}
.quick-add textarea {
  resize: vertical;
  min-height: 56px;
}
.quick-add textarea:focus,
.quick-add input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 61, 0.18);
}
.qa-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  gap: 10px;
  margin-top: 10px;
}
.qa-row .btn {
  height: auto;
}
.qa-guess {
  min-height: 20px;
  margin: 8px 0 4px;
  color: var(--teal);
}
@media (max-width: 900px) {
  .qa-row {
    grid-template-columns: 1fr;
  }
}
