/* ==========================================================================
   BRÚJULA VOCACIONAL — hoja de estilo
   Lenguaje visual: editorial y sobrio. La decisión que ayuda a tomar esta
   herramienta es seria; la interfaz no compite con el contenido.
   ========================================================================== */

:root {
  --paper:      #faf8f4;
  --paper-2:    #f2eee6;
  --surface:    #ffffff;
  --ink:        #1b1a18;
  --ink-2:      #4a4640;
  --muted:      #7d766c;
  --line:       #e3ddd1;
  --line-2:     #cfc7b7;

  --accent:     #2f3f6b;
  --accent-2:   #4a5f96;
  --accent-soft:#e8ebf4;
  --gold:       #a8792a;
  --gold-soft:  #f6eeda;
  --good:       #2f7a52;
  --warn:       #b0562a;

  --radius:     14px;
  --radius-sm:  9px;
  --shadow:     0 1px 2px rgba(27,26,24,.05), 0 8px 24px -12px rgba(27,26,24,.16);
  --shadow-lg:  0 2px 4px rgba(27,26,24,.05), 0 24px 48px -20px rgba(27,26,24,.24);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --mono:  ui-monospace, "Cascadia Mono", Consolas, monospace;

  --maxw: 1120px;
  --read: 660px;
}

[data-theme="dark"] {
  --paper:      #131419;
  --paper-2:    #1a1c22;
  --surface:    #1d1f26;
  --ink:        #ecebe7;
  --ink-2:      #bab6ae;
  --muted:      #8d8880;
  --line:       #2c2f38;
  --line-2:     #3d414d;
  --accent:     #8ea6de;
  --accent-2:   #a8bce9;
  --accent-soft:#232838;
  --gold:       #d9ac5c;
  --gold-soft:  #2b2418;
  --good:       #6bbf90;
  --warn:       #e0895a;
  --shadow:     0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
  --shadow-lg:  0 2px 4px rgba(0,0,0,.4), 0 24px 48px -20px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.012em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.35rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.02rem; font-family: var(--sans); font-weight: 650; letter-spacing: -.005em; }
p  { margin: 0 0 1.05em; }
a  { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
strong { font-weight: 640; }
small { font-size: .845rem; }

.wrap    { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.read    { max-width: var(--read); margin-left: auto; margin-right: auto; }
.center  { text-align: center; }
.muted   { color: var(--muted); }
.ink2    { color: var(--ink-2); }
.mono    { font-family: var(--mono); font-size: .82em; letter-spacing: .04em; }

/* ---------------------------------------------------------------- topbar -- */

.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.06rem; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand .mark {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%; border: 1.5px solid var(--accent);
  display: grid; place-items: center; position: relative;
}
.brand .mark::after {
  content: ""; width: 2px; height: 12px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--gold) 50%, var(--accent) 50%);
  transform: rotate(38deg);
}
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.topbar nav a {
  color: var(--ink-2); text-decoration: none; font-size: .9rem;
  padding: 7px 12px; border-radius: 8px;
}
.topbar nav a:hover { background: var(--paper-2); color: var(--ink); }

.theme-btn {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  font-size: 15px; line-height: 1;
}
.theme-btn:hover { border-color: var(--line-2); color: var(--ink); }

/* ------------------------------------------------------------- botones --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 11px; border: 1px solid transparent;
  background: var(--accent); color: #fff;
  font-family: var(--sans); font-size: .97rem; font-weight: 560;
  cursor: pointer; text-decoration: none; letter-spacing: .005em;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.btn:hover { background: var(--accent-2); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
[data-theme="dark"] .btn { color: #12141a; }
[data-theme="dark"] .btn:hover { color: #12141a; }

.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); box-shadow: none; }
.btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn.sm { padding: 8px 15px; font-size: .875rem; border-radius: 9px; }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }

/* -------------------------------------------------------------- portada -- */

