:root {
  color-scheme: light;
  --bg: #f3f6fa;
  --surface: #fff;
  --text: #182e46;
  --muted: #53677b;
  --accent: #145b8c;
  --line: #c9d6e2;
  --soft: #e8f1f8;
  --ok: #23603e;
  --ok-bg: #edf7ef;
  --error: #983b3b;
  --error-bg: #fff0ee;
  --radius: 8px;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
summary {
  touch-action: manipulation;
}
button,
.button {
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--surface);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1.3;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button.secondary,
.button.secondary {
  color: var(--accent);
  background: var(--surface);
}
button.quiet {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
input,
textarea {
  max-width: 100%;
}
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--muted);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 20px;
  height: 20px;
  flex: none;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
label {
  cursor: pointer;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
h1 {
  font:
    normal clamp(2.25rem, 4.2vw, 3rem) / 1.12 Georgia,
    serif;
  max-width: 19ch;
  letter-spacing: -0.025em;
}
h2 {
  font:
    normal 28px/1.25 Georgia,
    serif;
}
h3 {
  font-size: 20px;
  line-height: 1.4;
}
p,
li {
  line-height: 1.6;
  max-width: 65ch;
}
small,
.fine {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 104px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}
.brand-mark {
  width: 40px;
  height: 48px;
  background: var(--accent);
  color: var(--surface);
  display: grid;
  place-content: center;
  font:
    32px Georgia,
    serif;
  border-radius: 4px;
  position: relative;
}
.brand-mark span {
  font: 16px system-ui;
  position: absolute;
  bottom: 4px;
  right: 4px;
}
.header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.header nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding-block: 12px;
}
.header nav a:hover {
  color: var(--accent);
}
.header nav .nav-access {
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 12px 16px;
  border-radius: 4px;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
  padding-block: 48px 64px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.stack.small {
  gap: 12px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.intro {
  font-size: 20px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 43ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.price-inline {
  font-size: 14px;
  color: var(--muted);
}
.paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 8px 8px 0 var(--soft);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.paper-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 12px;
  line-height: 1.5;
}
.badge.ok {
  color: var(--ok);
  background: var(--ok-bg);
}
.badge.error {
  color: var(--error);
  background: var(--error-bg);
}
.sample-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 14px;
}
.letter {
  border: 1px solid var(--line);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: inline-grid;
  place-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.sample-option:first-child {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--soft);
}
.strip {
  border-block: 1px solid var(--line);
  padding: 24px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.strip strong {
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}
.section {
  padding-block: 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.steps article {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steps p {
  color: var(--muted);
}
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.notice strong {
  color: var(--text);
}
.notice.error,
.message.error {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
}
.notice.ok,
.message.ok {
  background: var(--ok-bg);
  color: var(--ok);
}
.page-head {
  padding-block: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page-head h1 {
  font-size: 40px;
  max-width: 27ch;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 32px;
  align-items: start;
}
.topic-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.topic-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.topic-row .number {
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.topic-row h3 {
  font-size: 16px;
}
.topic-row p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}
.topic-row .topic-action {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  font-size: 14px;
}
/* Convocatoria (/convocatoria): cada dato con su fuente. */
.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
/* Guías de estudio (/temario/<slug>): contenido estático, tema claro. */
.guide-link {
  margin-top: 12px;
  font-size: 14px;
}
.guide {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.guide-intro {
  font-size: 16px;
}
.guide-points,
.guide-facts,
.guide-sources {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 20px;
  margin: 0;
  font-size: 15px;
}
.guide-cite {
  color: var(--muted);
  font-size: 13px;
}
.guide-note {
  font-size: 14px;
  color: var(--muted);
}
.locked {
  font-size: 14px;
  color: var(--muted);
}
.study {
  padding: 24px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.study-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.study-title h1 {
  font-family: inherit;
  font-size: 20px;
  letter-spacing: 0;
}
.progress-row {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
  border: none;
}
.question {
  font-size: 24px;
  line-height: 1.45;
  max-width: 55ch;
  font-weight: 650;
}
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  padding: 16px;
  line-height: 1.5;
  min-height: 60px;
}
.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--soft);
}
.option.correct {
  background: var(--ok-bg);
  border-color: var(--ok);
}
.option.wrong {
  background: var(--error-bg);
  border-color: var(--error);
}
.option .option-label {
  flex: 1;
  min-width: 0;
}
.option .answer-state {
  font-size: 12px;
  font-weight: 700;
}
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 248px;
  gap: 32px;
  align-items: start;
}
.question-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.question-nav button {
  min-height: 36px;
  min-width: 0;
  padding: 8px;
  font-size: 12px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.question-nav button.current {
  border-color: var(--accent);
  color: var(--surface);
  background: var(--accent);
}
.question-nav button.answered {
  background: var(--soft);
  color: var(--accent);
}
.question-nav button.current.answered {
  background: var(--accent);
  color: var(--surface);
}
.question-nav button.reserve {
  border-style: dashed;
}
.timer {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.correction {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.correction h3 {
  font-size: 20px;
}
.correction p {
  font-size: 16px;
}
.source {
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  min-width: 0;
}
.source blockquote {
  margin: 0;
  font-family: Georgia, serif;
  line-height: 1.65;
  max-width: 65ch;
}
.source details,
.correction details {
  min-width: 0;
}
.source summary,
.correction summary {
  cursor: pointer;
  line-height: 1.5;
  color: var(--accent);
  padding-block: 4px;
}
.source p,
.source li {
  font-size: 14px;
}
.source a {
  overflow-wrap: anywhere;
}
.proofs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
}
.message {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  line-height: 1.5;
  font-size: 14px;
}
.message:empty {
  display: none;
}
.price-card {
  max-width: 520px;
}
.price {
  font-size: 40px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.price small {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
}
.check {
  display: flex;
  gap: 12px;
  align-items: start;
  font-size: 14px;
  line-height: 1.6;
}
.check input {
  margin: 2px 0 0;
}
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 20px;
  margin: 0;
}
.legal {
  max-width: 760px;
  padding-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.legal h2 {
  font-size: 24px;
}
.legal address {
  font-style: normal;
  line-height: 1.7;
  white-space: pre-line;
}
.results-score {
  font-size: 40px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.results-grid strong {
  display: block;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.recovery-code {
  overflow-wrap: anywhere;
  background: var(--soft);
  padding: 16px;
  font-size: 14px;
}
.footer {
  border-top: 1px solid var(--line);
  padding-block: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}
.footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer a {
  font-size: 14px;
  color: var(--muted);
}
.skip {
  position: fixed;
  top: -100px;
  left: 16px;
  background: var(--surface);
  padding: 16px;
  z-index: 10;
}
.skip:focus {
  top: 8px;
}
.loading {
  padding-block: 64px;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.admin-proof {
  padding-top: 16px;
}
.subtle {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  .hero {
    gap: 32px;
    padding-block: 32px 48px;
  }
  .paper {
    padding: 24px;
  }
  .study-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .study-layout > aside {
    order: -1;
  }
  .study-layout > aside .question-nav {
    display: none;
  }
  .study-layout > aside details[open] .question-nav {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    padding-top: 12px;
  }
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .header nav {
    gap: 16px;
  }
  .steps {
    gap: 24px;
  }
  .timer {
    font-size: 20px;
  }
}
@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .header {
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 20px;
    min-height: auto;
  }
  .brand {
    font-size: 20px;
  }
  .brand small {
    font-size: 12px;
  }
  .header nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .header nav a {
    font-size: 14px;
  }
  .header nav .nav-access {
    padding: 8px 12px;
  }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 24px 40px;
  }
  h1 {
    font-size: 40px;
  }
  .intro {
    font-size: 16px;
  }
  .paper {
    padding: 20px;
    box-shadow: 4px 4px 0 var(--soft);
  }
  .hero .paper {
    margin-right: 4px;
  }
  .strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding-block: 24px;
  }
  .strip strong {
    font-size: 16px;
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .section {
    padding-block: 32px;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }
  .notice {
    padding: 16px;
  }
  .page-head {
    padding-block: 24px;
  }
  .page-head h1 {
    font-size: 32px;
  }
  .topic-row {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
  }
  .topic-row .topic-action {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    gap: 12px;
  }
  .study-title {
    align-items: start;
  }
  .question {
    font-size: 20px;
  }
  .option {
    padding: 12px;
    gap: 8px;
  }
  .option {
    flex-wrap: wrap;
  }
  .option .answer-state {
    flex-basis: 100%;
    max-width: none;
    padding-left: 64px;
  }
  .actions > * {
    flex-grow: 1;
  }
  .actions .fine {
    flex-basis: 100%;
  }
  .source {
    padding: 16px;
  }
  .results-grid {
    gap: 12px;
  }
  .results-grid strong {
    font-size: 24px;
  }
  .footer div {
    gap: 16px;
  }
  .study-layout > aside details[open] .question-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: no-preference) {
  button,
  a,
  input,
  textarea {
    transition:
      background-color 0.12s,
      border-color 0.12s,
      outline-color 0.12s;
  }
}
