/* ═══════════════════════════════════════════
   DOC — páginas de texto (about, faq, rules, legal, guide…).
   Columna única centrada + prosa. Reusa tokens y .btn-primary
   de home.css.
   ═══════════════════════════════════════════ */

.doc {
  margin-top: var(--nav-h);
  padding: 18px 18px calc(var(--bottom-h) + 28px);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Migas ── */
.doc-crumbs ol {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}

.doc-crumbs a {
  color: var(--grey);
  transition: color .18s;
}

.doc-crumbs a:hover {
  color: var(--green);
}

.doc-crumbs li+li::before {
  content: "/";
  margin-right: 7px;
  color: var(--muted);
}

/* ── Cabecera ── */
.doc-head {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.doc-kicker {
  color: var(--green);
  font: 700 10px/1 'Inter', system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.doc-h1 {
  font: 400 32px/1.02 'Bebas Neue', 'Inter', system-ui, sans-serif;
  letter-spacing: .02em;
  color: var(--white);
}

.doc-lead {
  margin-top: 10px;
  color: var(--grey);
  font-size: 14.5px;
  line-height: 1.7;
}

.doc-updated {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Prosa ── */
.doc-body {
  color: var(--grey);
  font-size: 14px;
  line-height: 1.75;
}

.doc-body h2 {
  color: var(--white);
  font: 400 22px/1.1 'Bebas Neue', 'Inter', system-ui, sans-serif;
  letter-spacing: .03em;
  margin: 30px 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}

.doc-body h2:first-child {
  margin-top: 0;
}

.doc-body h3 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  margin: 20px 0 6px;
}

.doc-body p {
  margin-bottom: 12px;
}

.doc-body strong {
  color: var(--white);
  font-weight: 600;
}

.doc-body a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.doc-body a:hover {
  color: var(--white);
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 14px 18px;
  padding: 0;
}

.doc-body ul {
  list-style: disc;
}

.doc-body ol {
  list-style: decimal;
}

.doc-body li {
  margin-bottom: 6px;
}

.doc-body li::marker {
  color: var(--green);
}

.doc-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* ── Tarjetas dentro de la prosa (FAQ, equipos, reglas) ── */
.doc-cards {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.doc-card {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg2);
  padding: 14px 16px;
}

.doc-card h3 {
  margin: 0 0 6px;
  color: var(--white);
}

.doc-card p:last-child,
.doc-card ul:last-child {
  margin-bottom: 0;
}

/* FAQ plegable — sin JS */
details.doc-card>summary {
  cursor: pointer;
  list-style: none;
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

details.doc-card>summary::-webkit-details-marker {
  display: none;
}

details.doc-card>summary::after {
  content: "+";
  color: var(--green);
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}

details.doc-card[open]>summary::after {
  content: "–";
}

details.doc-card>summary:hover {
  color: var(--green);
}

details.doc-card[open]>summary {
  margin-bottom: 8px;
}

/* Aviso destacado */
.doc-note {
  border: 1px solid var(--border);
  border-left: 2px solid var(--green);
  border-radius: var(--r);
  background: var(--bg2);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.doc-note p:last-child {
  margin-bottom: 0;
}

.doc-note.warn {
  border-left-color: #e0a63a;
}

/* Índice de la guía */
.doc-toc {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg2);
  padding: 12px 14px;
  margin-bottom: 22px;
}

.doc-toc ul {
  list-style: none;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.doc-toc li {
  margin: 0;
}

.doc-toc a {
  color: var(--grey);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.doc-toc a:hover {
  color: var(--green);
}

/* Anclas: que el sticky topnav no tape el título al saltar */
.doc-body [id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

/* Etiquetas de código (reglas de la comunidad) */
.doc-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--green);
  white-space: nowrap;
}

/* ── Formulario (contacto) ── */
.doc-form {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg2);
  padding: 16px;
  margin-bottom: 8px;
}

.doc-field {
  margin-bottom: 14px;
}

.doc-lbl {
  display: block;
  margin-bottom: 6px;
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}

.doc-opt {
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .1em;
  margin-left: 4px;
}

.doc-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  transition: border-color .18s;
}

.doc-input::placeholder {
  color: var(--muted);
}

.doc-input:focus {
  outline: none;
  border-color: var(--green);
}

.doc-input.has-err {
  border-color: #e06a6a;
}

.doc-area {
  resize: vertical;
  line-height: 1.6;
}

.doc-file {
  width: 100%;
  color: var(--grey);
  font-size: 12px;
}

.doc-file::file-selector-button {
  margin-right: 10px;
  padding: 9px 12px;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
  color: var(--white);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.doc-file::file-selector-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.doc-err {
  margin: 6px 0 0;
  color: #e06a6a;
  font-size: 11.5px;
}

.doc-submit {
  min-height: 46px;
  width: 100%;
  justify-content: center;
}

/* ── CTA final ── */
.doc-cta {
  margin-top: 34px;
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg2);
}

.doc-cta-h {
  color: var(--white);
  font: 400 21px/1 'Bebas Neue', 'Inter', system-ui, sans-serif;
  letter-spacing: .03em;
  margin-bottom: 5px;
}

.doc-cta-p {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 13px;
}

.doc-cta .btn-primary {
  min-height: 44px;
}

@media (min-width: 900px) {
  .doc {
    padding: 26px 24px 60px;
  }

  .doc-h1 {
    font-size: 42px;
  }

  .doc-cards.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
