/* CTMC · Carreras en minería. Usa las variables del sitio (rediseño La veta, 2026-11). */
.ca-head .btn-row { margin-top: .6rem; }
.ca-head-plain { background: var(--bg-alt); border-bottom: 0; }
.ca-head-plain .wrap { gap: 1rem; }
.ca-head-plain h1 { max-width: 20ch; }
.ca-back { text-decoration: none; }
.ca-back:hover { text-decoration: underline; text-underline-offset: 4px; }

/* La vida de una mina: la veta */
.ca-vida .section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.ca-veta { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; padding-top: 34px; }
.ca-veta::before { content: ""; position: absolute; top: 12px; left: 22px; right: 22px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, #F9A21B, var(--accent-fill) 55%, #B5460C); }
.ca-stage { position: relative; display: flex; flex-direction: column; gap: .45rem; text-decoration: none; color: var(--fg);
  background: var(--surface); border-radius: 24px; padding: 20px 18px 18px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease; }
.ca-stage:hover { transform: translateY(-4px); box-shadow: var(--shadow-hi); }
.ca-veta .ca-stage::before { content: ""; position: absolute; top: -29px; left: 22px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--accent-fill); }
.ca-n { font: 800 .82rem/1 var(--f-display); color: var(--accent); letter-spacing: .04em; }
.ca-stage strong { font: 700 1.08rem/1.15 var(--f-display); letter-spacing: -.01em; }
.ca-d { font-size: .9rem; line-height: 1.45; color: var(--fg-soft); }
.ca-c { margin-top: auto; padding-top: .35rem; display: inline-flex; align-items: center; gap: .35rem; font: 700 .84rem var(--f-display); color: var(--accent); }
.ca-c svg { width: 14px; height: 14px; transition: transform .2s; }
.ca-stage:hover .ca-c svg { transform: translateX(3px); }
.ca-frentes-head { margin: clamp(44px, 6vw, 72px) 0 18px; display: flex; flex-direction: column; gap: .4rem; max-width: 62ch; }
.ca-frentes-head h3 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
.ca-frentes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.ca-frentes .ca-stage { background: var(--bg-alt); box-shadow: none; border: 1px solid var(--line); }
.ca-frentes .ca-stage:hover { background: var(--surface); }
@media (max-width: 1100px) {
  .ca-veta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ca-frentes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ca-veta { grid-template-columns: 1fr; gap: 12px; padding: 0 0 0 30px; }
  .ca-veta::before { top: 14px; bottom: 14px; left: 8px; right: auto; width: 4px; height: auto;
    background: linear-gradient(180deg, #F9A21B, var(--accent-fill) 55%, #B5460C); }
  .ca-veta .ca-stage::before { top: 22px; left: -29px; }
  .ca-frentes { grid-template-columns: 1fr; }
}

/* Test */
.ca-quiz-sec { padding: clamp(24px, 4vw, 40px) 16px clamp(64px, 8vw, 104px); scroll-margin-top: 90px; }
.ca-quiz-box { max-width: 1020px; margin: 0 auto; background: var(--surface); border-radius: 36px; padding: clamp(24px, 4.5vw, 52px);
  box-shadow: 0 30px 60px -34px rgba(11, 34, 69, .45); }
.ca-quiz-top { display: flex; flex-direction: column; gap: .6rem; max-width: 60ch; }
.ca-quiz-top h2, .ca-res-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.ca-bar { height: 6px; background: var(--bg-alt); border-radius: 6px; overflow: hidden; margin: 28px 0 12px; }
.ca-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #F9A21B, var(--accent-fill)); border-radius: 6px; transition: width .35s ease; }
.ca-step { font: 700 .82rem var(--f-display); color: var(--accent); letter-spacing: .04em; margin-bottom: .6rem; }
.ca-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.ca-q legend { padding: 0; font: 800 clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem)/1.15 var(--f-display); letter-spacing: -.02em; color: var(--fg); text-wrap: balance; }
.ca-hint { color: var(--fg-soft); margin: .45rem 0 1.2rem; }
.ca-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.ca-opt { font: 600 1rem/1.3 var(--f-body); text-align: left; min-height: 48px; padding: 11px 20px; border-radius: 999px; border: 1.5px solid rgba(11, 34, 69, .26);
  background: var(--surface); color: #0B2245; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
.ca-opt:hover { transform: translateY(-2px); border-color: #0B2245; }
.ca-opt[aria-pressed="true"] { background: #0B2245; color: #FFFFFF; border-color: #0B2245; }
.ca-opt.is-nose { border-style: dashed; }
.ca-opt.is-nose[aria-pressed="true"] { border-style: solid; }
.ca-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.ca-nav [data-next] { margin-left: auto; }
.ca-nav .btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.ca-privacy { margin-top: 20px; display: flex; gap: .5rem; align-items: baseline; }
.ca-privacy::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--ok-fill); transform: translateY(-1px); }

/* Resultados */
.ca-results:focus { outline: none; }
.ca-res-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 28px; }
.ca-res-head > div { display: flex; flex-direction: column; gap: .5rem; max-width: 62ch; }
.ca-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 18px; }
.ca-card { display: flex; flex-direction: column; gap: .7rem; background: var(--bg); border: 1px solid var(--line); border-radius: 26px; padding: 22px; }
.ca-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ca-tag { font: 700 .76rem var(--f-display); background: var(--chip); color: #0B2245; padding: .32rem .7rem; border-radius: 999px; }
.ca-pct { font: 800 .9rem var(--f-display); color: var(--accent); white-space: nowrap; }
.ca-card h3 { font-size: 1.28rem; line-height: 1.15; }
.ca-card h3 a { text-decoration: none; color: inherit; }
.ca-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.ca-card-d { color: var(--fg-soft); font-size: .97rem; line-height: 1.5; }
.ca-why { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.ca-why li { position: relative; padding-left: 1.3rem; font-size: .9rem; line-height: 1.4; color: var(--fg); }
.ca-why li::before { content: ""; position: absolute; left: 0; top: .42em; width: 9px; height: 9px; border-radius: 3px; background: #F9A21B; transform: rotate(45deg); }
.ca-card-entry { display: flex; flex-direction: column; gap: .3rem; border-radius: 16px; padding: 12px 14px; font-size: .9rem; line-height: 1.45; }
.ca-card-entry strong { font: 700 .82rem var(--f-display); }
.ca-card-entry.is-ready { background: var(--ok-soft); }
.ca-card-entry.is-ready strong { color: var(--ok); }
.ca-card-entry.is-train { background: #FBEBD9; }
.ca-card-entry.is-train strong { color: #8A4A0E; }
.ca-card .link-arrow { margin-top: auto; }
.ca-more { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 26px; }

/* Banda del Registry y del test */
.ca-reg, .ca-test-band { padding: 0 16px clamp(64px, 8vw, 104px); }
.ca-reg-in, .ca-test-in { position: relative; overflow: hidden; background: #0B2245; color: #F4F7FB; border-radius: clamp(28px, 4vw, 44px);
  padding: clamp(32px, 5vw, 60px) clamp(24px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.ca-reg-in::after, .ca-test-in::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  border: 2px solid rgba(249, 162, 27, .35); box-shadow: 0 0 0 26px rgba(249, 162, 27, .08), 0 0 0 54px rgba(249, 162, 27, .05); pointer-events: none; }
.ca-reg-in > div:first-child, .ca-test-in > div:first-child { flex: 1 1 380px; display: flex; flex-direction: column; gap: .7rem; position: relative; z-index: 1; }
.ca-reg-in h2, .ca-test-in h2 { color: #FFFFFF; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.ca-reg-in p, .ca-test-in p { color: #C9D4E4; max-width: 56ch; }
.ca-reg-in .btn-row, .ca-test-in .btn-row { position: relative; z-index: 1; }
.ca-reg-in .btn.ghost, .ca-test-in .btn.ghost { background: transparent; color: #FFFFFF; border-color: rgba(255, 255, 255, .6); }
.ca-reg-in .btn.ghost:hover, .ca-test-in .btn.ghost:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, .08); }

/* Índice de roles */
.ca-group { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: clamp(8px, 2vw, 16px) 0 18px; }
.ca-group:not(:first-child) { margin-top: clamp(48px, 6vw, 80px); }
.ca-ix { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px 40px; padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.ca-ix-h { display: flex; flex-direction: column; gap: .45rem; }
.ca-ix-h h3 { font-size: 1.35rem; }
.ca-ix-h p { font-size: .95rem; line-height: 1.5; }
.ca-ix-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.ca-role { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--fg); background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 16px 18px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.ca-role:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.ca-role strong { font: 700 1.02rem/1.2 var(--f-display); }
.ca-role span { font-size: .88rem; line-height: 1.45; color: var(--fg-soft); }
@media (max-width: 820px) { .ca-ix { grid-template-columns: 1fr; } }

/* Página de un rol */
.ca-role-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.ca-role-main { display: flex; flex-direction: column; gap: 22px; }
.ca-entry { background: var(--surface); border-radius: 28px; padding: clamp(22px, 3.5vw, 36px); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.ca-entry::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, #F9A21B, var(--accent-fill)); }
.ca-entry h2, .ca-where h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.ca-entry p { font-size: 1.15rem; line-height: 1.55; }
.ca-where { background: var(--bg-alt); border-radius: 28px; padding: clamp(22px, 3.5vw, 36px); }
.ca-where-s { display: flex; flex-direction: column; gap: .25rem; color: var(--fg-soft); }
.ca-where-s strong { color: var(--fg); font-family: var(--f-display); font-size: 1.05rem; }
.ca-mini { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; }
.ca-mini::before { content: ""; position: absolute; left: 6%; right: 6%; top: 7px; height: 3px; background: var(--line-strong); border-radius: 3px; }
.ca-mini li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; }
.ca-mini li::before { content: ""; width: 17px; height: 17px; border-radius: 50%; background: var(--bg-alt); border: 3px solid var(--line-strong); position: relative; z-index: 1; }
.ca-mini li.on::before { background: var(--accent-fill); border-color: var(--accent-fill); box-shadow: 0 0 0 5px rgba(239, 97, 27, .2); }
.ca-mini span { font-size: .72rem; line-height: 1.2; color: var(--fg-soft); }
.ca-mini li.on span { color: var(--fg); font-weight: 700; }
.ca-facts { display: flex; flex-direction: column; gap: 22px; }
.ca-facts h3 { font: 700 .82rem var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-soft); margin-bottom: .6rem; }
.ca-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ca-chips span { font: 600 .92rem/1.3 var(--f-body); padding: .45rem .85rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.ca-otros-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px 24px; margin-bottom: 20px; }
.ca-otros-h h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
@media (max-width: 860px) {
  .ca-role-grid { grid-template-columns: 1fr; }
  .ca-mini span { display: none; }
  .ca-mini li.on span { display: block; position: absolute; top: 26px; white-space: nowrap; }
  .ca-mini { margin-bottom: 18px; }
}

.ca-test-band { padding-bottom: 0; }
.ca-test-band + .section { padding-top: clamp(48px, 6vw, 80px); }

/* Ajustes 2026-11-15 (b): tercer estado de formación y frentes compactos en celular */
.ca-card-entry.is-check { background: var(--bg-alt); }
.ca-card-entry.is-check strong { color: var(--fg-soft); }
@media (max-width: 760px) {
  .ca-frentes .ca-stage { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; padding: 14px 18px; border-radius: 18px; }
  .ca-frentes .ca-d { display: none; }
  .ca-frentes .ca-c { margin: 0; padding: 0; }
}

/* Ajustes 2026-11-15 (c): dónde formarte, voz del sector, compartir y test primero en celular */
.ca-learn { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(20px, 3vw, 30px) clamp(22px, 3.5vw, 36px); }
.ca-learn h2 { font-size: 1.3rem; margin-bottom: .6rem; }
.ca-learn p { color: var(--fg-soft); }
.ca-voz { margin: 0; background: #0B2245; color: #F4F7FB; border-radius: 28px; padding: clamp(22px, 3.5vw, 36px); display: flex; flex-direction: column; gap: 14px; }
.ca-voz .eyebrow { color: #F9A21B; }
.ca-voz blockquote { margin: 0; font: 700 clamp(1.2rem, 1rem + .9vw, 1.55rem)/1.3 var(--f-display); letter-spacing: -.01em; text-wrap: balance; }
.ca-voz figcaption { display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; color: #C9D4E4; }
.ca-voz figcaption strong { color: #FFFFFF; font-family: var(--f-display); font-size: 1rem; }
.ca-voz .link-arrow { color: #F9A21B; margin-top: .5rem; }
.ca-share { margin-left: auto; }
@media (max-width: 760px) {
  .ca-share { margin-left: 0; }
  main:has(> .ca-quiz-sec) { display: flex; flex-direction: column; }
  main:has(> .ca-quiz-sec) > .ca-quiz-sec { order: 1; padding-top: 28px; padding-bottom: 8px; }
  main:has(> .ca-quiz-sec) > .ca-vida { order: 2; }
  main:has(> .ca-quiz-sec) > .ca-reg { order: 3; }
}

/* Subgrupos dentro de los frentes grandes del índice de roles */
.ca-ix-subs { display: flex; flex-direction: column; gap: 26px; }
.ca-sub { scroll-margin-top: 96px; }
.ca-sub h4 { margin: 0 0 10px; font: 700 .82rem/1.2 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* Botón Volver flotante en la lista y las fichas de roles */
.ca-volver { position: fixed; left: 18px; bottom: 18px; z-index: 40; display: inline-flex; align-items: center; gap: .45rem; font: 700 .92rem var(--f-display); color: #fff; background: #0B2245; border: 0; border-radius: 999px; padding: 11px 18px 11px 14px; box-shadow: 0 8px 22px rgba(11, 34, 69, .28); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.ca-volver:hover { background: #C9500F; transform: translateY(-2px); }
.ca-volver svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) { .ca-volver { left: 14px; bottom: 14px; padding: 10px 16px 10px 12px; } }
