/* We Challenge — WeValuate identity, second pass.
   Shared by the site pages, the challenge (/desafio), admin and 404.

   Brand kept: near-black ground, slate panels, electric blue #3B82F6 with dark text on it, square corners,
   the cream "> We Challenge" wordmark.
   Changed in this pass: headings and labels are set in Inter (sentence case, tight tracking); JetBrains Mono
   is kept for what is code or a number — the wordmark, the clock, scores, counts, access codes, commands.

   The one recurring picture is the exam itself: the question navigator drawn as an event timeline
   (answered = blue, flagged = amber cap), answer-sheet bubbles, and the blueprint strip (one segment per
   domain, as wide as its share of the questions). */

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ground: #0a0b10;
  --surface: #13141c;
  --surface-2: #1a1b26;
  --raised: #1e293b;
  --ink: #ffffff;
  --text: #e4e5ec;
  --muted: #a9abbb;
  --dim: #808396;
  --rule: #232432;
  --rule-strong: #34354a;
  --primary: #3b82f6;
  --primary-hover: #60a5fa;
  --primary-soft: #2b5fb8;
  --on-primary: #0a0b10;
  --primary-wash: rgb(59 130 246 / 0.15);
  --cream: #f0f3de;
  --amber: #f5b946;
  --ok: #4ade80;
  --ok-solid: #22c55e;
  --ok-wash: rgb(34 197 94 / 0.12);
  --bad: #f87171;
  --bad-solid: #ef4444;
  --bad-wash: rgb(239 68 68 / 0.12);
  --code-bg: #0f1018;

  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* 1.25 scale on a 16px base */
  --t-0: 0.8125rem;
  --t-1: 1rem;
  --t-2: 1.25rem;
  --t-3: 1.5625rem;
  --t-4: 1.953rem;
  --t-5: 2.441rem;

  --gutter: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-1);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
body > main, body > #screen-quiz { flex: 1 0 auto; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font); font-weight: 700; color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.022em; text-wrap: balance; }
h1 { font-size: var(--t-4); }
h2 { font-size: var(--t-3); }
h3 { font-size: var(--t-2); letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
a { color: var(--primary-hover); text-underline-offset: 3px; }
code, kbd, pre, .mono { font-family: var(--mono); }
:not(pre) > code { background: var(--raised); padding: 0.05em 0.35em; font-size: 0.88em; overflow-wrap: anywhere; color: var(--ink); }
pre {
  background: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--primary);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 1.25rem;
  white-space: pre-wrap;
  word-break: break-word;
}
:focus-visible { outline: 2px solid var(--primary-hover); outline-offset: 2px; }

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 34rem; }
.muted { color: var(--muted); }
.small { font-size: var(--t-0); }

