/* deepfolio · páginas de la sección Inversión (glosario, enlaces de interés y test de riesgo). */

body { overflow-x: hidden; line-height: 1.6; }

/* ===== Cabecera (igual que FAQ) ===== */
.page-header { padding: 10rem 2rem 3rem; text-align: center; position: relative; }
.page-header-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.page-header h1 { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; margin: 0 0 1rem; line-height: 1.15; text-wrap: balance; }
.page-header p { font-size: 1.05rem; color: var(--cream); opacity: 0.65; font-weight: 300; line-height: 1.7; margin: 0; }

.inv-main { max-width: 920px; margin: 0 auto; padding: 0 2rem 6rem; display: grid; gap: 2rem; }
.inv-note { margin: 0; font-size: 0.85rem; color: rgba(245,237,228,0.55); line-height: 1.7; max-width: 75ch; }
.inv-note a, .gl-empty a { color: var(--gold-light); }

/* ===== Glosario ===== */
.gl-tools {
  position: sticky; top: 72px; z-index: 5; display: grid; gap: 0.9rem; padding: 1rem 1.1rem;
  background: rgba(26, 10, 14, 0.92); backdrop-filter: blur(12px);
  border: 1px solid rgba(123, 45, 53, 0.3); border-radius: 14px;
}
.gl-search { position: relative; display: flex; align-items: center; }
.gl-search .ico { position: absolute; left: 1rem; width: 17px; height: 17px; color: var(--gold-light); opacity: 0.6; pointer-events: none; }
.gl-search input {
  width: 100%; padding: 0.85rem 1rem 0.85rem 2.8rem; border-radius: 10px; font-size: 1rem; font-family: var(--font-sans);
  background: rgba(42, 16, 21, 0.8); border: 1px solid rgba(123, 45, 53, 0.35); color: var(--cream); outline: none;
}
.gl-search input::placeholder { color: rgba(245,237,228,0.55); }
.gl-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1); }
.gl-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gl-chip {
  font-family: var(--font-sans); font-size: 0.8rem; color: var(--cream); cursor: pointer;
  padding: 0.35rem 0.85rem; border-radius: 50px; border: 1px solid rgba(123, 45, 53, 0.4); background: transparent;
}
.gl-chip:hover { border-color: var(--burgundy-mid); }
.gl-chip.active { border-color: var(--gold); color: var(--gold-light); background: rgba(201,168,76,0.08); }
.gl-letters { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.gl-letters a, .gl-letters span { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 6px; font-family: var(--font-display); font-size: 0.95rem; }
.gl-letters a { color: var(--gold-light); text-decoration: none; }
.gl-letters a:hover { background: rgba(201,168,76,0.12); }
.gl-letters a.off { color: rgba(245,237,228,0.2); pointer-events: none; }
.gl-letters span { color: rgba(245,237,228,0.15); }
.gl-count { margin: 0; font-size: 0.8rem; color: rgba(245,237,228,0.55); }

.gl-list { display: grid; gap: 2.2rem; }
.gl-letter { display: grid; gap: 0.9rem; scroll-margin-top: 300px; }
.gl-letter[hidden] { display: none; }
.gl-letter h2 { margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 2rem; color: var(--gold); line-height: 1; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(123, 45, 53, 0.25); }
.gl-term {
  display: grid; gap: 0.55rem; padding: 1.3rem 1.4rem; border-radius: 14px; scroll-margin-top: 300px;
  background: rgba(42, 16, 21, 0.55); border: 1px solid rgba(123, 45, 53, 0.25); transition: border-color 0.3s;
}
.gl-term[hidden] { display: none; }
.gl-term:target, .gl-term.flash { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); }
.gl-term-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; }
.gl-term h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--cream); }
.gl-cat { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: rgba(245,237,228,0.55); }
.gl-term p { margin: 0; font-size: 0.97rem; color: rgba(245,237,228,0.8); line-height: 1.7; max-width: 70ch; }
.gl-term .gl-example { font-size: 0.9rem; color: rgba(245,237,228,0.65); padding-left: 0.9rem; border-left: 2px solid rgba(201,168,76,0.4); }
.gl-term .gl-example b { color: var(--gold-light); font-weight: 600; }
.gl-link { justify-self: start; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; font-weight: 600; color: var(--gold-light); text-decoration: none; }
.gl-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.gl-link .ico { width: 14px; height: 14px; }
.gl-empty { margin: 0; text-align: center; color: rgba(245,237,228,0.6); }
.gl-empty[hidden] { display: none; }
mark { background: rgba(201, 168, 76, 0.25); color: var(--gold-pale); padding: 0 2px; border-radius: 2px; }

