/* Data Collection Form -- Freeride
   Light by default, dark when the OS asks for it. The logo is solid black, so
   it gets inverted in dark mode rather than disappearing into the background. */

:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --text: #16161a;
  --muted: #6c6c78;
  --line: #e3e3e8;
  --line-strong: #cfcfd6;
  --accent: #16161a;
  --accent-text: #ffffff;
  --focus: #2f6df6;
  --ok-bg: #e8f6ec;
  --ok-line: #a8d8b6;
  --ok-text: #14532d;
  --warn-bg: #fdf3e3;
  --warn-line: #eccf9a;
  --warn-text: #6b4a10;
  --err-bg: #fdecec;
  --err-line: #f0b4b4;
  --err-text: #8a1c1c;
  --info-bg: #ecf1fd;
  --info-line: #b9c8f2;
  --info-text: #1e3a8a;
  --logo-filter: none;
  --shadow: 0 1px 2px rgba(16, 16, 26, 0.05), 0 6px 20px rgba(16, 16, 26, 0.05);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e11;
    --surface: #17171b;
    --surface-2: #1c1c21;
    --text: #ececef;
    --muted: #9a9aa6;
    --line: #2b2b32;
    --line-strong: #3b3b44;
    --accent: #ececef;
    --accent-text: #16161a;
    --focus: #7ea3ff;
    --ok-bg: #12271a;
    --ok-line: #2c5c3c;
    --ok-text: #a7e0ba;
    --warn-bg: #2a2113;
    --warn-line: #5c4a25;
    --warn-text: #e8c78a;
    --err-bg: #2b1416;
    --err-line: #5f2b2f;
    --err-text: #f0a9a9;
    --info-bg: #14192b;
    --info-line: #2e3a63;
    --info-text: #b6c6f5;
    --logo-filter: invert(1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 940px; margin: 0 auto; padding: 28px 20px 140px; }
.page.narrow { max-width: 460px; padding-bottom: 60px; }

/* ---------- header ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand img { height: 30px; width: auto; display: block; filter: var(--logo-filter); }

h1 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 0;
}

.masthead .sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }

.logout {
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.logout:hover { color: var(--text); border-color: var(--text); }

/* ---------- messages ---------- */

.notice {
  border: 1px solid var(--info-line);
  background: var(--info-bg);
  color: var(--info-text);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14.5px;
}
.notice.ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-text); }
.notice.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }
.notice.err { border-color: var(--err-line); background: var(--err-bg); color: var(--err-text); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice strong { font-weight: 650; }
.notice .actions { margin-top: 10px; display: flex; gap: 8px; }

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card.tight { padding: 16px 22px; }

.qcard { position: relative; }

.qhead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.qnum {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.qcard.filled .qnum { color: var(--text); }

.qcard.filled::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}

/* ---------- fields ---------- */

label, .field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.hint { color: var(--muted); font-weight: 400; font-size: 12.5px; }

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 10px 12px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

textarea { resize: vertical; min-height: 78px; line-height: 1.5; }

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; }
.row > * { flex: 1 1 260px; min-width: 0; }

.row > .col-files { flex: 1 1 320px; }
.row > .col-asset { flex: 1 1 240px; }
/* Difficulty gets a row to itself so the five boxes always sit on one line. */
.row > .col-diff { flex: 1 1 100%; }

/* ---------- difficulty boxes ---------- */

.difficulty { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }

.difficulty input { position: absolute; opacity: 0; pointer-events: none; }

.difficulty label {
  margin: 0;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: baseline;
  gap: 6px;
  user-select: none;
  transition: all 0.12s ease;
  flex: 1 1 auto;
  justify-content: center;
  white-space: nowrap;
}

.difficulty label .lv { font-weight: 700; font-size: 12px; }

.difficulty label:hover { border-color: var(--text); }

.difficulty input:checked + label {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}

.difficulty input:focus-visible + label {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent);
}

/* ---------- files ---------- */

input[type="file"] { font: inherit; font-size: 13.5px; color: var(--muted); max-width: 100%; }

input[type="file"]::file-selector-button {
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 12px;
  margin-right: 10px;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
  max-width: 100%;
}

.chip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.chip .sz { color: var(--muted); font-variant-numeric: tabular-nums; }

.chip button {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 999px;
}
.chip button:hover { color: var(--err-text); background: var(--err-bg); }

.chip.pending { border-style: dashed; }

/* ---------- action bar ---------- */