/* ---------- top bar ---------- */
.console { background: rgb(10 11 16 / 0.92); border-bottom: 1px solid var(--rule); }
.console-in {
  max-width: 46rem; margin: 0 auto; padding: 0.85rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.admin .console-in { max-width: 72rem; }
.brand { display: inline-flex; align-items: baseline; gap: 0.7rem; min-width: 0; }
a.brand { color: inherit; text-decoration: none; }
.logo { display: block; height: 22px; width: auto; flex: none; }
.wordmark {
  font-family: var(--mono); font-weight: 700; font-size: 1.1rem; line-height: 1; letter-spacing: -0.01em;
  color: var(--cream); white-space: nowrap; flex: none;
}
.wordmark::before { content: ">"; color: var(--primary); margin-right: 0.45em; }
.product { font-size: var(--t-0); color: var(--dim); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang { display: inline-flex; align-items: center; flex: none; }
.lang label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lang select {
  width: auto; min-height: 2.1rem; padding: 0.2rem 1.8rem 0.2rem 0.65rem;
  font: inherit; font-size: var(--t-0); color: var(--text);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23a9abbb' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.6rem center / 0.6rem;
  border: 1px solid var(--rule-strong); border-radius: 0;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.lang select:hover { border-color: var(--primary); }
.lang option { color: var(--text); background: var(--surface); }

.sitenav { display: flex; gap: 0.25rem; margin-left: auto; }
.sitenav a { color: var(--muted); text-decoration: none; font-size: 0.875rem; white-space: nowrap; padding: 0.35rem 0.6rem; }
.sitenav a:hover { color: var(--ink); }
.sitenav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); }
.sitenav a[href="/desafio"] { color: var(--ink); border: 1px solid var(--rule-strong); margin-left: 0.5rem; }
.sitenav a[href="/desafio"]:hover { border-color: var(--primary); }
/* Leaving mid-challenge is one click too easy: hide the site menu while the questions are on screen. */
body:has(#screen-quiz:not([hidden])) .sitenav { display: none; }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 1.1rem; }
label.field > span { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.35rem; font-size: 0.92rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  padding: 0.65rem 0.8rem;
  min-height: 2.9rem;
}
input::placeholder { color: var(--dim); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: inherit; font-weight: 600; font-size: 0.95rem;
  min-height: 2.9rem; padding: 0.6rem 1.4rem;
  border-radius: 0;
  border: 1px solid var(--primary);
  background: var(--primary); color: var(--on-primary);
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--primary); color: var(--ink); }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn-danger:hover { background: var(--bad-wash); border-color: var(--bad); }
.btn-small { min-height: 2.25rem; padding: 0.3rem 0.85rem; font-size: var(--t-0); }
.btn-console { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-console:hover { background: transparent; border-color: var(--primary); }
.linkbtn { font: inherit; font-size: var(--t-0); font-weight: 600; color: var(--primary-hover); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.alert { border-left: 3px solid var(--bad); background: var(--bad-wash); color: var(--ink); padding: 0.75rem 0.95rem; margin: 0 0 1rem; }
.note { border-left: 3px solid var(--primary); background: var(--surface); padding: 0.85rem 1rem; margin: 0 0 1.25rem; color: var(--text); font-size: 0.95rem; }

/* ---------- 1. access code ---------- */
.entry { padding: 4rem 0 4.5rem; }
.entry h1 { font-size: clamp(2rem, 5vw, var(--t-5)); line-height: 1.1; margin-bottom: 0.6rem; }
.entry .lede { color: var(--muted); font-size: 1.125rem; line-height: 1.5; margin-bottom: 2rem; }
#code-form > label { display: block; margin-bottom: 0.4rem; }
.codebar { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--rule-strong); }
.codebar:focus-within { border-color: var(--primary); outline: 1px solid var(--primary); }
.codebar input {
  flex: 1; min-width: 0; border: 0; min-height: 3.6rem;
  font-family: var(--mono); font-size: var(--t-3); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.5rem 1.1rem; background: transparent;
}
.codebar input:focus-visible { outline: none; }
.codebar .btn { border: 0; min-width: 8.5rem; }
.nocode { margin: 1.5rem 0 0; font-size: 0.92rem; color: var(--muted); }

/* ---------- 2. details ---------- */
#d-cohort { font-size: 0.92rem; margin-bottom: 0.6rem; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.75rem 0; background: var(--surface); border: 1px solid var(--rule); }
.facts div { padding: 0.9rem 1rem; }
.facts div + div { border-left: 1px solid var(--rule); }
.facts dt { color: var(--dim); font-size: var(--t-0); }
.facts dd { margin: 0.15rem 0 0; font-family: var(--mono); color: var(--ink); font-size: var(--t-3); line-height: 1.2; font-variant-numeric: tabular-nums; }
#screen-details .lede { font-size: 1.0625rem; }

/* ---------- 3. challenge header: clock, time bar and navigator ---------- */
.quizhead { position: sticky; top: 0; z-index: 5; background: var(--ground); border-bottom: 1px solid var(--rule); }
.quizhead .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.75rem; }
.quizhead .title { font-size: var(--t-0); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clock { font-family: var(--mono); font-size: var(--t-3); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock.low { color: var(--amber); }
.clock.critical { color: var(--bad); }
.timebar { height: 3px; background: var(--rule); overflow: hidden; margin: 0.65rem 0 0.4rem; }
.timebar > i { display: block; height: 100%; width: 100%; background: var(--primary); transform-origin: left center; transition: transform 1s linear; }
.timebar.low > i { background: var(--amber); }
.timebar.critical > i { background: var(--bad-solid); }

.timeline { display: flex; gap: 3px; align-items: flex-end; padding: 0.4rem 0 0.6rem; }
.timeline button {
  flex: 1 1 0; min-width: 0; height: 2.75rem; padding: 0; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative;
}
.timeline .bar { display: block; height: 28%; background: var(--rule-strong); }
.timeline button:hover .bar { background: var(--dim); }
.timeline .answered .bar, .timeline .answered:hover .bar { height: 100%; background: var(--primary); }
.timeline .flagged .bar { box-shadow: inset 0 5px 0 var(--amber); }
.timeline .flagged:not(.answered) .bar { height: 55%; background: var(--raised); }
.timeline .current::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -6px; height: 2px; background: var(--ink); }
.timeline .num { display: none; }
@media (min-width: 620px) {
  .timeline button { height: 3.4rem; }
  .timeline .num { display: block; font-family: var(--mono); font-size: 0.64rem; color: var(--dim); text-align: center; line-height: 1; padding-top: 4px; font-variant-numeric: tabular-nums; }
  .timeline .bar { height: calc((100% - 0.95rem) * 0.28); }
  .timeline .answered .bar, .timeline .answered:hover .bar { height: calc(100% - 0.95rem); }
  .timeline .flagged:not(.answered) .bar { height: calc((100% - 0.95rem) * 0.55); }
  .timeline .current .num { color: var(--ink); }
}
.legend { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; font-size: 0.75rem; color: var(--dim); padding: 0.15rem 0 0.7rem; }
.legend span::before { content: ""; display: inline-block; width: 0.5rem; height: 0.75rem; margin-right: 0.4rem; vertical-align: -1px; background: var(--rule-strong); }
.legend .l-answered::before { background: var(--primary); }
.legend .l-flagged::before { background: var(--raised); box-shadow: inset 0 3px 0 var(--amber); }

/* Exam-length navigator: even rows of thin bars (columns set by app.js), numbers hidden */
.timeline.dense { display: grid; grid-template-columns: repeat(var(--cols-m, 20), minmax(0, 1fr)); gap: 6px 3px; align-items: end; }
.timeline.dense button { height: 1.15rem; }
.timeline.dense .bar { height: 30%; }
.timeline.dense .answered .bar, .timeline.dense .answered:hover .bar { height: 100%; }
.timeline.dense .flagged:not(.answered) .bar { height: 60%; }
.timeline.dense .flagged .bar { box-shadow: inset 0 3px 0 var(--amber); }
.timeline.dense .num { display: none !important; }
.timeline.dense .current::after { bottom: -4px; height: 2px; }
@media (min-width: 620px) {
  .timeline.dense { grid-template-columns: repeat(var(--cols, 30), minmax(0, 1fr)); }
  .timeline.dense button { height: 1.4rem; }
  .timeline.dense .bar { height: 30%; }
  .timeline.dense .answered .bar, .timeline.dense .answered:hover .bar { height: 100%; }
  .timeline.dense .flagged:not(.answered) .bar { height: 60%; }
}

/* ---------- question ---------- */
.question { padding: 2rem 0 2.5rem; }
.qmeta { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 0.5rem 1rem; margin-bottom: 1.1rem; }
.qmeta .where { color: var(--dim); font-size: var(--t-0); margin: 0; padding-top: 0.35rem; min-width: 0; }
.qmeta .where strong { display: block; font-family: var(--mono); font-weight: 400; color: var(--ink); font-size: var(--t-1); margin-bottom: 0.1rem; font-variant-numeric: tabular-nums; }
.qtext { font-size: var(--t-2); line-height: 1.45; margin-bottom: 1.4rem; font-weight: 600; color: var(--ink); max-width: 38em; letter-spacing: -0.01em; }
.hint { font-size: var(--t-0); color: var(--muted); margin: -0.6rem 0 1rem; }

/* Options are answer-sheet bubbles: circle for one answer, square for several. Letters follow screen order. */
.options { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.5rem; counter-reset: opt; }
.option { position: relative; counter-increment: opt; }
.option label {
  display: flex; gap: 0.95rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--rule);
  padding: 0.85rem 1rem 0.85rem 0.85rem; cursor: pointer; min-height: 3.25rem; color: var(--text);
}
.option label::before {
  content: counter(opt, upper-alpha);
  flex: none; display: grid; place-items: center; width: 1.8rem; height: 1.8rem; margin-top: -0.1rem;
  border: 1px solid var(--rule-strong); border-radius: 50%;
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
}
.option label:has(input[type="checkbox"])::before { border-radius: 0; }
.option label > span { padding-top: 0.1rem; }
.option label:hover { border-color: var(--rule-strong); background: var(--surface-2); }
.option label:hover::before { border-color: var(--primary); color: var(--ink); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.option label:has(input:checked) { border-color: var(--primary); background: var(--primary-wash); color: var(--ink); box-shadow: inset 3px 0 0 var(--primary); }
.option label:has(input:checked)::before { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.option input:checked + span { font-weight: 600; }
.option label:has(input:disabled) { cursor: not-allowed; opacity: 0.45; }
.option label:has(input:focus-visible) { outline: 2px solid var(--primary-hover); outline-offset: 2px; }

/* Typed answer (fill in the blank) */
.options .typed { display: grid; gap: 0.4rem; }
.typed-label { font-size: var(--t-0); color: var(--muted); }
.typed-input {
  width: 100%; min-height: 3.25rem; padding: 0.6rem 0.9rem;
  font-family: var(--mono); font-size: var(--t-2); color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule-strong); border-left: 3px solid var(--primary); border-radius: 0;
}
.typed-input:focus-visible { outline: 2px solid var(--primary-hover); outline-offset: 2px; }
.review .rtyped { display: grid; gap: 0.4rem; margin: 0 0 0.95rem; }
.review .rtyped > div { display: grid; grid-template-columns: 11rem 1fr; gap: 0.75rem; align-items: baseline; background: var(--surface); border: 1px solid var(--rule); padding: 0.6rem 0.8rem; }
.review .rtyped > div.correct { border-color: var(--ok-solid); background: var(--ok-wash); }
.review .rtyped > div.wrong { border-color: var(--bad-solid); background: var(--bad-wash); }
.review .rtyped dt { font-size: var(--t-0); font-weight: 600; color: var(--ink); }
.review .rtyped dd { margin: 0; overflow-wrap: anywhere; }
.review .rtyped code { background: transparent; padding: 0; margin-right: 0.6rem; }

.flagbtn::before { content: ""; width: 0.55rem; height: 0.7rem; background: var(--amber); clip-path: polygon(0 0, 100% 0, 70% 50%, 100% 100%, 0 100%); opacity: 0.85; }
.flagbtn[aria-pressed="true"] { border-color: var(--amber); background: var(--amber); color: var(--on-primary); }
.flagbtn[aria-pressed="true"]::before { background: var(--on-primary); }
.flagbtn[aria-pressed="true"]:hover { border-color: var(--amber); background: #f8ca70; color: var(--on-primary); }
.qnav { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.qnav .spacer { flex: 1; }
.savestate { font-size: var(--t-0); color: var(--dim); min-height: 1.4em; margin-top: 0.85rem; }

/* ---------- dialog ---------- */
dialog {
  border: 1px solid var(--rule-strong); border-top: 3px solid var(--primary); border-radius: 0; padding: 1.6rem;
  width: min(32rem, calc(100vw - 2 * var(--gutter))); background: var(--surface); color: var(--text);
}
dialog h2 { font-size: var(--t-2); }
dialog::backdrop { background: rgb(5 6 9 / 0.78); }
.jumplist { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.25rem 0 1rem; }
.jumplist .btn { min-width: 2.75rem; font-family: var(--mono); font-weight: 400; padding: 0.3rem 0.5rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- 4. result ---------- */
.result { padding: 3rem 0 4.5rem; }
.result > #r-title { font-size: 0.92rem; margin-bottom: 0.4rem; }
.result > h1 { font-size: clamp(2rem, 5vw, var(--t-5)); line-height: 1.1; }
.scorecard { background: var(--surface); border: 1px solid var(--rule); padding: 1.5rem 1.5rem 1.1rem; margin: 1.5rem 0 0.5rem; }
.scoreline { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0 0 1.1rem; }
.score { font-family: var(--mono); font-size: 4rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.04em; }
.score small { font-size: 0.4em; color: var(--dim); letter-spacing: 0; }
.verdict { font-weight: 600; font-size: 0.95rem; padding: 0.3rem 0.75rem; border: 1px solid currentColor; }
.verdict.pass { color: var(--ok); background: var(--ok-wash); }
.verdict.fail { color: var(--bad); background: var(--bad-wash); }
.scorecard p { margin: 0; }

/* Score against the pass mark: the tick is the pass mark, the fill is the score. */
.scorebar { position: relative; height: 10px; background: var(--rule); margin: 0 0 0.9rem; }
.scorebar > i { position: absolute; inset: 0 auto 0 0; width: var(--score, 0%); background: var(--ok-solid); }
.scorebar.fail > i { background: var(--bad-solid); }
.scorebar > b { position: absolute; top: -6px; bottom: -6px; left: var(--pass, 70%); width: 2px; margin-left: -1px; background: var(--ink); }

.subhead, #r-review-heading { font-size: var(--t-2); margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.modules { list-style: none; padding: 0; margin: 1.1rem 0 2rem; display: grid; gap: 0.95rem; }
.modules li { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; color: var(--text); font-size: 0.95rem; }
.modules .meter { position: relative; grid-column: 1 / -1; height: 6px; background: var(--rule); }
.modules .meter > i { display: block; height: 100%; background: var(--primary); }
.modules .meter::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: var(--pass, 70%); width: 2px; margin-left: -1px; background: var(--muted); }
.modules li.below .meter > i { background: var(--amber); }
.modules .count { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }

.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-strong); margin: 0.25rem 0 0.5rem; }
.segmented button { font: inherit; font-size: var(--t-0); font-weight: 600; color: var(--muted); background: transparent; border: 0; padding: 0.5rem 0.95rem; cursor: pointer; min-height: 2.4rem; }
.segmented button + button { border-left: 1px solid var(--rule-strong); }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--primary-wash); color: var(--ink); box-shadow: inset 0 -2px 0 var(--primary); }
.segmented button:disabled { opacity: 0.45; cursor: not-allowed; }