.hero { padding: 76px 0 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .765rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--gold); font-weight: 640; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.hero h1 { max-width: 19ch; text-wrap: balance; }
.hero .lead {
  font-size: 1.16rem; color: var(--ink-2); max-width: 56ch; margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Portada: texto a la izquierda, el resultado en miniatura a la derecha. */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 56px; align-items: center;
}
.hero-visual { display: flex; flex-direction: column; gap: 14px; }
.hv-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 14px; box-shadow: var(--shadow-lg); position: relative;
}
.hv-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 650; margin-bottom: 4px;
}
.hv-hex { width: 100%; max-width: 330px; display: block; margin: 0 auto; }
.hv-poly { transform-origin: 150px 150px; animation: hv-crece 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes hv-crece { from { transform: scale(.35); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hv-code {
  display: flex; align-items: baseline; justify-content: center; gap: 10px;
  margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line);
}
.hv-code-k { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hv-code-v { font-family: var(--serif); font-size: 1.7rem; letter-spacing: .06em; line-height: 1; }
.hv-verdict {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px;
  box-shadow: var(--shadow); animation: hv-sube .8s .5s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes hv-sube { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.hv-v-name { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; letter-spacing: -.01em; }
.hv-v-esp { font-size: .92rem; margin-top: 3px; }
.hv-v-alt { font-size: .82rem; color: var(--ink-2); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.hv-v-alt > span:first-child { color: var(--muted); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-visual { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { .hv-poly, .hv-verdict { animation: none; } }

.stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--line); }
.stat .n { font-family: var(--serif); font-size: 1.85rem; line-height: 1; color: var(--ink); }
.stat .l { font-size: .82rem; color: var(--muted); margin-top: 5px; }

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

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.card.pad-lg { padding: 32px; }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }
.grid.c4 { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }

.section { padding: 56px 0; }
.section-head { margin-bottom: 30px; }
.section-head h2 { margin-bottom: .3em; }
.section-head p { color: var(--ink-2); max-width: 62ch; margin: 0; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .755rem; font-weight: 600; letter-spacing: .03em;
  padding: 4px 10px; border-radius: 100px;
  background: var(--paper-2); color: var(--ink-2); border: 1px solid var(--line);
}
.pill.gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ============================== CUESTIONARIO ============================== */

.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--line); z-index: 100;
}
.progress-bar .fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .45s cubic-bezier(.4,0,.2,1);
}

.quiz { max-width: 780px; margin: 0 auto; padding: 34px 24px 120px; }

.quiz-head { margin-bottom: 34px; }
.quiz-head .step {
  font-size: .77rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 640; margin-bottom: 12px;
  display: flex; align-items: center; gap: 12px;
}
.quiz-head .step .dots { display: flex; gap: 5px; margin-left: auto; }
.quiz-head .step .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.quiz-head .step .dot.on { background: var(--accent); }
.quiz-head .step .dot.done { background: var(--gold); }
.quiz-head h2 { margin-bottom: .18em; }
.quiz-head .sub { color: var(--gold); font-size: .93rem; font-weight: 560; margin-bottom: 14px; }
.quiz-head .intro {
  color: var(--ink-2); font-size: 1rem; background: var(--paper-2);
  border-left: 2px solid var(--accent); padding: 15px 18px; border-radius: 0 10px 10px 0;
  margin: 0;
}

.scale-legend {
  display: flex; justify-content: space-between; font-size: .74rem;
  color: var(--muted); padding: 0 2px 8px; letter-spacing: .02em;
  position: sticky; top: 58px; background: var(--paper); z-index: 20;
  border-bottom: 1px solid var(--line); margin-bottom: 4px; padding-top: 10px;
}

.q {
  padding: 19px 0; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 8px 22px; align-items: center;
  transition: opacity .2s ease;
}
.q:last-child { border-bottom: none; }
.q .qtext { font-size: 1.02rem; color: var(--ink); line-height: 1.42; }
.q.answered .qtext { color: var(--ink-2); }

.opts { display: flex; gap: 5px; }
.opt {
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface);
  cursor: pointer; display: grid; place-items: center;
  font-size: .87rem; font-weight: 600; color: var(--muted);
  transition: all .13s ease; position: relative; font-family: var(--sans);
}
.opt:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.opt[aria-checked="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 2px 10px -2px color-mix(in srgb, var(--accent) 55%, transparent);
}
[data-theme="dark"] .opt[aria-checked="true"] { color: #12141a; }
.opt .tip {
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-size: .72rem; font-weight: 500;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap; opacity: 0;
  pointer-events: none; transition: opacity .15s ease;
}
.opt:hover .tip { opacity: 1; }

/* ítems bipolares de contexto */
.q.bipolar { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
.bipolar-poles { display: flex; justify-content: space-between; gap: 16px; font-size: .9rem; }
.bipolar-poles span { color: var(--ink-2); max-width: 44%; line-height: 1.35; }
.bipolar-poles span:last-child { text-align: right; }
.q.bipolar .opts { justify-content: space-between; gap: 4px; position: relative; }
.q.bipolar .opts::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 50%;
  height: 1px; background: var(--line); z-index: 0;
}
.q.bipolar .opt { flex: 1; height: 40px; width: auto; z-index: 1; }

/* El tamaño del punto comunica la intensidad: extremos grandes, centro neutro. */
.dotmark { border-radius: 50%; background: currentColor; opacity: .55; transition: all .13s ease; }
.q.bipolar .opt[data-val="0"] .dotmark,
.q.bipolar .opt[data-val="4"] .dotmark { width: 15px; height: 15px; }
.q.bipolar .opt[data-val="1"] .dotmark,
.q.bipolar .opt[data-val="3"] .dotmark { width: 10px; height: 10px; }
.q.bipolar .opt[data-val="2"] .dotmark {
  width: 7px; height: 7px; opacity: .4;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
}
.q.bipolar .opt[aria-checked="true"] .dotmark { opacity: 1; background: currentColor; }

/* preguntas de perfil */
.choice {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 15px 18px; border: 1px solid var(--line-2); border-radius: 11px;
  background: var(--surface); cursor: pointer; text-align: left;
  font-size: .98rem; color: var(--ink); font-family: var(--sans);
  transition: all .13s ease; margin-bottom: 9px;
}
.choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 560; }
.choice .radio {
  width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--line-2);
  flex: none; display: grid; place-items: center;
}
.choice[aria-checked="true"] .radio { border-color: var(--accent); }
.choice[aria-checked="true"] .radio::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