/* ===== Enlaces de interés ===== */
.ln-list { display: grid; gap: 2.5rem; }
.ln-group { display: grid; gap: 1.1rem; }
.ln-head { display: flex; gap: 0.9rem; align-items: flex-start; }
.ln-ico { flex-shrink: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(123, 45, 53, 0.2); border: 1px solid rgba(123, 45, 53, 0.3); color: var(--gold); }
.ln-ico .ico { width: 19px; height: 19px; }
.ln-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; }
.ln-head p { margin: 0.2rem 0 0; font-size: 0.92rem; color: rgba(245,237,228,0.6); line-height: 1.6; }
.ln-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ln-card {
  display: grid; gap: 0.45rem; align-content: start; padding: 1.2rem 1.3rem; border-radius: 14px; text-decoration: none; color: var(--cream);
  background: rgba(42, 16, 21, 0.55); border: 1px solid rgba(123, 45, 53, 0.25); transition: border-color 0.25s, transform 0.25s;
}
.ln-card:hover { border-color: rgba(201,168,76,0.55); transform: translateY(-2px); }
.ln-name { display: flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.ln-name .ico { width: 15px; height: 15px; color: var(--gold); flex-shrink: 0; }
.ln-text { font-size: 0.92rem; color: rgba(245,237,228,0.72); line-height: 1.6; }
.ln-domain { font-size: 0.78rem; color: var(--gold-light); opacity: 0.75; }

/* ===== Subsecciones de Inversión ===== */
.inv-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin-top: 1.6rem; }
.inv-tabs a { font-size: 0.85rem; padding: 0.45rem 0.95rem; border-radius: 50px; border: 1px solid rgba(123, 45, 53, 0.4); text-decoration: none; color: var(--cream); }
.inv-tabs a:hover { border-color: var(--gold); }
.inv-tabs a[aria-current="page"] { border-color: var(--gold); color: var(--gold-light); background: rgba(201,168,76,0.08); }