.review { list-style: none; padding: 0; margin: 0; }
.review.only-wrong > li.ok { display: none; }
.review > li { border-top: 1px solid var(--rule); padding: 1.6rem 0; }
.review .rhead { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--t-0); color: var(--dim); margin-bottom: 0.55rem; }
.review .rhead strong { font-family: var(--mono); font-weight: 400; color: var(--ink); margin-right: 0.45rem; }
.review .mark { font-weight: 600; white-space: nowrap; }
.review .mark.ok { color: var(--ok); }
.review .mark.bad { color: var(--bad); }
.review .rtext { font-weight: 600; color: var(--ink); margin-bottom: 0.8rem; }
.review .ropts { list-style: none; padding: 0; margin: 0 0 0.95rem; display: grid; gap: 0.4rem; counter-reset: opt; }
.review .ropts li {
  counter-increment: opt;
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 0.25rem 0.75rem;
  background: var(--surface); border: 1px solid var(--rule); padding: 0.55rem 0.8rem 0.55rem 0.6rem;
}
.review .ropts li::before {
  content: counter(opt, upper-alpha); display: grid; place-items: center; width: 1.45rem; height: 1.45rem;
  border: 1px solid var(--rule-strong); border-radius: 50%;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
}
.review .ropts li.correct { border-color: var(--ok-solid); background: var(--ok-wash); }
.review .ropts li.correct::before { background: var(--ok-solid); border-color: var(--ok-solid); color: var(--on-primary); }
.review .ropts li.wrong { border-color: var(--bad-solid); background: var(--bad-wash); }
.review .ropts li.wrong::before { background: var(--bad-solid); border-color: var(--bad-solid); color: var(--ink); }
.review .tags { font-size: var(--t-0); font-weight: 600; white-space: nowrap; padding-top: 0.1rem; color: var(--ink); }
.review .why { color: var(--muted); margin: 0; max-width: 40em; font-size: 0.95rem; }