.quiz-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.quiz-nav .inner {
  max-width: 780px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 14px;
}
.quiz-nav .count { font-size: .855rem; color: var(--muted); margin-right: auto; }
.quiz-nav .count b { color: var(--ink); font-weight: 620; }

.warn-inline {
  background: var(--gold-soft); color: var(--gold); border-radius: 9px;
  padding: 10px 14px; font-size: .88rem; margin-top: 14px; font-weight: 500;
}

/* ================================ INFORME ================================= */

.report-head { padding: 44px 0 30px; border-bottom: 1px solid var(--line); }
.code-badge {
  display: inline-flex; align-items: baseline; gap: 3px;
  font-family: var(--serif); font-size: 3.1rem; line-height: 1; letter-spacing: .04em;
}
.code-badge span { display: inline-block; }

.certeza-bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 9px 0; }
.certeza-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.certeza-bar.alta i { background: var(--good); }
.certeza-bar.media i { background: var(--gold); }
.certeza-bar.baja i { background: var(--warn); }

.match-card {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 18px; align-items: center;
  padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: inherit;
  transition: all .15s ease; margin-bottom: 10px;
}
.match-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); color: inherit; }
.match-card .rank {
  font-family: var(--serif); font-size: 1.45rem; color: var(--muted);
  text-align: center; line-height: 1;
}
.match-card.top1 .rank, .match-card.top2 .rank, .match-card.top3 .rank { color: var(--gold); }
.match-card .name { font-weight: 600; font-size: 1.04rem; margin-bottom: 3px; letter-spacing: -.005em; }
.match-card .meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.match-card .score { text-align: right; }
.match-card .score .v { font-family: var(--serif); font-size: 1.65rem; line-height: 1; }
.match-card .score .l { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.subbars { display: flex; gap: 3px; margin-top: 7px; }
.subbars i { height: 3px; border-radius: 2px; display: block; background: var(--line-2); flex: 1; position: relative; overflow: hidden; }
.subbars i::after { content: ""; position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 2px; }

.area-row { display: grid; grid-template-columns: 1fr 58px; gap: 14px; align-items: center; margin-bottom: 11px; }
.area-row .lab { font-size: .92rem; }
.area-row .track { height: 8px; background: var(--line); border-radius: 5px; overflow: hidden; margin-top: 5px; }
.area-row .track i { display: block; height: 100%; border-radius: 5px; }
.area-row .val { font-family: var(--serif); font-size: 1.02rem; text-align: right; }

.dim-row { display: grid; grid-template-columns: 148px 1fr 42px; gap: 12px; align-items: center; margin-bottom: 9px; font-size: .9rem; }
.dim-row .track { height: 7px; background: var(--line); border-radius: 5px; overflow: hidden; }
.dim-row .track i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.dim-row .num { text-align: right; font-family: var(--mono); font-size: .8rem; color: var(--muted); }

.tension {
  border-left: 3px solid var(--gold); background: var(--gold-soft);
  padding: 16px 20px; border-radius: 0 11px 11px 0; margin-bottom: 13px;
}
.tension h4 { margin-bottom: .3em; color: var(--ink); }
.tension p { margin: 0; font-size: .93rem; color: var(--ink-2); }

.note {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--paper-2); padding: 17px 21px; border-radius: 0 11px 11px 0;
}
.note p:last-child { margin-bottom: 0; }

