/* deepfolio · Guías de inversión (inversion/guias/, generadas con Extras\guias\gen_guias.py; mejora 70).
   Solo variables de color: valen igual en Burdeos y en Claro. Esquinas rectas. */

.gu-main { max-width: 760px; margin: 0 auto; padding: 0 1.5rem 6rem; display: grid; gap: 3rem; }
.gu-main-ancho { max-width: 1040px; gap: 2rem; }

/* Cabecera de cada guía */
.gu-header .page-header-content { max-width: 760px; }
.gu-header h1 em, .page-header h1 em { font-style: italic; color: var(--gold-light); }
.gu-miga { display: flex; justify-content: center; gap: 0.6rem; margin-bottom: 1.2rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); font-weight: 600; }
.gu-miga a { color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }
.gu-miga a:hover { border-color: var(--gold); }
.gu-fecha { margin-top: 1rem !important; font-size: 0.82rem !important; opacity: 0.5 !important; }

/* Texto del artículo */
.gu-articulo { font-size: 1.04rem; line-height: 1.75; color: var(--cream); }
.gu-articulo > * + * { margin-top: 1.1rem; }
.gu-articulo h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; line-height: 1.25; margin-top: 2.6rem; color: var(--cream); position: relative; padding-bottom: 0.6rem; }
.gu-articulo h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 48px; height: 2px; background: var(--gold); }
.gu-articulo h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin-top: 1.8rem; color: var(--gold-light); }
.gu-articulo p, .gu-articulo li { color: color-mix(in srgb, var(--cream) 86%, transparent); }
.gu-articulo strong { color: var(--cream); font-weight: 600; }
.gu-articulo a { color: var(--gold-light); text-underline-offset: 3px; }
.gu-articulo ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.gu-articulo li::marker { color: var(--gold); }

/* Tablas */
.gu-tabla-caja { overflow-x: auto; border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); }
.gu-tabla { width: 100%; border-collapse: collapse; font-size: 0.93rem; font-variant-numeric: tabular-nums; }
.gu-tabla caption { text-align: left; padding: 0.8rem 1rem 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; }
.gu-tabla th, .gu-tabla td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid color-mix(in srgb, var(--cream) 10%, transparent); vertical-align: top; }
.gu-tabla thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); font-weight: 600; }
.gu-tabla tbody th { font-weight: 600; color: var(--cream); }
.gu-tabla tr:last-child td, .gu-tabla tr:last-child th { border-bottom: 0; }
.gu-tabla .n { text-align: right; white-space: nowrap; }

/* Caja «En deepfolio» */
.gu-caja { margin-top: 2.2rem !important; padding: 1.4rem 1.5rem; border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.gu-caja p { margin: 0; font-size: 0.97rem; }
.gu-caja .gu-caja-tit { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--gold-light); margin-bottom: 0.4rem; }
.gu-caja-btn { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.9rem; font-weight: 600; font-size: 0.92rem; text-decoration: none !important; }
.gu-caja-btn .ico { width: 15px; height: 15px; }
.gu-caja-btn:hover { gap: 0.6rem; }