/* ---------- admin ---------- */
.admin .wrap { max-width: 72rem; padding-top: 2.25rem; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--primary); padding: 1.4rem; margin-bottom: 2rem; }
.panel > h2 { font-size: var(--t-2); }
.admin .subhead { font-size: var(--t-1); margin-top: 1.5rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; align-items: end; }
.newcode { font-family: var(--mono); font-size: var(--t-4); color: var(--ink); letter-spacing: 0.08em; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; font-size: var(--t-0); color: var(--dim); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
td.mono { white-space: nowrap; }
.pill { display: inline-block; font-size: var(--t-0); border: 1px solid var(--rule-strong); padding: 0.05rem 0.55rem; white-space: nowrap; }
.pill.on { border-color: var(--ok-solid); color: var(--ok); }
.pill.off { color: var(--dim); }
.stats-summary { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin: 0.25rem 0 1rem; }
.stats-summary b { font-family: var(--mono); font-weight: 400; font-size: var(--t-2); color: var(--ink); margin-right: 0.3rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
input[type="datetime-local"]::-webkit-calendar-picker-indicator { filter: invert(0.8); }

/* ---------- footer: trademark notice ---------- */
.legal { border-top: 1px solid var(--rule); margin-top: 3rem; background: #08090d; }
.legal-in {
  max-width: 46rem; margin: 0 auto; padding: 1.75rem var(--gutter) 2.25rem;
  font-size: 0.75rem; line-height: 1.55; color: var(--dim);
}
.admin .legal-in { max-width: 72rem; }
.legal p { margin: 0 0 0.5rem; max-width: 70em; }
.legal .copy { margin: 0.9rem 0 0; color: var(--muted); }
.footlinks { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-bottom: 1rem; }
.footlinks a { color: var(--muted); font-size: var(--t-0); }
.footlinks a:hover { color: var(--ink); }
/* During the challenge the notice stays, but out of the way. */
body:has(#screen-quiz:not([hidden])) .legal { margin-top: 0; }
@media print { .legal { display: none; } }

/* ---------- site pages: home (/), tracks (/splunk, /lpi …), terms and privacy ---------- */
.site .console-in, .site .legal-in { max-width: 70rem; }
.wrap.wide { max-width: 70rem; }

.hero { padding-top: 4.5rem; padding-bottom: 3.5rem; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.5rem); line-height: 1.06; letter-spacing: -0.032em; max-width: 16ch; margin-bottom: 1.1rem; }
.hero .lede { color: var(--muted); font-size: 1.125rem; line-height: 1.6; max-width: 36em; margin-bottom: 2rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Home: everything on one screen. Left, the pitch, the navigator specimen and how it works;
   right, the tracks. */
.home-hero {
  display: grid; grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr); gap: 2rem 3rem; align-items: start;
  padding-top: 1.75rem; padding-bottom: 3rem;
}
.home-hero h1 { font-size: clamp(2rem, 3.3vw, 2.5rem); max-width: none; margin-bottom: 0.75rem; }
.home-hero .lede { font-size: 0.95rem; line-height: 1.55; margin-bottom: 1.25rem; }
.home-hero .section-title { font-size: var(--t-1); font-weight: 600; color: var(--muted); letter-spacing: 0; margin: 0 0 0.75rem; }

/* The exam navigator, as a specimen: what a challenge in progress looks like. */
.specimen { display: flex; align-items: flex-end; gap: 3px; height: 2.1rem; margin-top: 1.5rem; }
.specimen i { flex: 1; height: 26%; background: var(--rule-strong); }
.specimen i.answered { height: 100%; background: var(--primary); }
.specimen i.flagged { box-shadow: inset 0 4px 0 var(--amber); }
.specimen i.flagged:not(.answered) { height: 55%; background: var(--raised); }
.specimen i.current { outline: 1px solid var(--ink); outline-offset: 2px; }

.home-how { margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.home-how .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.home-how .steps li { display: block; }
.home-how .step-n { display: block; width: auto; height: auto; border: 0; font-size: var(--t-0); text-align: left; margin-bottom: 0.35rem; }
.home-how .steps h3 { font-size: 0.95rem; margin: 0 0 0.35rem; line-height: 1.3; }
.home-how .steps p { font-size: 0.8rem; line-height: 1.5; }

.band-section { padding: 3rem var(--gutter) 3.25rem; border-top: 1px solid var(--rule); }
.section-title { font-size: var(--t-3); margin: 0 0 1.5rem; }

/* Tracks: name, what the track covers, link. */
.tracklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.track {
  display: grid; grid-template-columns: 7.75rem minmax(0, 1fr) auto; gap: 0.4rem 1.25rem; align-items: center;
  background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--primary);
  padding: 0.8rem 1.15rem; color: var(--text); text-decoration: none;
}
.track:hover { border-color: var(--primary); background: var(--surface-2); }
.track-name { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.track-desc { color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }
.track-go { color: var(--primary-hover); font-weight: 600; font-size: 0.8125rem; white-space: nowrap; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2.5rem; }
.step-n { font-family: var(--mono); color: var(--primary-hover); }
.steps h3 { font-size: 1.0625rem; }
.steps p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Track page */
.trackpage .hero { padding-top: 3.5rem; padding-bottom: 2.25rem; }
.trackpage .hero h1 { max-width: none; }
.exams { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; gap: 1rem; }
.exam { display: grid; grid-template-columns: 2.25rem 1fr; gap: 0 1.1rem; background: var(--surface); border: 1px solid var(--rule); padding: 1.4rem 1.6rem 1.2rem 1.3rem; }
.exam-n { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 1px solid var(--primary); font-family: var(--mono); color: var(--primary-hover); font-size: 0.9rem; }
.exam-title { font-size: 1.3rem; margin: 0.25rem 0 0.7rem; }
.exam-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; margin: 0 0 1rem; }
.exam-facts > div { display: flex; align-items: baseline; gap: 0.45rem; }
.exam-facts dt { font-size: var(--t-0); color: var(--dim); }
.exam-facts dd { margin: 0; font-family: var(--mono); color: var(--ink); font-size: 0.95rem; }
.strip { display: flex; gap: 2px; height: 8px; margin: 0 0 1rem; max-width: 44rem; }
.strip i { flex: 1 1 0; min-width: 4px; background: var(--primary); }
.strip i:nth-child(even) { background: var(--primary-soft); }
.exam-desc { color: var(--muted); margin-bottom: 0.5rem; max-width: 44em; font-size: 0.95rem; }
details.domains summary { cursor: pointer; color: var(--primary-hover); font-size: var(--t-0); font-weight: 600; padding: 0.3rem 0; }
details.domains ul { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0; max-width: 44rem; }
details.domains li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; }
details.domains .count { font-family: var(--mono); color: var(--dim); white-space: nowrap; font-size: 0.8rem; }
.access { padding-left: 0; padding-right: 0; }
.access p { color: var(--muted); max-width: 40em; }
.access .section-title { font-size: var(--t-2); }

.legal-doc { padding-top: 3rem; padding-bottom: 2rem; }
.legal-doc h1 { font-size: var(--t-4); margin-bottom: 0.4rem; }
.legal-doc .updated { font-size: var(--t-0); color: var(--dim); margin-bottom: 2rem; }
.legal-doc h2 { font-size: var(--t-1); font-weight: 700; margin: 2rem 0 0.6rem; letter-spacing: 0; }
.legal-doc p, .legal-doc li { color: var(--text); max-width: 42em; }
.legal-doc ol, .legal-doc ul { padding-left: 1.3rem; margin: 0 0 1em; }
.legal-doc li { margin-bottom: 0.45rem; }
.legal-doc li::marker { color: var(--dim); }
.legal-doc strong { color: var(--ink); }
/* Company details not filled in yet (public/company.js) */
.fill { background: rgb(245 185 70 / 0.18); color: var(--amber); outline: 1px dashed var(--amber); padding: 0 0.2em; }

/* ---------- certification guides (/guias) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.guide-link { margin: 1rem 0 0; font-size: var(--t-0); }
.guide-page .lang { display: none; } /* the guides are written in Portuguese only */
.guide-link a, .crumbs a { color: var(--primary-hover); text-underline-offset: 3px; }
.guide { max-width: 50rem; padding-top: 2.5rem; padding-bottom: 2rem; }
.guide .crumbs { font-size: var(--t-0); margin: 0 0 1rem; }
.guide h1 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); line-height: 1.1; letter-spacing: -0.028em; margin: 0 0 0.5rem; max-width: 22ch; }
.guide .updated { font-size: var(--t-0); color: var(--dim); margin: 0 0 1.5rem; }
.guide .lede { color: var(--muted); font-size: 1.1rem; line-height: 1.6; max-width: 40em; margin: 0 0 2rem; }
.guide h2 { font-size: 1.45rem; letter-spacing: -0.015em; margin: 3rem 0 1rem; }
.guide h3 { font-size: 1.05rem; margin: 1.75rem 0 0.6rem; }
.guide p, .guide li, .guide dd { max-width: 42em; line-height: 1.6; }
.guide ol, .guide ul { padding-left: 1.3rem; }
.guide li { margin-bottom: 0.5rem; }
.guide li::marker { color: var(--dim); }
.guide .toc { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 0.75rem 0; font-size: var(--t-0); }
.guide .toc p { margin: 0 0 0.35rem; color: var(--dim); }
.guide .toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; }
.guide .toc li { margin: 0; }
.guide .toc a { color: var(--primary-hover); }
.guide table.examfacts th { width: 13rem; white-space: normal; color: var(--muted); font-size: 0.92rem; }
.guide table.examfacts td { color: var(--ink); }
.domains-table td.bar { width: 26%; padding-left: 0.25rem; vertical-align: middle; }
/* bar length = weight × 2.5 (40% fills the cell); classes because the CSP blocks inline styles */
.domains-table td.bar span { display: block; height: 0.5rem; background: var(--primary); }
.domains-table .w1{width:2.5%} .domains-table .w2{width:5%} .domains-table .w3{width:7.5%} .domains-table .w4{width:10%} .domains-table .w5{width:12.5%} .domains-table .w6{width:15%} .domains-table .w7{width:17.5%} .domains-table .w8{width:20%} .domains-table .w9{width:22.5%} .domains-table .w10{width:25%} .domains-table .w11{width:27.5%} .domains-table .w12{width:30%} .domains-table .w13{width:32.5%} .domains-table .w14{width:35%} .domains-table .w15{width:37.5%} .domains-table .w16{width:40%} .domains-table .w17{width:42.5%} .domains-table .w18{width:45%} .domains-table .w19{width:47.5%} .domains-table .w20{width:50%} .domains-table .w21{width:52.5%} .domains-table .w22{width:55%} .domains-table .w23{width:57.5%} .domains-table .w24{width:60%} .domains-table .w25{width:62.5%} .domains-table .w26{width:65%} .domains-table .w27{width:67.5%} .domains-table .w28{width:70%} .domains-table .w29{width:72.5%} .domains-table .w30{width:75%} .domains-table .w31{width:77.5%} .domains-table .w32{width:80%} .domains-table .w33{width:82.5%} .domains-table .w34{width:85%} .domains-table .w35{width:87.5%} .domains-table .w36{width:90%} .domains-table .w37{width:92.5%} .domains-table .w38{width:95%} .domains-table .w39{width:97.5%} .domains-table .w40{width:100%}
.domains-table td.num { font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; }
.guide .small { color: var(--muted); }
.guide .note { margin-top: 1.5rem; }
.qcard { border: 1px solid var(--rule); background: var(--surface); padding: 1.1rem 1.25rem; margin: 0 0 1rem; }
.qcard .qtext { color: var(--ink); font-weight: 600; margin: 0 0 0.6rem; }
.qcard pre { background: var(--ground); border: 1px solid var(--rule); padding: 0.6rem 0.8rem; overflow-x: auto; margin: 0 0 0.75rem; }
.qcard .qopts { margin: 0 0 0.75rem; }
.qcard .qopts li { margin-bottom: 0.3rem; }
.qcard .qhint { color: var(--dim); font-size: var(--t-0); margin: 0 0 0.5rem; }
.qcard summary { cursor: pointer; color: var(--primary-hover); font-weight: 600; font-size: var(--t-0); padding: 0.2rem 0; }
.qcard details p { margin: 0.5rem 0 0; color: var(--text); }
.qcard code, .guide li code { font-family: var(--mono); font-size: 0.9em; }
.faq dt { color: var(--ink); font-weight: 600; margin: 1.25rem 0 0; }
.faq dd { margin: 0.35rem 0 0; color: var(--text); }
.guide-cta { border-left: 3px solid var(--primary); background: var(--surface); padding: 1.25rem 1.5rem; margin: 2.75rem 0 0; }
.guide-cta h2 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.guide-cta p { color: var(--muted); }
.guide-cta .cta { margin: 1rem 0 0; }
.guide .sources a { color: var(--primary-hover); }
.guide-list { list-style: none; padding: 0 !important; margin: 0; border-top: 1px solid var(--rule); }
.guide-list li { margin: 0; }
.guide-list a { display: block; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.guide-list a:hover strong { color: var(--primary-hover); }
.guide-list strong { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 0.25rem; }
.guide-list span { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.5; max-width: 44em; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .home-hero { grid-template-columns: 1fr; row-gap: 2.25rem; }
  /* Stacked: the tracks come right after the pitch, how it works goes last. */
  .home-left { display: contents; }
  .home-hero .hero-copy { order: 1; }
  .home-hero .home-tracks { order: 2; }
  .home-hero .home-how { order: 3; margin-top: 0; }
}
@media (max-width: 760px) {
  .console-in { flex-wrap: wrap; row-gap: 0.4rem; padding-bottom: 0.5rem; }
  .sitenav {
    order: 3; flex-basis: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 calc(var(--gutter) - 0.6rem);
    overflow-x: auto; scrollbar-width: none;
  }
  .sitenav::-webkit-scrollbar { display: none; }
  .sitenav a[href="/desafio"] { margin-left: 0.25rem; }
  .hero { padding-top: 2.5rem; }
  .cta .btn { flex: 1 1 auto; }
  .track { grid-template-columns: 1fr; gap: 0.4rem; }
  .home-how .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .review .rtyped > div { grid-template-columns: 1fr; gap: 0.2rem; }
  .review .ropts li { grid-template-columns: auto 1fr; }
  .review .tags { grid-column: 2; padding-top: 0; }
  .qnav { display: grid; grid-template-columns: 1fr 1fr; }
  .qnav .spacer { display: none; }
  .qnav #prev-btn { grid-column: 1; grid-row: 1; }
  .qnav #next-btn { grid-column: 2; grid-row: 1; }
  .qnav #review-btn { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 480px) {
  .entry { padding-top: 2.5rem; }
  .codebar { flex-wrap: wrap; }
  .codebar input { flex-basis: 100%; }
  .codebar .btn { flex: 1 0 100%; min-height: 3rem; }
  .facts dd { font-size: var(--t-2); }
  .facts div { padding: 0.75rem 0.8rem; }
  .score { font-size: 3.25rem; }
  .scorecard { padding: 1.2rem 1.1rem 1rem; }
  .logo { height: 18px; }
  .wordmark { font-size: 1rem; }
  .brand { gap: 0.55rem; }
  .timeline.dense { gap: 4px 2px; }
  .timeline.dense button { height: 0.95rem; }
  .quizhead .row { padding-top: 0.55rem; }
  .timebar { margin: 0.5rem 0 0.3rem; }
  .legend { padding-bottom: 0.55rem; }
  .exam { grid-template-columns: 1fr; padding: 1.2rem; }
  .exam-n { width: 1.9rem; height: 1.9rem; font-size: 0.8rem; margin-bottom: 0.4rem; }
  .demo-screen { padding: 1rem; }
  .qmeta .btn-small { padding: 0.3rem 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .timebar > i { transition: none; }
}

@media print {
  .console, .quizhead, .qnav, .btn, .segmented { display: none !important; }
  body { background: #fff; color: #000; }
}

/* utilities (no inline styles: the CSP forbids them) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }
.leave { margin-top: 2.75rem; }
@media (min-width: 1001px) {
  /* The tracks are already beside the copy: the jump link has nowhere to go. */
  .home-hero .cta a[href="#trilhas"] { display: none; }
}

/* Home on wide screens: use the width instead of a centred 70rem column. */
.home-page .console-in, .home-page .legal-in, .home-page .wrap.wide,
.wide-page .console-in, .wide-page .legal-in, .wide-page .wrap.wide {
  max-width: 104rem; padding-left: clamp(16px, 3.5vw, 64px); padding-right: clamp(16px, 3.5vw, 64px);
}
@media (min-width: 1001px) {
  .home-page .home-hero { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); column-gap: clamp(3rem, 5vw, 6rem); }
  .home-page .track { grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr) auto; column-gap: clamp(1.25rem, 2.5vw, 2.5rem); }
}
@media (min-width: 1500px) {
  .home-page .home-hero { padding-top: 3rem; }
  .home-page .home-hero h1 { font-size: 3.1rem; }
  .home-page .home-hero .lede { font-size: 1.0625rem; max-width: 40em; }
  .home-page .specimen { height: 2.5rem; }
  .home-page .home-how .steps h3 { font-size: 1.0625rem; }
  .home-page .home-how .steps p { font-size: 0.875rem; }
  .home-page .track { padding: 1rem 1.5rem; }
  .home-page .track-name { font-size: 1.3rem; }
  .home-page .track-desc { font-size: 0.9rem; }
  .home-page .track-go { font-size: 0.875rem; }
}