.step-list { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.step-list li {
  counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 20px;
}
.step-list li::before {
  content: counter(s); position: absolute; left: 0; top: -1px;
  width: 29px; height: 29px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center;
  font-size: .84rem; font-weight: 680; font-family: var(--sans);
}
.step-list li b { display: block; margin-bottom: 2px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tag-list li {
  font-size: .82rem; padding: 5px 11px; border-radius: 8px;
  background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-2);
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ok-box  { border-left: 3px solid var(--good); background: color-mix(in srgb, var(--good) 7%, var(--surface)); padding: 16px 19px; border-radius: 0 11px 11px 0; }
.no-box  { border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); padding: 16px 19px; border-radius: 0 11px 11px 0; }
.ok-box h4, .no-box h4 { margin-bottom: .25em; }
.ok-box p, .no-box p { margin: 0; font-size: .93rem; color: var(--ink-2); }

/* --------------------------------------------------------------- catálogo -- */

.cat-area { margin-bottom: 40px; }
.cat-area h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cat-area h3 .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 9px; }
.cat-item {
  display: block; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); text-decoration: none; color: inherit; transition: all .13s ease;
}
.cat-item:hover { border-color: var(--accent); color: inherit; transform: translateY(-1px); box-shadow: var(--shadow); }
.cat-item .n { font-weight: 560; font-size: .93rem; line-height: 1.3; }
.cat-item .c { font-family: var(--mono); font-size: .72rem; color: var(--muted); margin-top: 3px; letter-spacing: .08em; }

/* ---------------------------------------------------------------- varios -- */

.hexwrap { display: grid; place-items: center; }
.hex-label { font-size: .74rem; font-weight: 640; letter-spacing: .04em; }

footer.site {
  border-top: 1px solid var(--line); margin-top: 70px; padding: 34px 0 46px;
  color: var(--muted); font-size: .87rem;
}
footer.site a { color: var(--ink-2); }

/* Marca de la organización. El logo es de fondo transparente; en tema oscuro
   se le da una placa clara para que el gris del texto no se pierda. */