@media (max-width: 760px) {
  .page-header { padding: 7.5rem 1rem 2rem; }
  .inv-main { padding: 0 1rem 4rem; }
  .gl-tools { position: static; padding: 0.8rem; }
  .gl-letters { gap: 0.25rem; }
  .gl-letter, .gl-term { scroll-margin-top: 84px; }
  .gl-term { padding: 1.1rem 1.1rem; }
  .ln-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Test de riesgo ===== */
.rt-main { max-width: 760px; }
.rt-card {
  display: grid; gap: 1.1rem; padding: 1.8rem 2rem; border-radius: 16px;
  background: rgba(42, 16, 21, 0.55); border: 1px solid rgba(123, 45, 53, 0.3);
}
.rt-card[hidden], .rt-result[hidden], .rt-prev[hidden], .rt-hint[hidden] { display: none; }
.rt-card h2 { margin: 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.rt-card h3 { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.rt-prev { font-size: 0.9rem; color: rgba(245,237,228,0.75); padding: 0.7rem 1rem; border-radius: 10px; background: rgba(201,168,76,0.07); border: 1px solid rgba(201,168,76,0.25); }
.rt-prev b { color: var(--gold-light); }
.rt-prev button, .rt-again {
  font: inherit; font-weight: 600; color: var(--gold-light); background: none; border: none; cursor: pointer; padding: 0;
  text-decoration: underline; text-underline-offset: 3px;
}
.rt-points { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.8rem; }
.rt-points li { position: relative; padding-left: 1.4rem; font-size: 0.97rem; color: rgba(245,237,228,0.78); line-height: 1.6; }
.rt-points li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.rt-points b { color: var(--cream); font-weight: 600; }
.rt-start { justify-self: start; }

/* Preguntas */
.rt-progress { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.rt-block { color: var(--gold); font-weight: 600; }
.rt-step { color: rgba(245,237,228,0.55); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-bar { height: 4px; border-radius: 2px; background: rgba(245,237,228,0.07); overflow: hidden; margin-top: -0.4rem; }
.rt-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width 0.3s; }
.rt-q { border: 0; margin: 0; padding: 0; display: grid; gap: 0.6rem; min-width: 0; }
.rt-q legend { padding: 0; font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.rt-hint { margin: 0; font-size: 0.9rem; color: rgba(245,237,228,0.6); }
.rt-options { display: grid; gap: 0.55rem; margin-top: 0.5rem; }
.rt-opt { display: flex; align-items: center; gap: 0.8rem; padding: 0.9rem 1.1rem; border-radius: 12px; cursor: pointer;
  background: rgba(26, 10, 14, 0.6); border: 1px solid rgba(123, 45, 53, 0.35); transition: border-color 0.2s, background 0.2s; }
.rt-opt:hover { border-color: rgba(201,168,76,0.5); }
.rt-opt input { appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin: 0; border-radius: 50%; border: 1.5px solid rgba(245,237,228,0.35); display: grid; place-items: center; }
.rt-opt input::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform 0.15s; }
.rt-opt input:checked { border-color: var(--gold); }
.rt-opt input:checked::after { transform: scale(1); }
.rt-opt input:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.rt-opt:has(input:checked) { border-color: var(--gold); background: rgba(201,168,76,0.08); }
.rt-opt span { font-size: 0.97rem; line-height: 1.45; }
.rt-nav { display: flex; }
.rt-back { display: inline-flex; align-items: center; gap: 0.4rem; font: inherit; font-size: 0.9rem; color: rgba(245,237,228,0.7); background: none; border: none; cursor: pointer; padding: 0.3rem 0; }
.rt-back:hover:not(:disabled) { color: var(--gold-light); }
.rt-back:disabled { opacity: 0.3; cursor: default; }
.rt-back .ico, .rt-again .ico { width: 15px; height: 15px; }

/* Resultado */
.rt-result { display: grid; gap: 1.2rem; }
.rt-result, #rtQuiz { scroll-margin-top: 90px; }
.rt-res-main { border-color: rgba(201,168,76,0.4); }
.rt-eyebrow { margin: 0 0 -0.6rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold); font-weight: 600; }
.rt-res-main h2 { font-size: clamp(2rem, 5vw, 2.6rem); font-style: italic; color: var(--gold-light); font-weight: 500; }
.rt-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; }
.rt-scale span { display: grid; gap: 0.4rem; font-size: 0.72rem; color: rgba(245,237,228,0.55); line-height: 1.25; }
.rt-scale i { display: block; height: 6px; border-radius: 3px; background: rgba(245,237,228,0.08); }
.rt-scale .past i { background: rgba(201,168,76,0.35); }
.rt-scale .on i { background: var(--gold); }
.rt-scale .on { color: var(--gold-light); font-weight: 600; }
.rt-res-text { margin: 0; font-size: 1rem; color: rgba(245,237,228,0.82); line-height: 1.7; }
.rt-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.rt-facts div { display: grid; gap: 0.2rem; padding: 0.9rem 1rem; border-radius: 12px; background: rgba(26, 10, 14, 0.6); border: 1px solid rgba(123, 45, 53, 0.3); }
.rt-facts span { font-size: 0.75rem; color: rgba(245,237,228,0.55); text-transform: uppercase; letter-spacing: 0.6px; line-height: 1.35; }
.rt-facts b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-small { margin: 0; font-size: 0.82rem; color: rgba(245,237,228,0.55); line-height: 1.6; }
.rt-blockrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 8.5rem; gap: 1rem; align-items: center; padding: 0.8rem 0; border-top: 1px solid rgba(123, 45, 53, 0.25); }
.rt-blockrow b { display: block; font-weight: 600; }
.rt-blockrow span { font-size: 0.85rem; color: rgba(245,237,228,0.55); }
.rt-blockrow em { font-style: normal; font-size: 0.9rem; color: var(--gold-light); text-align: right; }
.rt-dots { display: flex; gap: 4px; }
.rt-dots i { width: 18px; height: 6px; border-radius: 3px; background: rgba(245,237,228,0.1); }
.rt-dots i.on { background: var(--gold); }
.rt-notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.rt-notes li { font-size: 0.93rem; color: rgba(245,237,228,0.78); line-height: 1.6; padding: 0.8rem 1rem; border-radius: 10px; background: rgba(201,168,76,0.06); border-left: 2px solid var(--gold); }
.rt-notes b { color: var(--cream); }
.rt-next-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.rt-next-grid a { display: grid; gap: 0.35rem; align-content: start; padding: 1rem 1.1rem; border-radius: 12px; text-decoration: none; color: var(--cream);
  background: rgba(26, 10, 14, 0.6); border: 1px solid rgba(123, 45, 53, 0.3); transition: border-color 0.2s; }
.rt-next-grid a:hover { border-color: rgba(201,168,76,0.55); }
.rt-next-grid b { font-size: 0.95rem; color: var(--gold-light); }
.rt-next-grid span { font-size: 0.85rem; color: rgba(245,237,228,0.65); line-height: 1.55; }
.rt-again { justify-self: start; display: inline-flex; align-items: center; gap: 0.4rem; text-decoration: none; }
.rt-again:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .rt-card { padding: 1.3rem 1.1rem; }
  .rt-q legend { font-size: 1.25rem; }
  .rt-facts, .rt-next-grid { grid-template-columns: minmax(0, 1fr); }
  .rt-scale span { font-size: 0; gap: 0; }
  .rt-scale .on { font-size: 0.75rem; gap: 0.4rem; }
  .rt-blockrow { grid-template-columns: minmax(0, 1fr) auto; }
  .rt-blockrow em { grid-column: 1 / -1; text-align: left; margin-top: -0.6rem; }
}