/* Track pages on wide screens: the challenges side by side. */
@media (min-width: 1200px) {
  .wide-page .exams { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .wide-page .trackpage .hero .lede { max-width: 48em; }
}

/* ---------- forms: textarea, checkboxes and chips ---------- */
textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: 0; padding: 0.6rem 0.8rem; resize: vertical;
}
textarea:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
fieldset.setup-group { margin: 0 0 1.75rem; }
.setup-group legend { font-weight: 600; color: var(--ink); margin-bottom: 0.6rem; padding: 0; }
.checks { display: grid; gap: 0.4rem; }
.check {
  display: grid; grid-template-columns: auto 1fr auto; gap: 0.75rem; align-items: center;
  background: var(--surface); border: 1px solid var(--rule); padding: 0.6rem 0.85rem; cursor: pointer;
}
.check:hover { border-color: var(--rule-strong); }
.check:has(input:checked) { border-color: var(--primary); background: var(--primary-wash); }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--primary); margin: 0; }
.check small { font-family: var(--mono); font-size: 0.75rem; }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-grid; place-items: center; min-width: 3.5rem; min-height: 2.6rem; padding: 0 0.9rem; border: 1px solid var(--rule-strong); font-family: var(--mono); color: var(--text); }
.chip:hover span { border-color: var(--primary); }
.chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--primary-hover); outline-offset: 2px; }