/* Preguntas */
.gu-faq { margin-top: 2.6rem !important; display: grid; gap: 0.5rem; }
.gu-faq h2 { margin-bottom: 0.6rem; }
.gu-faq-item { border: 1px solid color-mix(in srgb, var(--cream) 14%, transparent); padding: 0.85rem 1.1rem; }
.gu-faq-item summary { cursor: pointer; font-weight: 600; color: var(--cream); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.gu-faq-item summary::-webkit-details-marker { display: none; }
.gu-faq-item summary::after { content: '+'; color: var(--gold); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.gu-faq-item[open] summary::after { content: '−'; }
.gu-faq-item p { margin: 0.6rem 0 0; font-size: 0.95rem; }
.gu-aviso { margin-top: 2rem !important; padding-top: 1.2rem; border-top: 1px solid color-mix(in srgb, var(--cream) 12%, transparent); font-size: 0.85rem !important; color: var(--text-muted) !important; line-height: 1.6; }

/* Tarjetas (índice y «Sigue leyendo») */
.gu-rejilla { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 860px) { .gu-rejilla { grid-template-columns: repeat(3, 1fr); } }   /* 9 guías: 3 × 3; «Sigue leyendo»: 3 */
.gu-sigue h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin: 0 0 1rem; color: var(--cream); }
.gu-tarjeta { display: grid; gap: 0.55rem; align-content: start; padding: 1.4rem; text-decoration: none; color: var(--cream); border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent); background: color-mix(in srgb, var(--bg-card) 70%, transparent); transition: border-color 0.2s, transform 0.2s; }
.gu-tarjeta:hover { border-color: var(--gold); transform: translateY(-2px); }
.gu-tarjeta-ico { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); color: var(--gold); }
.gu-tarjeta-ico .ico { width: 18px; height: 18px; }
.gu-tarjeta h2, .gu-tarjeta h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.3; margin: 0.3rem 0 0; color: var(--cream); }
.gu-tarjeta p { margin: 0; font-size: 0.88rem; line-height: 1.55; color: var(--text-muted); }
.gu-tarjeta-min { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); font-weight: 600; margin-top: 0.3rem; }

@media (max-width: 640px) {
  .gu-main { padding: 0 1rem 4rem; }
  .gu-articulo { font-size: 1rem; }
  .gu-articulo h2 { font-size: 1.35rem; }
  .gu-tabla th, .gu-tabla td { padding: 0.6rem 0.7rem; }
}

/* La hoja con marco ocupa el ancho como en el resto de la web; el contenido va centrado y con un ancho cómodo de leer */
.gu-main > * { width: 100%; max-width: 760px; margin-inline: auto; }
.gu-main-ancho > * { max-width: 1040px; }

/* Etapa 4 · pulir 43: índice de la guía. En pantallas anchas va al lado y acompaña al bajar; si no, arriba como recuadro. */
.gu-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.gu-indice { border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent); padding: 1.1rem 1.3rem; background: color-mix(in srgb, var(--bg-card) 55%, transparent); }
.gu-indice-tit { margin: 0 0 0.6rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); font-weight: 600; }
.gu-indice ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; counter-reset: gi; }
.gu-indice li { counter-increment: gi; }
.gu-indice a { display: flex; gap: 0.6rem; padding: 0.3rem 0 0.3rem 0.7rem; border-left: 2px solid transparent; font-size: 0.9rem; line-height: 1.4; color: color-mix(in srgb, var(--cream) 75%, transparent); text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.gu-indice a::before { content: counter(gi, decimal-leading-zero); font-size: 0.72rem; color: var(--gold); opacity: 0.7; padding-top: 0.15rem; font-variant-numeric: tabular-nums; }
.gu-indice a:hover { color: var(--cream); }
.gu-indice a.activo { color: var(--gold-light); border-left-color: var(--gold); }
.gu-articulo h2[id], .gu-faq h2 { scroll-margin-top: 110px; }
@media (min-width: 1280px) {
  .gu-main > .gu-cuerpo { max-width: none; }
  .gu-cuerpo { grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr); column-gap: 2.5rem; }
  .gu-articulo { grid-column: 2; grid-row: 1; }
  .gu-indice { grid-column: 3; grid-row: 1; align-self: start; position: sticky; top: 110px; max-width: 250px; padding: 0.2rem 0 0.2rem 0; border: 0; background: none; }
}

/* Pulir 44: términos que llevan al glosario */
.gu-articulo a.gu-term { color: inherit; text-decoration: underline dotted color-mix(in srgb, var(--gold) 70%, transparent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.gu-articulo a.gu-term:hover { color: var(--gold-light); text-decoration-style: solid; }
@media print { .gu-indice { display: none; } }
.gu-articulo > h2:first-child { margin-top: 0; }