.marca {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding-bottom: 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.marca-logo { display: inline-block; line-height: 0; flex: none; }
.marca-logo img { width: 280px; max-width: 70vw; height: auto; display: block; }
[data-theme="dark"] .marca-logo img {
  background: #fff; padding: 12px 16px; border-radius: 12px; width: 300px;
}
.marca-txt { flex: 1; min-width: 240px; max-width: 52ch; font-size: .9rem; }
.marca-n { font-family: var(--serif); font-size: 1.12rem; color: var(--ink); margin-bottom: 4px; }

.skeleton { padding: 80px 24px; text-align: center; color: var(--muted); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .q { grid-template-columns: 1fr; gap: 12px; }
  .opts { justify-content: space-between; }
  .opt { width: 100%; max-width: 58px; }
  .split { grid-template-columns: 1fr; }
  .match-card { grid-template-columns: 34px 1fr; }
  .match-card .score { grid-column: 2; text-align: left; display: flex; align-items: baseline; gap: 7px; }
  .dim-row { grid-template-columns: 110px 1fr 38px; font-size: .85rem; }
  .stats { gap: 22px; }
  .topbar nav a.hide-sm { display: none; }
}

@media print {
  .topbar, .quiz-nav, .no-print, footer.site { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { break-inside: avoid; border-color: #ccc; }
  .match-card { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* ---------------------------------------------- cuestionario: comodidad -- */

/* La pregunta activa. Sin esto, el teclado es invisible y nadie lo usa. */
.q.focus {
  position: relative;
}
.q.focus::before {
  content: ""; position: absolute; left: -18px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 3px; background: var(--accent);
}
.q.focus .qtext, .q.focus .bipolar-poles span { color: var(--ink); }
.q.destacar { animation: destello 1.4s ease; }
@keyframes destello {
  0%, 100% { background: transparent; }
  20%      { background: var(--accent-soft); }
}

#quiz { transition: opacity .18s ease, transform .18s ease; }
#quiz.saliendo { opacity: 0; transform: translateY(-6px); }

.scale-legend .sl-mid { text-align: center; flex: 1; }

.btn.listo { animation: pulso 1.6s ease-in-out infinite; }
@keyframes pulso {
  0%, 100% { box-shadow: 0 1px 2px rgba(0,0,0,.12); }
  50%      { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
}

.auto-toggle {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: .8rem; color: var(--muted); margin-left: 14px; user-select: none;
  white-space: nowrap;
}
.auto-toggle input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.auto-toggle:hover { color: var(--ink-2); }

.kbd-hint {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
  font-size: .78rem; color: var(--muted); padding: 12px 0 4px; margin-bottom: 6px;
}
.kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px;
  background: var(--surface); font-family: var(--mono); font-size: .72rem; color: var(--ink-2);
}

/* ------------------------------------------------ pantalla de revisión --- */

.rev-block { margin-bottom: 26px; }
.rev-block h4 {
  position: sticky; top: 56px; background: var(--paper); z-index: 5;
  padding: 8px 0; margin: 0 0 4px; border-bottom: 1px solid var(--line);
}
.rev-item {
  display: flex; gap: 16px; align-items: baseline; width: 100%; text-align: left;
  padding: 9px 10px; border: none; border-bottom: 1px solid var(--line);
  background: transparent; cursor: pointer; color: inherit;
  font-family: var(--sans); font-size: .91rem; border-radius: 7px;
}
.rev-item:hover { background: var(--paper-2); }
.rev-item .rt { flex: 1; color: var(--ink-2); line-height: 1.35; }
.rev-item .rv {
  flex: none; font-size: .8rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 7px; white-space: nowrap;
}
.rev-item.sin .rv { color: var(--warn); background: var(--gold-soft); }

/* ------------------------------------------------ reanudar en portada ---- */

.resume {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  background: var(--accent-soft); border: 1px solid transparent;
  border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0;
  padding: 15px 20px; margin-bottom: 26px;
}
.resume .rtxt { flex: 1; min-width: 220px; font-size: .94rem; }
.resume .rtxt b { color: var(--accent); }
.resume .mini {
  height: 5px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 22%, transparent);
  overflow: hidden; margin-top: 7px;
}
.resume .mini i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.linkish {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--sans); font-size: .85rem; text-decoration: underline;
  text-underline-offset: 3px; padding: 4px;
}
.linkish:hover { color: var(--ink); }

@media (max-width: 720px) {
  .q.focus::before { left: -12px; }
  .auto-toggle { display: none; }
  .rev-item { flex-direction: column; gap: 5px; }
  .rev-item .rv { align-self: flex-start; }
}