/* ---------- practice: sample (/amostra) and study mode (/estudo) ---------- */
.practice .entry { padding-bottom: 3rem; }
.practice .section-title { font-size: var(--t-2); margin: 2rem 0 0.9rem; }
.pick-tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.pick-track {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: left;
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--primary);
  padding: 0.95rem 1.2rem; cursor: pointer;
}
.pick-track:hover { border-color: var(--primary); background: var(--surface-2); }
.pick-track .track-name { font-size: 1.15rem; }
.pick-count { font-family: var(--mono); font-size: 0.8rem; color: var(--dim); white-space: nowrap; }
.practice-title { font-size: 0.92rem; margin-bottom: 0.75rem; }
.practice-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.6rem; margin-bottom: 1rem; }
.practice .where { color: var(--dim); font-size: var(--t-0); margin: 0 0 0.9rem; }
.practice .where strong { display: block; font-weight: 600; color: var(--muted); margin-bottom: 0.1rem; }
.options .option.is-correct label { border-color: var(--ok-solid); background: var(--ok-wash); opacity: 1; }
.options .option.is-correct label::before { background: var(--ok-solid); border-color: var(--ok-solid); color: var(--on-primary); }
.options .option.is-wrong label { border-color: var(--bad-solid); background: var(--bad-wash); opacity: 1; box-shadow: none; }
.options .option.is-wrong label::before { background: var(--bad-solid); border-color: var(--bad-solid); color: var(--ink); }
.practice .options .option label:has(input:disabled) { cursor: default; }
.practice .options .option:not(.is-correct):not(.is-wrong) label:has(input:disabled) { opacity: 0.5; }
.feedback { border-top: 1px solid var(--rule); padding-top: 1.1rem; margin: 0 0 1.5rem; }
.feedback .verdict { display: inline-block; margin-bottom: 0.8rem; }
.feedback .why { color: var(--text); margin-bottom: 0.8rem; max-width: 40em; }
.feedback .accepted { margin: 0 0 0.8rem; }
.feedback .accepted dt { font-size: var(--t-0); font-weight: 600; color: var(--ink); }
.feedback .accepted dd { margin: 0.2rem 0 0; }
.feedback .accepted code { margin-right: 0.5rem; }
.practice-nav { justify-content: flex-end; }
.score-line { font-size: var(--t-3); color: var(--ink); margin: 0.5rem 0 1rem; }
.study-entry { margin: 1.75rem 0 0; padding-top: 1.1rem; border-top: 1px solid var(--rule); font-size: 0.92rem; color: var(--muted); }

