/* Quick Fire v3: drafting, statute index, scenario sets, accounts. Loaded after v22.css. */

/* badges on the question card: content kind and the Act */
.badge.info{border-color:var(--gold-dim);color:#5d4c14;background:rgba(199,162,72,.18);}
.badge.ctx{border-style:dashed;color:#4a5266;border-color:#8c93a8;max-width:100%;white-space:normal;}

/* practice modes */
.modecard{margin:10px 0;}
.modecard h3{margin-top:0;}
.modecard select{width:100%;}
#modes .switch{margin-top:6px;}

/* scenario sets: the scenario stays on screen while the tied questions are answered in order */
.scenariopin{position:sticky;top:0;z-index:7;margin:0 0 12px;}
.scenariopin .pin{background:var(--surface);border:1px solid var(--gold-dim);border-radius:12px;padding:10px 14px;box-shadow:0 6px 18px rgba(0,0,0,.25);max-height:42vh;overflow:auto;}
.scenariopin summary{cursor:pointer;font-size:.9rem;}
.scenariopin .pintext{margin:8px 0 2px;line-height:1.55;font-size:.95rem;}

/* drafting: a text box, the model answer beside it, then a self-marked tick-list */
.draft-scenario{background:#fff;border:1px solid var(--parchment-dim);border-left:4px solid var(--gold);border-radius:8px;padding:10px 14px;margin:0 0 12px;}
.draft-scenario p{margin:4px 0 0;line-height:1.5;}
.draftbox{min-height:200px;font-size:1rem;line-height:1.5;}
.draftcmp{display:grid;grid-template-columns:1fr;gap:12px;margin:12px 0;}
@media (min-width:760px){.draftcmp{grid-template-columns:1fr 1fr;}}
.draftcol h4{margin:0 0 6px;font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;}
.draftcol pre{margin:0;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;font:inherit;font-size:.92rem;line-height:1.5;background:#fff;color:var(--ink);border:1px solid var(--parchment-dim);border-radius:8px;padding:12px;}
.draftmodel{border-left:4px solid var(--gold) !important;}
.draftcheck{background:#fff;border:1px solid var(--parchment-dim);border-radius:10px;padding:8px 12px 12px;margin:10px 0;color:var(--ink);}
.draftcheck legend{font-weight:600;padding:0 6px;}
.dcheck{display:flex;gap:12px;align-items:flex-start;min-height:44px;padding:8px 2px;cursor:pointer;font-size:.98rem;line-height:1.4;}
.dcheck input{width:24px;height:24px;flex:none;margin-top:1px;accent-color:var(--green);}
.draftscore{font-weight:700;margin:8px 0 0;}
@media (max-width:480px){.draftbox{min-height:170px;}}

/* accounts */
.acct{max-width:520px;}
.acct label{display:block;margin:10px 0 4px;font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;}
.acct input[type=text],.acct input[type=email],.acct input[type=password]{width:100%;}
.acct .row-gap{margin-top:12px;}
.acct .okmsg{color:var(--text);border-left:3px solid var(--green);padding-left:10px;}
.acct .errmsg{border-left:3px solid var(--crimson);padding-left:10px;}
.sidenav .acctlink{margin-top:4px;}
.topright{display:flex;gap:8px;align-items:center;}
a.iconbtn{text-decoration:none;display:inline-block;}

/* v3.1: analytics consent bar and owner dashboard */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 560px; margin: 0 auto; padding: 12px 14px;
  background: var(--surface, #1b1b1f); color: var(--text, inherit); border: 1px solid var(--border, #444); border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.consent p { margin: 0 0 8px; }
@media (max-width: 899px) { .consent { bottom: 72px; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0; }
.stat { padding: 12px; border: 1px solid var(--border, #444); border-radius: 10px; }
.stat-n { font-size: 1.8rem; line-height: 1.1; }
ul.plain { list-style: none; padding: 0; margin: 6px 0; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid var(--border, #444); }

/* v3.1: live group tests, account screen */
.btn.danger { background: var(--crimson); color: #fff; }
.btn.danger:disabled { opacity: .5; }
/* An anchor styled as a button is inline by default, so its padding spilled over the text above it (the sign-in card). */
a.btn { display: inline-block; text-decoration: none; margin-top: 12px; }
.bigchoices { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 18px 0; }
@media (min-width: 700px) { .bigchoices { grid-template-columns: 1fr 1fr; } }
.bigchoice { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-height: 140px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }
.bigchoice:first-child { border-color: var(--gold); }
.bigchoice:hover, .bigchoice:focus-visible { background: var(--surface-2); outline: 2px solid var(--gold); }
.bigtitle { font-family: 'Lora', Georgia, serif; font-size: 1.6rem; font-weight: 700; }
.bigsub { color: var(--muted); font-size: .95rem; }
.codeinput { font-size: 2rem; letter-spacing: .4em; text-align: center; max-width: 11em; }
.lobbycode { font-family: 'Lora', Georgia, serif; font-size: clamp(3.5rem, 18vw, 7rem); letter-spacing: .12em; font-weight: 700; text-align: center; color: var(--gold); padding: 10px 0; }
.waiting { font-weight: 600; }
.tablewrap { overflow-x: auto; }
table.rank tr.me td { background: rgba(199,162,72,.18); font-weight: 700; }
.gridwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; max-width: 100%; }
table.qgrid { border-collapse: separate; border-spacing: 0; font-size: .85rem; }
table.qgrid th, table.qgrid td { padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--line); min-width: 36px; }
table.qgrid th.sticky { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 90px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.qgrid tr.me th.sticky { background: var(--surface-2); }
.qhead { min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font-weight: 700; cursor: pointer; }
.gcell { font-weight: 800; font-size: 1.05rem; }
.gcell.right { color: var(--chart-a); background: rgba(47,111,82,.22); }
.gcell.wrong { color: var(--chart-bad); background: rgba(154,49,64,.22); }
.gcell.none { color: var(--muted); }
.qdetail { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center; background: none; border: 0; color: var(--text); text-align: left; cursor: pointer; padding: 4px 0; font: inherit; }
.btrack { background: var(--bar-track); border-radius: 6px; height: 14px; overflow: hidden; }
.bfill { display: block; height: 100%; background: var(--chart-a); }
.bar.hard .bfill { background: var(--chart-bad); }
.bar.hard .bl::after { content: ' !'; }
.bl, .bv { font-size: .85rem; font-variant-numeric: tabular-nums; }
.stats .stat { text-align: left; }

/* Join and host forms: each label sits above its field, never beside it (the code box used to wrap next to its label) */
#join form label { display: block; margin: 16px 0 6px; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
#join form input[type="text"] { display: block; width: 100%; max-width: 22em; }
#join form .codeinput { max-width: 11em; }
.conn { font-size: .78rem; }

/* v3.1: owner dashboard account cards */
.acctcard h4 { margin: 0 0 4px; font-size: 1.05rem; }
.acctcard p { margin: 2px 0; }
#acctSearch { width: 100%; max-width: 420px; margin: 8px 0; }

/* First-run tour and install help */
.tour-dots{display:flex;gap:6px;margin-bottom:6px;}
.tour-dots span{width:8px;height:8px;border-radius:50%;background:var(--line);}
.tour-dots span.on{background:var(--gold);}
.tour-count{margin:0 0 8px;}
.tour p{line-height:1.5;}
.tour-os{border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin:10px 0;}
.tour-os summary{cursor:pointer;font-weight:600;}
.tour-os ol{padding-left:20px;margin:6px 0;}
.tour-os li{margin:4px 0;}

/* Class tests: one clock for the whole paper */
.timerwrap.exam{height:auto;background:transparent;overflow:visible;}
.examtrack{height:6px;background:var(--surface-2);border-radius:999px;overflow:hidden;}
.examclock{margin-top:6px;font-size:.82rem;color:var(--muted);font-variant-numeric:tabular-nums;}
.modchips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;}
.modchip{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:8px 14px;cursor:pointer;}
.modchip input{accent-color:var(--gold);}

/* Play hub and the centre Play button */
.modegrid{display:grid;gap:12px;margin:16px 0;}
@media (min-width:700px){.modegrid{grid-template-columns:1fr 1fr;}}
.modecard{display:flex;align-items:center;gap:14px;text-align:left;width:100%;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--text);font:inherit;cursor:pointer;}
.modecard:hover{border-color:var(--gold);}
.modecard .mico{display:inline-flex;flex:0 0 auto;width:44px;height:44px;border-radius:12px;background:var(--surface-2);color:var(--gold);align-items:center;justify-content:center;}
.modecard .mico svg{width:24px;height:24px;}
.modecard .mtxt{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;}
.modecard .mt{font-weight:700;font-size:1.05rem;}
.modecard .ms{font-size:.85rem;color:var(--text-dim);}
.modecard .mn{font-size:.78rem;color:var(--muted);white-space:nowrap;}
.tabbar .newtest[aria-current="page"]{box-shadow:0 0 0 2px var(--gold);}
.newtest .ico svg{width:22px;height:22px;}

.modegrid.top{grid-template-columns:1fr 1fr;}
.modecard.tall{flex-direction:column;align-items:flex-start;}
/* Phone bar: PLAY is a flat rounded rectangle in line with the other tabs, no longer raised */
.tabbar .newtest{flex:0 0 auto;flex-direction:row;gap:8px;min-width:132px;margin:0 4px;padding:10px 20px;border-radius:14px;transform:none;box-shadow:none;align-self:center;min-height:44px;}
.tabbar .newtest .lbl{font-size:.85rem;letter-spacing:.06em;}
@media (min-width:900px){ .side-sub{display:flex;flex-direction:column;gap:2px;margin:0 0 10px;padding-left:10px;border-left:1px solid var(--line);} }
.modegrid:not(.top){grid-template-columns:1fr;}
.classbtn[aria-pressed="true"]{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold) inset;}