.actionbar {
  position: sticky;
  bottom: 0;
  margin: 24px -20px -140px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.actionbar .counter { color: var(--muted); font-size: 13.5px; margin-right: auto; }
.actionbar .counter b { color: var(--text); font-variant-numeric: tabular-nums; }

button, .btn {
  font: inherit;
  font-size: 14.5px;
  font-weight: 550;
  border-radius: 9px;
  padding: 9px 18px;
  cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  transition: all 0.12s ease;
  text-decoration: none;
  display: inline-block;
}

button:hover, .btn:hover { border-color: var(--text); }

button:focus-visible, .btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 650;
}
.btn-primary:hover { opacity: 0.86; }

.btn-quiet { color: var(--muted); background: none; border-color: transparent; }
.btn-quiet:hover { color: var(--err-text); background: var(--err-bg); border-color: var(--err-line); }

.btn-small { font-size: 13px; padding: 6px 12px; }

/* ---------- login ---------- */

.login-wrap { min-height: 78vh; display: flex; align-items: center; }
.login-wrap .card { width: 100%; padding: 30px 28px; }
.login-wrap .brand { justify-content: flex-start; margin-bottom: 22px; }
.login-wrap h1 { font-size: 19px; }
.login-wrap p.lead { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.login-wrap button { width: 100%; margin-top: 14px; }

/* ---------- resume box ---------- */

.resume {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  border-top: 1px dashed var(--line-strong);
  margin-top: 16px;
  padding-top: 14px;
}
.resume .grow { flex: 1 1 220px; }
.resume label { color: var(--muted); }

/* ---------- thanks / summary ---------- */

.summary-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.summary-item:first-of-type { border-top: none; padding-top: 4px; }
.summary-item .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.tag {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--surface-2);
}
.tag.d1 { border-color: #9ad3ab; color: #256b3a; background: #eef8f1; }
.tag.d2 { border-color: #b7d99a; color: #4a6b1f; background: #f2f8ea; }
.tag.d3 { border-color: #e3cf94; color: #6b5514; background: #fbf6e9; }
.tag.d4 { border-color: #e9b58e; color: #7d4415; background: #fcf1e9; }
.tag.d5 { border-color: #e39a9a; color: #8a2020; background: #fbecec; }

@media (prefers-color-scheme: dark) {
  .tag.d1 { border-color: #2f5c3d; color: #a5dbb6; background: #14261a; }
  .tag.d2 { border-color: #4a5c2b; color: #cadd9f; background: #1e2413; }
  .tag.d3 { border-color: #5e5028; color: #e3ca92; background: #262013; }
  .tag.d4 { border-color: #6b4326; color: #eab48d; background: #2a1c12; }
  .tag.d5 { border-color: #6b3030; color: #e6a1a1; background: #2a1414; }
}

.big-check {
  font-size: 15px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
}

@media (max-width: 620px) {
  .page { padding: 20px 14px 150px; }
  .actionbar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .actionbar .counter { flex-basis: 100%; margin-bottom: 4px; }
  .difficulty { grid-template-columns: repeat(2, 1fr); }
  .difficulty label { justify-content: flex-start; }
  h1 { font-size: 18px; }
}

/* ---------- landing page ----------
   Its own black world. Everything is scoped under body.start-page so the rest of
   the app keeps its normal light/dark behaviour. */

body.start-page { background: #000; color: #f1f1f3; }

body.start-page .page.start {
  max-width: 400px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 20px;
}

/* The artwork is solid black on transparent, so on a black page it has to be
   inverted unconditionally. Deliberately NOT var(--logo-filter): that resolves
   to `none` in light mode, which would make the logo vanish entirely. */
.start-logo {
  display: block;
  width: min(320px, 70vw);
  height: auto;
  margin: 0 auto 44px;
  filter: invert(1);
}

body.start-page label,
body.start-page .field-label { color: #d6d6db; }

body.start-page input[type="text"] {
  background: #101014;
  border-color: #34343c;
  color: #f1f1f3;
}
body.start-page input[type="text"]::placeholder { color: #6a6a76; }
body.start-page input[type="text"]:focus {
  border-color: #8fa8ff;
  box-shadow: 0 0 0 3px rgba(143, 168, 255, 0.25);
}

body.start-page button { background: #101014; border-color: #34343c; color: #f1f1f3; }
body.start-page button:hover { border-color: #9a9aa6; }
body.start-page .btn-primary { background: #fff; color: #000; border-color: #fff; }

body.start-page .start-go { width: 100%; margin-top: 4px; padding: 12px 18px; font-size: 15px; }

body.start-page .start-resume {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px dashed #2c2c34;
}
.resume-row { display: flex; gap: 8px; }
.resume-row input { flex: 1 1 auto; }

body.start-page .notice { background: #14141a; border-color: #34343c; color: #d6d6db; }
body.start-page .notice.err { background: #2b1416; border-color: #5f2b2f; color: #f0a9a9; }
body.start-page .notice.warn { background: #2a2113; border-color: #5c4a25; color: #e8c78a; }
body.start-page .notice ul { margin: 4px 0 0; padding-left: 20px; }

.actions.stacked { flex-direction: column; align-items: stretch; }
.actions.stacked button { width: 100%; }

/* Model picker -- same hidden-radio pattern as the difficulty boxes above. */
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 26px;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  margin: 0;
  cursor: pointer;
  user-select: none;
  text-align: center;
  border: 1px solid #34343c;
  background: #101014;
  border-radius: 11px;
  padding: 16px 12px;
  transition: all 0.12s ease;
}
.choice label:hover { border-color: #7a7a86; }
.choice input:checked + label { background: #fff; color: #000; border-color: #fff; }
.choice input:focus-visible + label { box-shadow: 0 0 0 3px rgba(143, 168, 255, 0.4); }
.choice-name { display: block; font-size: 17px; font-weight: 650; }
.choice-sub {
  display: block;
  font-size: 11.5px;
  opacity: 0.62;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* ---------- question page ---------- */

.progress-pill {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}

.whoami { color: var(--muted); font-size: 13px; white-space: nowrap; }

.analyse-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.analyse-status {
  color: var(--muted);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.analyse-error { margin: 14px 0 0; }

.hint.block { display: block; margin: 0 0 14px; }

/* Filled in by hand after a model failure: say so rather than showing a bare box. */
.answer-block:empty::before {
  content: "No model answer — this question is being filled in by hand.";
  color: var(--muted);
  font-style: italic;
}

.answer-block {
  white-space: pre-wrap;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  max-height: 480px;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.62;
  margin-bottom: 20px;
}

/* ---------- rubric table ----------
   Colours reuse the difficulty-tag families above so the app stays coherent, and
   their dark-scheme counterparts come along with them. Colour is never the only
   signal: the select spells the level out. */

:root {
  --imp-critical-bg: #fbecec; --imp-critical-line: #e39a9a; --imp-critical-text: #8a2020;
  --imp-high-bg:     #fcf1e9; --imp-high-line:     #e9b58e; --imp-high-text:     #7d4415;
  --imp-medium-bg:   #fbf6e9; --imp-medium-line:   #e3cf94; --imp-medium-text:   #6b5514;
  --imp-low-bg:      #eef8f1; --imp-low-line:      #9ad3ab; --imp-low-text:      #256b3a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --imp-critical-bg: #2a1414; --imp-critical-line: #6b3030; --imp-critical-text: #e6a1a1;
    --imp-high-bg:     #2a1c12; --imp-high-line:     #6b4326; --imp-high-text:     #eab48d;
    --imp-medium-bg:   #262013; --imp-medium-line:   #5e5028; --imp-medium-text:   #e3ca92;
    --imp-low-bg:      #14261a; --imp-low-line:      #2f5c3d; --imp-low-text:      #a5dbb6;
  }
}

table.rubrics { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
table.rubrics th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
  padding: 0 10px 4px;
}
table.rubrics th.imp-col { width: 150px; }
table.rubrics th.rm-col { width: 44px; }
table.rubrics td {
  padding: 8px 10px;
  vertical-align: top;
  border: 1px solid transparent;
}
table.rubrics td:first-child { border-radius: 9px 0 0 9px; border-left-width: 4px; }
table.rubrics td:last-child { border-radius: 0 9px 9px 0; text-align: center; }
table.rubrics textarea {
  min-height: 52px;
  background: var(--surface);
  border-color: var(--line);
  font-size: 14px;
}

.rubric-row.imp-critical td { background: var(--imp-critical-bg); border-color: var(--imp-critical-line); }
.rubric-row.imp-high     td { background: var(--imp-high-bg);     border-color: var(--imp-high-line); }
.rubric-row.imp-medium   td { background: var(--imp-medium-bg);   border-color: var(--imp-medium-line); }
.rubric-row.imp-low      td { background: var(--imp-low-bg);      border-color: var(--imp-low-line); }

.rubric-row.imp-critical .imp-select { color: var(--imp-critical-text); font-weight: 650; }
.rubric-row.imp-high     .imp-select { color: var(--imp-high-text);     font-weight: 650; }
.rubric-row.imp-medium   .imp-select { color: var(--imp-medium-text);   font-weight: 650; }
.rubric-row.imp-low      .imp-select { color: var(--imp-low-text);      font-weight: 650; }

select.imp-select {
  font: inherit;
  font-size: 13.5px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text);
  cursor: pointer;
}
select.imp-select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent);
}

.rm-rubric {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 6px 9px;
  border-radius: 999px;
}
.rm-rubric:hover { color: var(--err-text); background: var(--err-bg); }

#add-rubric { margin-top: 4px; }

/* ---------- question rail ---------- */

.page.wide { max-width: 1120px; }

.qlayout {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.qnav {
  position: sticky;
  top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

/* Submit buttons rather than links, so switching questions saves first. */
.qnav-item {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 0;
  height: 27px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: all 0.12s ease;
}
.qnav-item:hover { border-color: var(--text); color: var(--text); }

.qnav-item.is-empty { opacity: 0.55; }
.qnav-item.is-written {
  color: var(--text);
  border-color: var(--line-strong);
  border-left: 3px solid var(--warn-line);
}
.qnav-item.is-analysed {
  color: var(--text);
  border-color: var(--line-strong);
  border-left: 3px solid var(--ok-line);
}
.qnav-item.is-current {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 700;
}

/* ---------- autosave signals ---------- */

/* Deliberately quiet: confirmation that nothing was lost, not an announcement. */
.saved-pill {
  font-size: 12px;
  color: var(--ok-text);
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  border-radius: 999px;
  padding: 3px 11px;
  white-space: nowrap;
  animation: fade-away 4s ease forwards;
}

@keyframes fade-away {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

.autosave-note {
  font-size: 12.5px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.25s ease;
  margin-right: 6px;
}
.autosave-note.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .saved-pill { animation-duration: 0.01ms; }
  .autosave-note { transition: none; }
}

/* ---------- reasoning trace ---------- */

.reasoning { margin-bottom: 20px; }
.reasoning summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.reasoning summary:hover { color: var(--text); }
.reasoning .answer-block { font-size: 14px; max-height: 320px; }

/* ---------- thank-you page ---------- */

.thanks-headline {
  font-size: 25px;
  line-height: 1.25;
  text-align: center;
  margin: 0 0 12px;
}
.thanks-lead { text-align: center; color: #9a9aa6; margin: 0 0 30px; font-size: 14.5px; }

.thanks-facts {
  margin: 0 0 30px;
  padding: 0;
  border-top: 1px solid #2c2c34;
}
.thanks-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px solid #2c2c34;
}
.thanks-facts dt { font-size: 13px; color: #9a9aa6; }
.thanks-facts dd { margin: 0; font-size: 13.5px; font-weight: 600; text-align: right; }

.start-note { color: #6a6a76; font-size: 12.5px; text-align: center; margin: 14px 0 0; }

/* ---------- review page ---------- */

.review-item .qhead { flex-wrap: wrap; align-items: center; gap: 8px; }
.review-item .edit-link { margin-left: auto; font-size: 13px; color: var(--focus); }
.review-question { font-size: 16px; white-space: pre-wrap; margin: 0 0 14px; }
.review-answer { margin-bottom: 14px; }
.review-answer summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.review-comment {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 14px;
  white-space: pre-wrap;
  font-size: 14.5px;
}
.review-comment .k {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 5px;
}
table.rubrics.static td { font-size: 14px; }
table.rubrics.static td.imp-col { width: 110px; font-weight: 650; white-space: nowrap; }
.tag.warn-tag { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }

.actionbar form { display: inline; }

@media (max-width: 760px) {
  /* The rail becomes a scrollable strip above the question. */
  .qlayout { grid-template-columns: 1fr; gap: 14px; }
  .qnav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .qnav-item { flex: 0 0 auto; min-width: 34px; }
}

@media (max-width: 620px) {
  .choice { grid-template-columns: 1fr; }
  table.rubrics thead { display: none; }
  table.rubrics, table.rubrics tbody, table.rubrics tr, table.rubrics td { display: block; width: 100%; }
  table.rubrics td { border-radius: 0; }
  table.rubrics tr { margin-bottom: 10px; }
  table.rubrics td:first-child { border-radius: 9px 9px 0 0; }
  table.rubrics td:last-child { border-radius: 0 0 9px 9px; text-align: right; }
  .masthead { flex-wrap: wrap; }
  .whoami { flex-basis: 100%; }
}