/* ---------- report a problem ---------- */
.report { margin-top: 0.9rem; }
.report-form { margin-top: 0.75rem; padding: 1rem; background: var(--surface); border: 1px solid var(--rule); max-width: 36rem; }
.report-form .field { margin-bottom: 0.8rem; }
.report-form .field small { display: block; margin-top: 0.3rem; }
.report-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.report-status { margin: 0.5rem 0 0; color: var(--bad); }
.report-status.done { color: var(--ok); }
.report-status:empty { display: none; }

/* Keyboard hint only where there is a keyboard and a fine pointer. */
.kbd-hint { font-size: 0.75rem; color: var(--dim); margin: 0.4rem 0 0; }
@media (pointer: coarse) { .kbd-hint { display: none; } }

/* admin: inline selects in toolbars, option pick counts */
.inline-select { width: auto; min-height: 2.25rem; padding: 0.25rem 0.6rem; font-size: var(--t-0); margin-right: 0.4rem; }
.picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.picks li { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.5rem; }
.picks li.key { color: var(--ok); }
.picks li.key .mono::after { content: " ✓"; }

@media (max-width: 1200px) and (min-width: 761px) { .site .product { display: none; } }

/* ---------- accounts: sign in, Minha área, plans ---------- */
.login-class { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
#l-dev a { word-break: break-all; }

.account { padding: 3rem var(--gutter) 4rem; }
.account-loading { padding: 3rem 0; }
.account-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.account-head h1 { font-size: clamp(2rem, 4vw, var(--t-5)); line-height: 1.1; margin-bottom: 0.35rem; }
.account-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; align-items: start; }
.account-col { display: grid; gap: 1.5rem; }
.acc-block { background: var(--surface); border: 1px solid var(--rule); padding: 1.3rem 1.4rem; }
.acc-block > h2 { font-size: var(--t-2); margin-bottom: 0.9rem; }
.acc-lines { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.acc-lines li { padding-left: 0.85rem; border-left: 3px solid var(--rule-strong); color: var(--muted); }
.acc-lines li.on { border-left-color: var(--primary); color: var(--ink); }
.acc-lines li.warn { border-left-color: var(--amber); color: var(--ink); }
.acc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.5rem; }
.acc-withdraw { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.confirm-row { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.acc-tracks { display: grid; gap: 1.25rem; }
.acc-track-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.4rem; margin-bottom: 0.35rem; }
.acc-track-head h3 { font-size: 1.05rem; margin: 0; }
.acc-track.locked .acc-exam-title { color: var(--muted); }
.acc-exams, .acc-history { list-style: none; margin: 0; padding: 0; }
.acc-exams li, .acc-history li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem 1rem; flex-wrap: wrap; padding: 0.6rem 0; }
.acc-exams li + li, .acc-history li + li { border-top: 1px solid var(--rule); }
.acc-exam-info { display: grid; gap: 0.1rem; min-width: 0; }
.acc-exam-title { color: var(--ink); font-weight: 600; }
.acc-exam-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.acc-history .ok { color: var(--ok); }
#a-redeem-msg { margin: 0.75rem 0 0; color: var(--ok); }
#a-redeem-msg.bad { color: var(--bad); }
.acc-danger { border-color: var(--rule); }
.acc-danger > h2 { color: var(--muted); }

