/* Quiz Maker on the web iOS kit (src/ioskit/ios.css): system grey lists and an indigo tint. The shared page
   (/quiz-maker/v/) has its own styles inside its HTML; this file is the editor, host mode and printing. */
:root { --canvas: #f2f2f7; --grouped: #f2f2f7; --tint: #4f46e5; --forest: #4f46e5; --coral: #4f46e5; --g1: #5b54f0; --g2: #3b2fb8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --canvas: #000; --grouped: #000; --tint: #9d9bff; --forest: #9d9bff; --coral: #5b54f0; } }
:root[data-theme="dark"] { --canvas: #000; --grouped: #000; --tint: #9d9bff; --forest: #9d9bff; --coral: #5b54f0; }
.c-tint { color: var(--tint); }
.qm-page { max-width: 760px; }
/* the title is the first thing you type */
.qm-head { padding: 0 4px 12px; display: flex; flex-direction: column; }
.qm-title, .qm-intro { display: block; width: 100%; min-width: 0; border: 0; outline: none; background: none; padding: 0; margin: 0; border-radius: 8px; -webkit-appearance: none; appearance: none; text-overflow: ellipsis; }
.qm-title { font: 700 30px/1.15 var(--sys); letter-spacing: -0.02em; min-height: 44px; }
.qm-intro { font-size: 16px; line-height: 22px; color: var(--text2); min-height: 44px; }
.qm-title::placeholder { color: var(--text3); }
.qm-intro::placeholder { color: var(--text3); }
.qm-title:focus-visible, .qm-intro:focus-visible { box-shadow: 0 0 0 6px var(--canvas), 0 0 0 8px color-mix(in srgb, var(--tint) 55%, transparent); }
.qm-sub { color: var(--text2); font-size: 14px; line-height: 18px; }
.qm-tabs { padding: 0 0 14px; }
.qm-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 4px; }
:root:root #app .qm-acts .btn-bordered { min-height: 50px; border-radius: 16px; }
.qm-acts .label svg { font-size: 16px; }
.qm-foot { margin: 4px 20px 18px; font-size: 13px; line-height: 18px; color: var(--text2); }
/* a question in the list: its number, its words, what kind it is, a handle to drag */
.q-row { padding: 0; align-items: stretch; transition: transform .18s var(--ease); background: var(--row); }
.q-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 11px 4px 11px 16px; text-align: left; min-height: 60px; }
.q-main:active { background: var(--fill2); }
.q-num { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font: 700 14px/1 var(--rounded); color: var(--tint); background: color-mix(in srgb, var(--tint) 13%, transparent); font-variant-numeric: tabular-nums; }
.q-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-q { font-size: 16.5px; line-height: 21px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.q-q.empty { color: var(--text3); font-weight: 400; }
.q-meta { font-size: 13px; line-height: 17px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-bad { color: var(--orange); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.q-grip { flex: none; width: 48px; min-height: 44px; display: grid; place-items: center; color: var(--text3); font-size: 19px; touch-action: none; cursor: grab; }
.q-grip:active { cursor: grabbing; color: var(--text2); }
.q-grip:focus-visible { outline: 3px solid var(--tint); outline-offset: -4px; border-radius: 12px; color: var(--tint); }
.q-main:focus-visible { outline: 3px solid var(--tint); outline-offset: -3px; border-radius: 14px; }
.q-row.dragging, .opt-row.dragging { z-index: 4; transition: none; box-shadow: 0 10px 28px rgba(0, 0, 0, .2); border-radius: 16px; }
.sorting .row::before { opacity: 0; }
.opt-row { transition: transform .18s var(--ease); background: var(--row); }
/* the kinds of question */
.q-form { padding-top: 0; }
.qt-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 2px; }
.qt-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--row); color: var(--text); font-size: 15px; font-weight: 500; box-shadow: 0 0 0 .5px var(--sep); transition: background .15s, color .15s; }
.qt-chip svg { font-size: 17px; color: var(--tint); }
.qt-chip.on { background: var(--coral); color: #fff; box-shadow: none; font-weight: 600; }
.qt-chip.on svg { color: #fff; }
.qt-chip:active { opacity: .7; }
.qt-chip:focus-visible, .opt-mark:focus-visible, .opt-x:focus-visible, .th-sw:focus-visible, .res-th:focus-visible { outline: 3px solid var(--tint); outline-offset: 2px; }
/* an option: is it right, its words, take it out */
.opt-row { gap: 4px; padding-left: 8px; padding-right: 4px; }
.opt-row .field { min-width: 0; }
.opt-row > .field:first-child { padding-left: 8px; }
.opt-mark { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.opt-mark svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; color: transparent; box-shadow: inset 0 0 0 2px var(--text3); transition: background .15s, box-shadow .15s; }
.opt-mark.sq svg { border-radius: 8px; }
.opt-mark.on svg { color: #fff; background: var(--green); box-shadow: none; }
.opt-n { flex: none; width: 36px; text-align: center; color: var(--text2); font: 600 15px/1 var(--rounded); font-variant-numeric: tabular-nums; }
.opt-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--text3); font-size: 20px; }
.opt-x:active, .opt-mark:active { opacity: .5; }
.opt-grip { width: 44px; }
/* colours for the shared quiz */
.th-row { gap: 0; justify-content: space-between; padding: 8px 10px; }
.th-sw { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 18px; background: linear-gradient(150deg, var(--a), var(--b)); box-shadow: inset 0 0 0 3px var(--row); border: 2px solid transparent; }
.th-sw.on { border-color: var(--a); }
.th-indigo { --a: #5b54f0; --b: #3b2fb8; } .th-ocean { --a: #1d8fdb; --b: #0a5a96; } .th-forest { --a: #1f9d5a; --b: #0e5f33; } .th-sunset { --a: #f0742e; --b: #b53a0b; } .th-berry { --a: #d9408c; --b: #8f1857; } .th-slate { --a: #55657d; --b: #1f2a3b; }
.quiz-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(150deg, var(--a, #5b54f0), var(--b, #3b2fb8)); font-size: 21px; }
/* results */
.res-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 4px; }
.res-cards > div { padding: 14px 8px 12px; border-radius: 20px; background: var(--row); text-align: center; min-width: 0; }
.res-cards b { display: block; font: 700 26px/1.1 var(--rounded); font-variant-numeric: tabular-nums; }
.res-cards span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-wrap { display: block; padding: 0; overflow-x: auto; }
.res-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.res-table th { padding: 0; font-size: 12.5px; font-weight: 600; color: var(--text2); text-align: left; border-bottom: .5px solid var(--sep); white-space: nowrap; }
.res-table th.r-score { padding: 0 8px; text-align: right; }
.res-th { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 0 8px; font-size: 12.5px; font-weight: 600; color: var(--text2); }
.res-th.on { color: var(--tint); }
.res-th svg { font-size: 11px; }
.res-table td { padding: 10px 8px; border-bottom: .5px solid var(--sep); vertical-align: middle; font-size: 16px; }
.res-table tbody tr:last-child td { border-bottom: 0; }
.res-table .r-rank { width: 44px; padding-left: 16px; color: var(--text2); font-weight: 600; }
.res-table th.r-rank { padding-left: 8px; }
.res-table .r-name { width: 46%; overflow-wrap: anywhere; font-weight: 600; }
.res-table .r-name small { display: block; font-size: 12.5px; font-weight: 400; color: var(--text2); }
.res-table .r-name small.ok { color: var(--green); font-weight: 500; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .res-table .r-name small.ok { color: #1c7c3c; } }
:root[data-theme="light"] .res-table .r-name small.ok { color: #1c7c3c; }
.res-table td.r-score { text-align: right; white-space: nowrap; }
.res-table td.r-score small { display: block; font-size: 12.5px; color: var(--text2); }
.res-table .r-time, .res-table .r-when { white-space: nowrap; color: var(--text2); font-size: 15px; }
.res-table td.r-when, .res-table th.r-when { padding-right: 14px; }
@media (max-width: 430px) { .res-table .r-when { display: none; } .res-table td.r-time { padding-right: 16px; } }
.per-row { gap: 12px; padding-top: 10px; padding-bottom: 10px; align-items: center; }
.per-n { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font: 700 13px/1 var(--rounded); color: var(--tint); background: color-mix(in srgb, var(--tint) 13%, transparent); }
.per-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.per-q { font-size: 15.5px; line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.per-bar { display: block; height: 6px; border-radius: 3px; background: var(--fill2); overflow: hidden; }
.per-bar i { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.per-c { flex: none; text-align: right; min-width: 56px; }
.per-c b { display: block; font: 700 17px/1.2 var(--rounded); font-variant-numeric: tabular-nums; }
.per-c small { font-size: 12.5px; color: var(--text2); }
/* welcome and empty states */
.starter { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 4px 22px; }
.starter.qm-first { padding-top: 6px; }
.starter-art { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; color: #fff; font-size: 34px; background: linear-gradient(150deg, var(--g1), var(--g2)); margin-bottom: 8px; box-shadow: 0 8px 20px rgba(59, 47, 184, .28); }
.starter h2 { font: 700 28px/1.12 var(--sys); letter-spacing: -0.02em; margin: 0; }
.starter p { color: var(--text2); font-size: 16px; line-height: 22px; margin: 0 0 8px; max-width: 560px; }
.starter-acts { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; }
:root:root #app .starter-acts .btn-primary, :root:root #app .starter-acts .btn-bordered { min-height: 50px; border-radius: 16px; }
.starter .starter-note { font-size: 13px; line-height: 18px; margin: 12px 0 0; }
/* sharing */
.qr-box { display: grid; place-items: center; padding: 18px; }
.qr-box canvas { width: 240px; height: 240px; image-rendering: pixelated; background: #fff; border-radius: 16px; padding: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.url-box { font: 13px/1.45 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text2); overflow-wrap: anywhere; max-height: 5.8em; overflow: hidden; }
.paste-ex { margin: 0; font: 13px/1.5 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text2); white-space: pre-wrap; overflow-wrap: anywhere; }
.st-bars { display: flex; align-items: flex-end; gap: 2px; height: 80px; width: 100%; } .st-bars i { flex: 1; background: var(--tint); border-radius: 2px 2px 0 0; min-height: 2px; }
.st-big { display: flex; gap: 0; } .st-big > div { flex: 1; text-align: center; } .st-big b { display: block; font: 700 24px/1.2 var(--rounded); } .st-big span { font-size: 12px; color: var(--text2); }
/* try it: the real shared page in a frame (a phone-sized one on a wide window) */
.qm-try .screen-body { padding: 0; overflow: hidden; display: flex; }
.try-wrap { flex: 1; display: flex; justify-content: center; min-height: 0; }
.try-frame { flex: 1; width: 100%; height: 100%; border: 0; background: var(--canvas); }
@media (min-width: 700px) and (min-height: 620px) { .try-wrap { padding: 4px 0 22px; } .try-frame { flex: none; width: 400px; border-radius: 34px; box-shadow: 0 0 0 9px var(--row), 0 0 0 10px var(--sep), 0 24px 60px rgba(0, 0, 0, .18); } }
/* ---------- host mode: a dark stage for a projector or a TV ---------- */
.qm-host .navbar { display: none; }
.qm-host .screen { padding-top: 0; background: #0d0b1f; }
.qm-host .screen-body { padding: 0; overflow: hidden; display: flex; }
.hs { --hl: #a9a6ff; flex: 1; min-width: 0; display: flex; flex-direction: column; color: #fff; background: radial-gradient(120% 90% at 85% -10%, #3a2fa8 0%, transparent 60%), radial-gradient(90% 70% at -10% 110%, #5a1f7a 0%, transparent 55%), #0d0b1f; padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); font-size: clamp(15px, 1.6vmin + 6px, 26px); color-scheme: dark; }
.hs-bar { flex: none; display: flex; align-items: center; gap: 10px; min-height: 48px; }
.hs-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.hs-title b { font-size: clamp(15px, 1.4vmin + 6px, 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-title span { font-size: clamp(13px, 1.1vmin + 5px, 19px); color: rgba(255, 255, 255, .66); }
.hs-ic, .hs-pill { flex: none; height: 44px; min-width: 44px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 16px; font-weight: 600; }
.hs-ic svg { font-size: 19px; } .hs-pill { padding: 0 15px; } .hs-pill svg { font-size: 18px; }
.hs-ic:active, .hs-pill:active, .hs-btn:active:not(:disabled), .hs-mark:active { opacity: .65; }
.hs-clock { flex: none; padding: 0 14px; height: 44px; display: grid; place-items: center; border-radius: 22px; background: rgba(255, 255, 255, .12); font: 700 clamp(17px, 1.8vmin + 6px, 30px)/1 var(--rounded); font-variant-numeric: tabular-nums; }
.hs-clock.low { background: #ff5a4d; }
.hs-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 1720px; margin: 0 auto; padding: 1.5vmin clamp(0px, 3vw - 20px, 70px); }
.hs-eyebrow { margin: 0 0 .5em; font-size: clamp(13px, .9vw + .6vh, 26px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hl); }
.hs-q { margin: 0 0 .7em; font: 800 clamp(26px, 3.3vw + 1.7vh, 96px)/1.1 var(--sys); letter-spacing: -0.022em; overflow-wrap: anywhere; text-wrap: balance; }
.hs-q.long { font-size: clamp(21px, 1.9vw + 1.2vh, 54px); line-height: 1.18; }
.hs-opts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1.6vmin, 22px); }
.hs-opts li { display: flex; align-items: center; gap: .7em; min-width: 0; padding: .62em .8em; border-radius: .9em; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12); font: 650 clamp(18px, 1.9vw + 1.1vh, 54px)/1.2 var(--sys); transition: opacity .3s, background .3s, transform .3s var(--ease); }
.hs-opts li span { min-width: 0; overflow-wrap: anywhere; }
.hs-opts li b { flex: none; width: 1.75em; height: 1.75em; border-radius: .5em; display: grid; place-items: center; background: rgba(255, 255, 255, .16); font: 800 .8em/1 var(--rounded); }
.hs-opts li.dim { opacity: .32; }
.hs-opts li.right { background: #1f9d55; box-shadow: 0 .3em 1.2em rgba(31, 157, 85, .45); transform: scale(1.012); }
.hs-opts li.right b { background: rgba(255, 255, 255, .25); }
.hs-opts.many li { font-size: clamp(16px, 1.5vw + .9vh, 42px); }
.hs-answer { align-self: flex-start; max-width: 100%; padding: .55em .9em; border-radius: .8em; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12); font: 700 clamp(20px, 2.3vw + 1.3vh, 66px)/1.2 var(--sys); overflow-wrap: anywhere; }
.hs-answer .wait { font-weight: 500; color: rgba(255, 255, 255, .6); font-size: .7em; }
.hs-answer.on { background: #1f9d55; box-shadow: 0 .3em 1.2em rgba(31, 157, 85, .45); }
.hs-why { margin: 1em 0 0; font-size: clamp(16px, 1.3vw + .8vh, 38px); line-height: 1.35; color: rgba(255, 255, 255, .82); overflow-wrap: anywhere; }
.hs-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 1.1em 0 0; font-size: clamp(14px, .8vw + .6vh, 24px); }
.hs-marks > span { color: rgba(255, 255, 255, .7); margin-right: 4px; }
.hs-mark { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px 0 12px; border-radius: 23px; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; max-width: 100%; }
.hs-mark svg { font-size: 1.3em; flex: none; } .hs-mark span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-mark[aria-pressed="true"] { background: #fff; color: #17133a; } .hs-mark[aria-pressed="true"] svg { color: #1f9d55; }
.hs-foot { flex: none; display: flex; align-items: center; gap: 12px; padding-top: 10px; }
.hs-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px; border-radius: 26px; background: rgba(255, 255, 255, .12); color: #fff; font: 650 clamp(16px, 1.3vmin + 6px, 24px)/1 var(--sys); }
.hs-btn.pri { background: #fff; color: #17133a; padding: 0 24px; }
.hs-btn:disabled { opacity: .3; }
.hs-btn svg { font-size: .95em; }
.hs-keys { flex: 1 1 auto; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .45); }
@media (pointer: coarse) { .hs-keys { visibility: hidden; } }
.hs-board { flex: 1 1 auto; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.hs-board li { flex: none; display: flex; align-items: center; gap: 8px; max-width: 240px; padding: 7px 12px; border-radius: 16px; background: rgba(255, 255, 255, .1); font-size: clamp(13px, 1.1vmin + 5px, 20px); }
.hs-board li i { display: none; } .hs-board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hs-board li b { font: 800 1.15em/1 var(--rounded); font-variant-numeric: tabular-nums; }
.hs-board.big { flex: none; flex-direction: column; align-items: stretch; gap: clamp(8px, 1.4vmin, 18px); width: 100%; max-width: 1100px; overflow: visible; }
.hs-board.big li { max-width: none; padding: .6em .9em; border-radius: .8em; font-size: clamp(18px, 1.9vw + 1.1vh, 50px); font-weight: 650; gap: .7em; }
.hs-board.big li i { display: grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: .5em; background: rgba(255, 255, 255, .16); font: 800 .8em/1 var(--rounded); font-style: normal; }
.hs-board.big li span { flex: 1; } .hs-board.big li.win { background: #fff; color: #17133a; } .hs-board.big li.win i { background: #ffd24a; }
.hs-end { align-items: flex-start; }
@media (max-width: 640px) { .hs-opts { grid-template-columns: 1fr; } .hs-pill span { display: none; } .hs-pill { padding: 0; } .hs-btn:not(.pri) span { display: none; } .hs-btn:not(.pri) { padding: 0; width: 52px; } .hs-foot { flex-wrap: wrap; } .hs-board:not(.big) { order: -1; flex-basis: 100%; justify-content: flex-start; } .hs-btn.pri { flex: 1; } .hs-keys { display: none; } }
@media (max-height: 460px) { .hs-main { justify-content: flex-start; } .hs-q { font-size: clamp(20px, 5.4vh, 34px); margin-bottom: .5em; } .hs-opts li { font-size: clamp(15px, 4.2vh, 24px); padding: .45em .7em; } .hs-eyebrow { margin-bottom: .3em; } .hs-foot { padding-top: 6px; } .hs-btn { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .hs-opts li, .q-row, .opt-row { transition: none; } .hs-opts li.right { transform: none; } }
/* /mobile.js gives every button on a phone a 40 px floor, which would also pull these taller ones down to 40 */
:root:root #app .hs-btn { min-height: 52px; } :root:root #app .hs-mark { min-height: 46px; } :root:root #app .qt-chip, :root:root #app .res-th, :root:root #app .q-grip { min-height: 44px; } :root:root #app .q-main { min-height: 60px; }
@media (max-height: 460px) { :root:root #app .hs-btn { min-height: 44px; } }
/* printing: only #print, black on white */
#print { display: none; }
@media print {
  @page { margin: 14mm; }
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  body > *:not(#print) { display: none !important; }
  #print { display: block !important; }
}
