/* Logical Reasoning Assessment: shared styles for the candidate and admin pages.
   Brand color lives in --brand; change it in one place to rebrand. */
:root {
  --brand: #1f4e79; --brand-ink: #ffffff; --brand-soft: #e7eef6;
  --bg: #f6f7f9; --surface: #ffffff; --ink: #1c2430; --muted: #5a6472; --line: #dde1e6;
  --dot-on: #1c2430; --dot-off: #ffffff; --dot-ring: #1c2430;
  --ok: #1d7a3a; --warn: #b3261e; --warn-soft: #fbeceb; --amber: #8a5a00; --amber-soft: #fff4dc;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #6ea3d6; --brand-ink: #0d1620; --brand-soft: #1b2a3a;
    --bg: #0f141a; --surface: #161d25; --ink: #e6ebf0; --muted: #9aa5b1; --line: #2a3440;
    --dot-on: #e6ebf0; --dot-off: #161d25; --dot-ring: #c3ccd6;
    --ok: #6cc28a; --warn: #f08a80; --warn-soft: #3a1f1d; --amber: #f2c46b; --amber-soft: #3a2f17;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Arial, sans-serif; }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .bar { max-width: 920px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top h1 { font-size: 1rem; margin: 0; font-weight: 600; letter-spacing: .01em; }
main { max-width: 920px; margin: 0 auto; padding: 28px 20px 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card + .card { margin-top: 16px; }
h2 { font-size: 1.45rem; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 22px 0 8px; }
p { margin: 0 0 12px; max-width: 70ch; }
ul.rules { margin: 0 0 18px; padding-left: 20px; max-width: 70ch; }
ul.rules li { margin-bottom: 6px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; max-width: 420px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
input.code { font-family: ui-monospace, Consolas, monospace; font-size: 1.25rem; letter-spacing: .12em; text-transform: uppercase; max-width: 260px; }
button { font: inherit; cursor: pointer; }
.btn { background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 8px; padding: 11px 20px; font-weight: 600; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.danger { background: transparent; color: var(--warn); border: 1px solid var(--warn); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.err { color: var(--warn); font-weight: 600; min-height: 1.5em; margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.hidden { display: none !important; }
.notice { background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; max-width: 70ch; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; max-width: 70ch; }
.check input { margin-top: 5px; }

/* Timer */
.timer-btn { background: var(--brand-soft); color: var(--brand); border: 1px solid transparent; border-radius: 999px; padding: 6px 14px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 9.5em; }
.timer-btn.revealed { border-color: var(--brand); }
.final-minute { background: var(--warn-soft); color: var(--warn); text-align: center; padding: 8px 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Question */
.qhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; gap: 12px; }
.qhead h2 { margin: 0; }
.seq { --g: 104px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 26px; }
.cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; line-height: 0; }
.seq svg { width: var(--g); height: var(--g); }
.cell.blank { width: calc(var(--g) + 18px); height: calc(var(--g) + 18px); display: flex; align-items: center; justify-content: center; border: 2px dashed var(--brand); color: var(--brand); font-size: 2rem; font-weight: 700; line-height: 1; }
.opts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.opt { background: var(--surface); border: 2px solid var(--line); border-radius: 8px; padding: 8px 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink); }
.opt svg { width: 100%; max-width: 96px; height: auto; }
.opt:hover { border-color: var(--brand); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); }
.opt[aria-pressed="true"] b { color: var(--brand); }
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; gap: 12px; flex-wrap: wrap; }
.map { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.map button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .85rem; }
.map button.done { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.map button.cur { outline: 2px solid var(--ink); outline-offset: 2px; }
.save { font-size: .85rem; color: var(--muted); min-height: 1.3em; }
.save.bad { color: var(--warn); font-weight: 600; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(10, 15, 20, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 20; }
.modal .card { max-width: 460px; width: 100%; }

/* Admin */
.wide { max-width: 1180px; }
.grid2 { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 8px; }
table.list td { border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: top; }
table.list tr.pick { cursor: pointer; }
table.list tr.pick:hover td { background: var(--brand-soft); }
table.list tr.sel td { background: var(--brand-soft); }
.pill { display: inline-block; white-space: nowrap; border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 600; background: var(--line); color: var(--ink); }
.pill.issued { background: var(--brand-soft); color: var(--brand); }
.pill.started { background: var(--amber-soft); color: var(--amber); }
.pill.submitted { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.void { background: var(--line); color: var(--muted); }
.pill.flag { background: var(--warn-soft); color: var(--warn); }
.codebox { font-family: ui-monospace, Consolas, monospace; font-size: 1.6rem; letter-spacing: .12em; font-weight: 700; }
.linkbox { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
iframe.report { width: 100%; min-height: 400px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 12px; }

@media (max-width: 760px) {
  .opts { grid-template-columns: repeat(3, 1fr); }
  .seq { --g: 70px; gap: 6px; }
  .card { padding: 18px; }
  .grid2 { grid-template-columns: 1fr; }
}