.plans-page .entry { padding-top: 3.5rem; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 22rem)); gap: 1.25rem; margin: 0 0 1.5rem; }
.plan { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--primary); padding: 1.4rem 1.5rem 1.5rem; display: grid; gap: 0.35rem; align-content: start; }
.plan h2 { font-size: var(--t-2); margin: 0; }
.plan-price { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.4rem 0 0; flex-wrap: wrap; }
.plan-amount { font-family: var(--mono); font-size: var(--t-4); color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.plan-per { color: var(--muted); }
.plan-eq { min-height: 1.3em; margin: 0 0 0.9rem; }
.accept { display: flex; gap: 0.65rem; align-items: flex-start; max-width: 44rem; margin: 0 0 1.25rem; cursor: pointer; }
.accept input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; accent-color: var(--primary); flex: none; }
.plan-rules { margin: 0 0 1.5rem; padding-left: 1.2rem; max-width: 44rem; color: var(--muted); display: grid; gap: 0.45rem; }

@media (max-width: 860px) {
  .account-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .account { padding-top: 2rem; }
  .account-head { flex-direction: column; }
}
.token-tracks { grid-column: 1 / -1; }
.token-tracks .checks { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
#a-code { font-size: 1rem; letter-spacing: 0.04em; }
.plan-eq { min-height: 1.6em; line-height: 1.6; }
.check-field span { display: flex; align-items: center; gap: 0.5rem; }
.mail-preview { white-space: pre-wrap; font-family: var(--mono); font-size: 0.85rem; background: var(--surface-2); padding: 0.9rem 1rem; max-height: 22rem; overflow: auto; margin: 0.5rem 0 1rem; }
