/* SelectOR · sección Manual (se carga después de styles.css). */
.mhero { padding: 44px 0 18px; background: radial-gradient(900px 380px at 80% -20%, rgba(76, 175, 80, .16), transparent 60%); }
.mhero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .2em; }
.mhero .lead { color: var(--subtle); font-size: 1.05rem; margin-bottom: 20px; }

/* ---------- buscador ---------- */
.msearch { position: relative; max-width: 720px; }
.msearch svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: var(--subtle); stroke-width: 2.2; stroke-linecap: round; }
.msearch input { width: 100%; font: 1.05rem var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 48px 14px 46px; outline: none; transition: border-color .15s, box-shadow .15s; }
.msearch input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(76, 175, 80, .25); }
.msearch input::-webkit-search-cancel-button { display: none; }
.msearch button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.msearch button:hover { background: var(--accent-dk); }
#mhint { margin: 8px 0 0; }
.mres { max-width: 720px; margin-top: 14px; background: var(--surface); border: 1px solid #3b3f43; border-radius: 12px; padding: 10px; }
.mres-head { color: var(--subtle); font-size: .9rem; padding: 4px 8px 8px; }
.mres ol { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.mres li a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); }
.mres li a:hover, .mres li a:focus { background: var(--surface-2); outline: none; }
.mres .r-chap { display: block; font-size: .78rem; color: var(--accent-hi); text-transform: uppercase; letter-spacing: .05em; }
.mres .r-title { display: block; font-weight: 700; }
.mres .r-snip { display: block; color: var(--subtle); font-size: .9rem; margin-top: 2px; }
mark { background: #f0c45a; color: #1b1d1f; border-radius: 3px; padding: 0 2px; }
mark.cur { background: #ff9f43; box-shadow: 0 0 0 2px #ff9f43; }

/* ---------- maqueta ---------- */
.mlayout { display: grid; grid-template-columns: 270px 1fr; gap: 40px; padding: 24px 0 70px; align-items: start; }
.mtoc { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; background: var(--bg-2); border: 1px solid #2f3336; border-radius: 12px; padding: 12px 14px; }
.mtoc summary { font-weight: 800; color: var(--accent-hi); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; padding: 4px 0 8px; }
.mtoc summary::after { display: none; }
.mtoc-list, .mtoc-list ol { list-style: none; margin: 0; padding: 0; }
.mtoc-list > li { margin: 6px 0; }
.mtoc-list > li > a { font-weight: 700; }
.mtoc-list ol { padding-left: 12px; border-left: 1px solid #34383c; margin: 4px 0 8px 4px; }
.mtoc a { display: block; color: var(--subtle); text-decoration: none; font-size: .9rem; padding: 3px 6px; border-radius: 6px; }
.mtoc a:hover { color: var(--text); background: var(--surface); }
.mtoc a.on { color: var(--text); background: rgba(76, 175, 80, .16); }
.mtoc li.dim > a { opacity: .35; }

/* ---------- contenido ---------- */
.mbody { min-width: 0; }
.mchap { padding-top: 8px; margin-bottom: 42px; }
.mchap > h2 { font-size: 1.75rem; color: var(--text); border-bottom: 2px solid var(--accent); padding-bottom: 8px; margin-bottom: 16px; }
.munit h3.mh { font-size: 1.3rem; color: var(--accent-hi); margin-top: 28px; }
.munit h4 { font-size: 1.05rem; margin: 22px 0 6px; }
.munit { scroll-margin-top: 90px; }
.mchap { scroll-margin-top: 80px; }
.mbody p, .mbody li { color: #d3d8dc; }
.mbody ul, .mbody ol { padding-left: 22px; }
.mbody li { margin: 4px 0; }
.mbody table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .95rem; background: var(--surface); border-radius: 10px; overflow: hidden; }
.mbody th { background: var(--accent-dk); color: #fff; text-align: left; padding: 9px 12px; }
.mbody td { padding: 8px 12px; border-bottom: 1px solid #3b3f43; vertical-align: top; }
.mbody tr:last-child td { border-bottom: 0; }
.mbody td.c, .mbody th.c { text-align: center; }
.mbody .ui { font-size: .9em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; white-space: nowrap; }
.mbody .role { display: inline-block; background: none; border: 0; padding: 1px 10px; border-radius: 999px; font-weight: 800; font-size: .82rem; color: #fff; }
.mbody .r-m { background: #3b82c4; } .mbody .r-g { background: #d98a1f; } .mbody .r-ge { background: var(--accent-dk); }
.c-red { color: #ff6b66; } .c-amber { color: #f0a020; }
.mcredit { margin-top: 18px; }

.box { border-radius: 12px; padding: 14px 18px; margin: 16px 0 18px; }
.box .bt { font-weight: 800; margin-bottom: 6px; }
.box p:last-child, .box ul:last-child { margin-bottom: 0; }
.box.crit { background: #3a1f1f; border: 1px solid #b84a45; }
.box.crit .bt { color: #ff8a84; font-size: 1.05rem; }
.box.warn { background: var(--warn-bg); border: 1px solid rgba(240, 160, 32, .6); }
.box.warn .bt { color: #ffd28a; }
.box.tip { background: #1d3325; border: 1px solid #3d7a50; }
.box.tip .bt { color: var(--accent-hi); }
.box.info { background: #1d2a3a; border: 1px solid #3c6494; }
.box.info .bt { color: #8fbaf0; }

.steps-m, .mbody .steps { counter-reset: paso; display: block; }
.mbody .step { counter-increment: paso; position: relative; padding: 2px 0 2px 42px; margin: 12px 0; color: #d3d8dc; }
.mbody .step::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .9rem; }

.mfig { margin: 16px auto 22px; text-align: center; }
.mfig img { margin: 0 auto; border-radius: 10px; border: 1px solid var(--border); box-shadow: var(--shadow); cursor: zoom-in; }
.mfig figcaption { color: var(--subtle); font-size: .88rem; margin-top: 8px; }
.w55 { max-width: 55%; } .w60 { max-width: 60%; } .w62 { max-width: 62%; } .w70 { max-width: 70%; } .w75 { max-width: 75%; }
.w80 { max-width: 80%; } .w90 { max-width: 90%; } .w95 { max-width: 95%; } .w100 { max-width: 100%; }
.mbody .two { display: flex; gap: 18px; align-items: flex-start; }
.mbody .two > .mfig { flex: 1; max-width: none; }
.mtop { text-align: right; margin-top: 30px; }
.munit.hide, .mchap.hide { display: none; }

@media (max-width: 1000px) {
  .mlayout { grid-template-columns: 1fr; gap: 16px; }
  .mtoc { position: static; max-height: none; }
  .mtoc details:not([open]) summary { padding-bottom: 4px; }
}
@media (max-width: 700px) {
  .w55, .w60, .w62, .w70, .w75, .w80, .w90, .w95 { max-width: 100%; }
  .mbody .two { flex-direction: column; }
  .mbody table { display: block; overflow-x: auto; }
}
