/* ============================================================================
   HOJA — vista Solución (hoja carta), panel «Pasos» y panel «Resultados»
   ----------------------------------------------------------------------------
   Prefijos: .hj- (la vista), .st- (salida de steps.js), .fg- / .fd- (figuras
   de figs.js: también las usa la ayuda avanzada). Solo colores de tokens.css.
   La hoja se centra en la zona libre con --ws-l / --ws-r (ancho de cada panel
   visible + 16 px, los escribe el shell); el alto de las barras ya lo deja
   #ws con su relleno (--ws-t / --ws-b).
   Todo lo del desarrollo descansa sobre la hoja cuadriculada, como escrito
   en una libreta (pedido del dueño): nada de tarjetas blancas. Para apartar
   algo, recursos de cuaderno: una raya de margen a la izquierda (tramos,
   comprobaciones, partes), un renglón fino entre filas (opciones, tablas),
   un subrayado sobre la suma, encabezados, sangría y espacio.
   ========================================================================== */

/* ------------------------------------------------------------ LA HOJA */
.hj-view { min-height: 100%; }
.hj-wrap {
  display: flex; justify-content: center; min-height: 100%;
  padding: 16px calc(var(--ws-r, 0px) + 16px) 0 calc(var(--ws-l, 0px) + 16px);
  transition: padding .22s ease;
  background: var(--desk);
}
.hj-sheet {
  position: relative; width: 816px; max-width: 100%; min-height: calc(100vh - var(--ws-t, 0px) - var(--ws-b, 0px) - 16px);
  padding: 64px 64px 96px; border-radius: 12px 12px 0 0;
  background-color: var(--paper);
  background-image: linear-gradient(var(--paper-grid) 1px, transparent 1px), linear-gradient(90deg, var(--paper-grid) 1px, transparent 1px);
  background-size: 20px 20px; background-position: 4px 4px;
  box-shadow: 0 0 0 .5px var(--paper-edge), 0 12px 32px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .05);
  color: var(--ink);
  /* el contenedor «hoja» (también en explica.css): las consultas de ancho de la hoja */
  container: hoja / inline-size;
}
@media (max-width: 900px) { .hj-sheet { padding: 40px 32px 80px; } }


/* encabezado */
.hj-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 20px; margin-bottom: 16px; box-shadow: inset 0 -1px 0 var(--sep2); }
.hj-head-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hj-head h1 { margin: 0; font-family: var(--disp); font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.hj-head p { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink2); }
.hj-m { font-family: var(--math); font-size: 1.14em; }
.hj-head-m { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 4px; flex-shrink: 0; }
.hj-units { display: flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--fill); font-family: var(--mono); font-size: 12px; }
.hj-date { font-size: 12px; line-height: 16px; color: var(--ink2); }

/* pasos: todos con el mismo relleno para que resaltar el actual no mueva nada */
.hj-flow { display: flex; flex-direction: column; }
.hj-step { position: relative; display: flex; flex-direction: column; gap: 16px; margin: 0 -24px; padding: 16px 24px 20px; border-radius: 14px; scroll-margin-top: 16px; }
.hj-step + .hj-step { margin-top: 12px; }
/* Paso actual: al llegar se ilumina y el relleno azul se desvanece hasta
   no verse (is-arrive, hoja.js); queda el recuadro azul con su sombra, y
   el paso en el que estás se sigue viendo como hoja de cuaderno.          */
.hj-step.is-cur { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft), 0 12px 28px -16px var(--accent); }
.hj-step.is-cur.is-arrive { animation: hj-llega 1.8s ease-out both; }
@keyframes hj-llega { 0%, 30% { background-color: var(--accent-soft); } 100% { background-color: transparent; } }
.hj-step:focus { outline: none; }
.hj-sh { display: flex; align-items: center; gap: 12px; min-height: 28px; }
.hj-num { width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--fill); font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink); }
.hj-num-ic { color: var(--ink2); }
.hj-step.is-cur .hj-num:not(.hj-num-ic) { background: var(--accent-fill); color: #fff; }
.hj-title { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -.01em; }
.hj-title i, .hj-title sub { font-family: var(--math); font-weight: 400; }
.hj-title i { font-size: 1.1em; }
/* «Paso actual»: fuera del renglón del título, como una pestaña sobre el borde de arriba del paso, a la derecha.
   En el renglón le quitaba ancho al título, que se partía en otro renglón: el paso actual crecía 16 a 22 px y,
   al fondo de la hoja, el scroll-spy alternaba entre dos pasos (27/09). Así, marcarlo no cambia ningún alto.
   15 px de alto: no es un bloque con fondo (la libreta), solo tapa la línea del recuadro detrás de su texto. */
.hj-cur { display: none; position: absolute; top: 0; right: 24px; transform: translateY(-50%); padding: 0 6px; border-radius: 6px; background: var(--paper); font-size: 11.5px; line-height: 15px; font-weight: 600; color: var(--accent-text); white-space: nowrap; pointer-events: none; }
.hj-step.is-cur .hj-cur { display: block; }
.hj-deep { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px 0 8px; border: 0; border-radius: 12px; background: var(--fill); color: var(--accent-text); font-size: 12px; font-weight: 500; }
.hj-deep:hover { background: var(--fill2); }
.hj-deep .st-sv > svg { width: 18px; height: 18px; }
.hj-deep-lg .st-sv > svg { width: 24px; height: 24px; }
.hj-step.is-cur .hj-deep { background: var(--raised); box-shadow: 0 0 0 .5px var(--sep2); }
.hj-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hj-body > * { margin-top: 0; margin-bottom: 0; }
/* todo el contenido sangrado bajo el título, salvo las figuras (a todo lo ancho; también los
   diagramas del paso 'diag', dentro de .st-anima: miden el ancho de la hoja y con la sangría se cortaba «x (m)») */
.hj-body > :not(.st-fig):not(.st-anima):not(.hj-hide):not(.hj-deepbar) { margin-left: 36px; }
.hj-body > .st-check { margin-left: 36px; }

/* modo estudio */
.hj-hide { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-left: 36px; padding: 4px 0 4px 14px; border-left: 2px solid var(--accent); }
.hj-hide p { margin: 0; font-size: 14px; line-height: 20px; }
.hj-goal b { font-weight: 600; }
.hj-hint { color: var(--ink2); }
.hj-err .hj-body > div { margin-left: 36px; }

/* ------------------------------------------------ TEXTO DEL DESARROLLO */
.hj-sheet .st-p { font-size: 14px; line-height: 20px; color: var(--ink2); margin: 0; }
.hj-sheet .st-p i, .hj-sheet .st-p sub, .hj-sheet .st-note i, .hj-sheet .st-note sub, .hj-sheet .st-list i, .hj-sheet .st-list sub { font-family: var(--math); }
.hj-sheet .st-p i, .hj-sheet .st-m { font-family: var(--math); font-size: 16px; color: var(--ink); }
.hj-sheet .st-p .mf, .hj-sheet .st-note .mf { font-size: 12.5px; color: var(--ink); }
.hj-sheet .st-p b { color: var(--ink); font-weight: 600; }
.st-note { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink2); }
.st-warn { color: var(--defl); }
.st-muted { color: var(--ink2); font-family: var(--ui); font-size: 12.5px; font-style: normal; }
.st-u, .mu { font-family: var(--ui); font-size: 13px; font-style: normal; font-weight: 400; color: var(--ink2); }
.st-real { color: var(--real); }
.st-virt { color: var(--virt); }
.st-defl { color: var(--defl); }
.st-h { margin: 8px 0 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.st-h i, .st-h sub { font-family: var(--math); font-weight: 400; }
.st-h i { font-size: 1.12em; }
.st-range { margin-left: 4px; font-family: var(--math); font-size: 16px; font-weight: 400; color: var(--ink2); }
.st-seg { font-family: var(--math); font-size: 14px; color: var(--ink2); white-space: nowrap; }
.st-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 20px; }
.st-res-l { font-family: var(--ui); }

/* fórmulas (mchain / mline de base.css) con las medidas del diseño */
.hj-sheet .mchain { row-gap: 12px; column-gap: 10px; margin: 0; font-size: 18px; line-height: 1.5; overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.hj-sheet .mline { font-size: 18px; }
.hj-sheet .mc-eq { color: var(--ink); }
.hj-sheet .mc-l { color: var(--ink); }
.hj-sheet .mf { font-size: 15px; }
.hj-sheet .mi-s { font-size: 32px; }
.hj-sheet .mi-l { height: 42px; font-size: 12px; }
.hj-sheet .mb-l, .hj-sheet .mb-r { font-size: 32px; }
.hj-sheet .mb-lim { height: 42px; }
.st-final { font-weight: 600; }
.st-final .mf { font-size: 17px; }
.st-final .mf-n { border-bottom-width: 1.5px; }
.st-unote { margin-left: 8px; font-family: var(--ui); font-size: 13px; color: var(--ink2); white-space: nowrap; }
.st-center { overflow-x: auto; }
.st-formula { padding: 2px 0; }

/* definiciones alineadas: r ≔ 3 · GH ≔ r − 3 = 0 · E, I, EI */
.st-defs { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 16px; row-gap: 12px; align-items: baseline; font-family: var(--math); font-size: 18px; }
.st-defs2 { grid-template-columns: max-content minmax(0, 1fr); column-gap: 10px; }
.st-defs .st-l { text-align: right; }
.st-defs .st-c { font-family: var(--ui); font-size: 13px; color: var(--ink2); }
.st-defs .st-c .st-m { font-size: 16px; }
.st-result { align-items: center; }
.st-resrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.st-box { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 8px; font-size: 20px; font-weight: 600; }
.st-box-defl { background: var(--defl-soft); box-shadow: inset 0 0 0 1.5px var(--defl); }
.st-box-u { font-family: var(--ui); font-size: 14px; font-weight: 600; color: var(--defl); }

/* ecuaciones de equilibrio: título · ecuación · despeje */
.st-eqs { display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 20px; row-gap: 12px; align-items: baseline; font-family: var(--math); font-size: 18px; }
.st-eq-t { color: var(--ink2); white-space: nowrap; }
.st-eq-e { white-space: nowrap; }
.st-eq-r { min-width: 0; }
.st-eq-r .mc-eq { color: var(--ink2); }
/* un término con su signo no se parte: si la ecuación no cabe, el renglón se parte antes de un signo */
.st-t { white-space: nowrap; }
/* renglones largos (steps.js, eqsBlock): cada despeje «⟹ R = … = valor» baja a su propio renglón, bajo su ecuación */
.st-eqs.st-eqs-larga > .st-eq-e, .st-eqs.st-eqs-larga > .st-eq-r { grid-column: 2 / -1; }
.st-eqs.st-eqs-larga > .st-eq-e { white-space: normal; }
.st-eqs.st-eqs-larga > .st-eq-r { margin-top: -4px; }
/* hoja angosta (escritorio de 1100 px con los dos paneles, tableta vertical): todos los despejes abajo, como en el teléfono */
@container hoja (max-width: 620px) {
  .st-eqs { grid-template-columns: max-content minmax(0, 1fr); column-gap: 12px; }
  .st-eqs > .st-eq-e, .st-eqs > .st-eq-r { grid-column: 2; }
  .st-eqs > .st-eq-e { white-space: normal; }
  /* las cadenas de integrales: el lado izquierdo (la integral del tramo, larga) en su renglón y cada «= …»
     debajo, a todo lo ancho, como se escribe en una hoja angosta (antes quedaban en una columna estrecha) */
  .mchain.st-ichain { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .mchain.st-ichain > .mc-l { text-align: left; }
  .mchain.st-ichain > .mc-l:empty { display: none; }
  .mchain.st-ichain > .mc-r { padding-left: 16px; }
}
.st-react { font-size: 17px; }
.st-part { display: flex; flex-direction: column; gap: 10px; padding: 2px 0 2px 14px; border-left: 2px solid var(--sep2); }

/* enunciado: datos con ≔ y lo que se pide */
.st-given { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 16px; row-gap: 16px; align-items: baseline; }
.st-given-l { font-size: 13px; color: var(--ink2); }
.st-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 8px; }
.st-datum { display: grid; grid-template-columns: 28px 16px minmax(0, 1fr); column-gap: 8px; align-items: baseline; font-family: var(--math); font-size: 18px; }
.st-datum-w { grid-column: 1 / -1; }
.st-dsym { text-align: right; }
.st-dop { text-align: center; }
.st-pos { font-family: var(--ui); font-size: 12px; color: var(--ink2); white-space: nowrap; }
.st-ask { margin: 0; font-size: 14px; line-height: 24px; }
.st-ask .st-m { font-size: 17px; }
.st-ask i { font-family: var(--math); }

/* figuras */
.st-fig { margin: 0; display: flex; flex-direction: column; gap: 4px; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.st-fig figcaption { order: -1; padding-left: 36px; font-size: 12px; line-height: 16px; color: var(--ink2); }
.st-fig:not(.st-diag) figcaption { order: 1; }
.st-fig figcaption i, .st-fig figcaption sub { font-family: var(--math); color: var(--ink); }
.st-fig figcaption i { font-size: 15px; }

/* integrales: tramos, formas de la tabla, comprobación */
.st-int { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--sep2); }
.st-int-h { font-size: 12px; font-weight: 600; color: var(--ink2); }
.st-int-h .st-seg { font-size: 13.5px; font-weight: 400; }
.st-shapes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--ink2); }
.st-shape { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.st-shape i, .st-shape sub, .st-shape sup { font-family: var(--math); }
.st-shape b { color: var(--ink); font-weight: 500; }
.st-shape .mf { font-size: 12px; }
.st-shape-n { font-family: var(--math); font-size: 16px; color: var(--ink); }
.st-shape-x { margin-right: 4px; font-family: var(--math); font-size: 16px; color: var(--ink); }
.shp { flex: 0 0 auto; overflow: visible; display: block; }
.shp line { stroke: var(--ink2); stroke-width: 1; }
.shp path { stroke-width: 1.6; stroke-linejoin: round; }
.shp-c path { stroke: var(--real); fill: var(--real-soft); }
.shp-v path { stroke: var(--virt); fill: var(--virt-soft); }
/* cada combinación de formas en su renglón: «Trapecio × trapecio: 1/EI·ℓ/6[…] = 1/EI·6/6[…] = 177.1765/EI»;
   si no cabe, se parte en los «=» y los renglones que siguen van sangrados */
.st-combs { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-comb { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 4px; min-width: 0; padding-left: 28px; font-family: var(--math); font-size: 18px; line-height: 1.55; color: var(--ink); }
/* el nombre se parte si no cabe («Parábola de voladizo × triángulo (máximos del mismo lado):» en una hoja angosta) */
.st-comb-n { max-width: calc(100% + 28px); margin-left: -28px; font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--ink2); }
.st-comb-p { min-width: 0; max-width: 100%; }
.st-comb .mc-eq { color: var(--ink); }
.st-comb .mf { font-size: 15px; }
/* la suma de las combinaciones (o de los tramos): subrayada arriba, como una suma en el cuaderno */
.st-isum { padding-top: 8px; border-top: 1px solid var(--sep2); }
/* comprobación con el otro método: sin tarjeta; raya de margen punteada */
.st-check { display: flex; flex-direction: column; gap: 12px; padding: 2px 0 2px 14px; border-left: 2px dashed var(--sep2); }
.st-check-h, .st-check-d > summary { display: flex; align-items: center; gap: 8px; min-height: 20px; font-size: 13px; color: var(--ink2); }
.st-check-h b, .st-check-d > summary b { color: var(--ink); font-weight: 600; }
.st-check-h span, .st-check-d > summary span { font-size: 12px; }
.st-check-d > summary { cursor: pointer; list-style: none; }
.st-check-d > summary::-webkit-details-marker { display: none; }
.st-check-d > summary::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 1.5px solid var(--ink2); border-bottom: 1.5px solid var(--ink2); transform: rotate(-45deg); transition: transform .15s; }
.st-check-d[open] > summary::after { transform: rotate(45deg); }
.st-check-d { display: block; }
.st-check-d[open] > summary { margin-bottom: 12px; }
.st-check-d > :not(summary) + * { margin-top: 12px; }
.st-check-d:not([open]) { padding: 4px 0 4px 14px; }
.st-check .mline, .st-check-l { font-size: 18px; line-height: 40px; }
.st-comb.st-check-l { line-height: 1.55; }
.st-meth { display: none; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.st-sum { padding: 4px 0; }

/* tabla de integrales de referencia */
.st-tabref { font-size: 13px; color: var(--ink2); }
.st-tabref summary { cursor: pointer; padding: 2px 0; color: var(--accent-text); }
.st-tabref summary i { font-family: var(--math); }
.st-tabref[open] summary { margin-bottom: 8px; }
.st-tablewrap { overflow-x: auto; }
.st-table { border-collapse: collapse; font-size: 13px; }
.st-table th, .st-table td { padding: 6px 12px 6px 0; border-bottom: .5px solid var(--sep2); text-align: left; vertical-align: middle; }
.st-tt { font-family: var(--math); font-size: 14px; color: var(--ink); }
.st-tt thead th { vertical-align: bottom; font-family: var(--ui); font-size: 12px; font-weight: 500; color: var(--ink2); }
.st-tt thead th .shp { display: block; margin-bottom: 3px; }
.st-tt tbody th { font-family: var(--ui); font-size: 12.5px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.st-tt td { white-space: nowrap; }
.st-tt td .st-muted { font-size: 11px; }
.st-tt i, .st-tt sub { font-family: var(--math); }

/* redundantes y primaria */
.st-sup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-sup-i { display: flex; flex-direction: column; gap: 2px; padding: 4px 2px; }
.st-sup-l { font-size: 11px; color: var(--ink2); }
.st-sup-op { font-family: var(--math); font-size: 17px; color: var(--ink2); }
.st-sup-g { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-opts { display: flex; flex-direction: column; gap: 0; }
.st-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 4px 8px 12px; border-left: 3px solid transparent; border-bottom: 1px solid var(--sep); }
.st-opts > .st-opt:first-child { border-top: 1px solid var(--sep); }
.st-opt.is-on { border-left-color: var(--accent); }
.st-opt-t { display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
.st-opt-t span { font-family: var(--math); color: var(--ink2); }
.st-opt-t .st-opt-k { font-family: var(--ui); font-size: 11px; font-weight: 600; color: var(--ink2); }
.st-opt-on { justify-self: start; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); white-space: nowrap; }
.st-btn { height: 26px; font-size: 12.5px; }
.st-others { font-size: 13px; color: var(--ink2); }
.st-others summary { cursor: pointer; color: var(--accent-text); padding: 2px 0; }
.st-others[open] summary { margin-bottom: 8px; }
.st-legend { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 13px; color: var(--ink2); }
.st-legend dt { font-family: var(--math); font-size: 16px; color: var(--ink); }
.st-legend dd { margin: 0; }
.st-conv { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 2px 0 2px 14px; border-left: 2px solid var(--sep2); font-size: 13px; color: var(--ink2); }
.st-round { padding: 8px 12px; border-radius: 8px; background: var(--defl-soft); color: var(--ink); }
.st-check-l { color: var(--ink); }
.st-mat { gap: 10px; }

/* diagramas a mano (paso 'diag'): cada tramo con su raya de margen, sus dos
   ecuaciones y la sustitución en cada punto; la tabla x | V | M con la forma
   de cada tramo entre sus puntos                                            */
.st-dtr { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 2px 0 2px 14px; border-left: 2px solid var(--sep2); }
.st-dtr-eq { display: flex; flex-direction: column; gap: 4px; }
.st-dl { font-family: var(--math); font-size: 18px; line-height: 1.55; color: var(--ink); }
.st-dl .mf { font-size: 15px; }
.st-dsub { display: flex; flex-direction: column; gap: 6px; }
.st-dsub-r { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 28px; row-gap: 4px; }
.st-dsub-c { min-width: 0; max-width: 100%; font-family: var(--math); font-size: 17px; line-height: 1.55; color: var(--ink); }
.st-dsub-c b { font-weight: 600; }
.st-dsub-c .mf { font-size: 14px; }
.st-dsub-c .st-muted, .st-vtab .st-muted { font-size: 12.5px; }
.st-vtab-w { max-width: 100%; overflow-x: auto; }
.st-vtab { border-collapse: collapse; font-family: var(--math); font-size: 16px; color: var(--ink); }
.st-vtab th, .st-vtab td { padding: 5px 18px 5px 0; text-align: left; vertical-align: baseline; white-space: nowrap; }
.st-vtab td + td { text-align: right; }
.st-vtab thead th { padding-bottom: 6px; border-bottom: 1px solid var(--ink2); font-family: var(--ui); font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.st-vtab thead th:nth-child(n+3) { text-align: right; }
.st-vtab thead th i { font-family: var(--math); font-size: 15px; font-weight: 400; color: var(--ink); }
.st-vtab tbody th { font-weight: 400; }
.st-vt-p td, .st-vt-p th { border-bottom: 1px solid var(--sep); }
.st-vt-f td { padding-top: 2px; padding-bottom: 2px; font-family: var(--ui); font-size: 12.5px; font-style: italic; color: var(--ink2); border-bottom: 1px solid var(--sep); }
.st-vt-f td i { font-family: var(--math); font-size: 14px; }

/* ------------------------------------------------------------- FIGURAS
   Viga (.fg) y diagramas (.fd) de figs.js                                   */
.fg, .fd { display: block; overflow: visible; max-width: none; }
.fg text, .fd text { font-family: var(--mono); }
.fg .fg-mi { font-family: var(--math); font-style: italic; fill: currentColor; }
.fg .fg-ms, .fg .fg-mv { font-family: var(--math); }
.fg .fg-mu { font-family: var(--ui); fill: var(--ink2); }
.fg-lbl { fill: var(--ink); color: var(--ink); }
.fg-beam { fill: var(--beam); stroke: var(--beam-edge); stroke-width: 1; }
.fg-sup { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.fg-wall { stroke: var(--ink); stroke-width: 2.2; }
.fg-ghost { fill: none; stroke: var(--ink2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.fg-hatch { stroke: var(--ink2); stroke-width: 1.2; }
.fg-hinge { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
/* resorte: el zigzag con esquinas redondas y su «k» (figs.js) */
.fg-spring { stroke-linejoin: round; }
.fg .fg-k { fill: var(--ink); color: var(--ink); }
.fg .fg-lab { fill: var(--ink2); font-family: var(--math); font-style: italic; }
.fg-t { fill: var(--ink); }
.fg-denv { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.fg-darr { stroke: var(--ink); stroke-width: 1.2; }
.fg-dhead { fill: var(--ink); }
.fg-band { fill: var(--fill); }
.fg-bandl { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 4 3; }
.fg-halo { stroke: var(--paper); stroke-width: 6; }
.fg-parr { stroke: var(--ink); stroke-width: 1.8; }
.fg-phead { fill: var(--ink); }
.fg-marc { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.fg-mhead { fill: var(--ink); }
/* redundantes y cargas unitarias: violeta */
.fg-x-l, .fg-unit-l { stroke: var(--virt); stroke-width: 2.4; }
.fg-x-head, .fg-unit-head { fill: var(--virt); }
.fg-x-arc, .fg-unit-arc { fill: none; stroke: var(--virt); stroke-width: 2; }
.fg .fg-x-t, .fg .fg-unit-t { fill: var(--virt); font-family: var(--math); font-style: italic; paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.fg .fg-unit-t { font-style: normal; }
/* reacciones: resueltas en --real, desconocidas discontinuas */
.fg-r-l { stroke: var(--real); stroke-width: 2; }
.fg-r-a { fill: none; stroke: var(--real); stroke-width: 2; }
.fg-r-h { fill: var(--real); }
.fg .fg-r-t { fill: var(--real); }
.fg .fg-r-t .fg-mu { fill: var(--real); }
.fg-ru-l { stroke: var(--ink2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.fg-ru-a { fill: none; stroke: var(--ink2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.fg-ru-h { fill: var(--ink2); }
.fg .fg-ru-t { fill: var(--ink2); }
/* objetivos δ, θ: naranja */
.fg-g-l, .fg-g-a { fill: none; stroke: var(--defl); stroke-width: 2; }
.fg-g-h { fill: var(--defl); }
.fg .fg-g-t { fill: var(--defl); }
/* burbujas de eje */
.fg-axis { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 5 4; }
.fg-bub { fill: var(--raised); stroke: var(--ink2); stroke-width: 1; }
.fg .fg-bub-t { font-family: var(--math); font-style: italic; font-size: 15px; fill: var(--ink); }
/* cotas y regla */
.fg-ext { stroke: var(--ink3); stroke-width: 1; }
.fg-dim { stroke: var(--ink2); stroke-width: 1; }
.fg-tick { stroke: var(--ink2); stroke-width: 1.5; }
.fg-dimbg { fill: var(--paper); }
.fg .fg-dimt { fill: var(--ink); }
.fg-rule { fill: none; stroke: var(--ink2); stroke-width: 1; }
.fg-ruleh { fill: var(--ink2); }
.fg .fg-rulen text { font-size: 11px; fill: var(--ink2); }
.fg .fg-rulel { font-size: 11px; fill: var(--ink2); }
.fg-gl { fill: none; stroke: var(--ink2); stroke-width: 1.2; }
.fg-glh { fill: var(--ink2); }
.fg .fg-glt { font-family: var(--math); font-style: italic; font-size: 13px; fill: var(--ink2); }
.fg-load.is-hl .fg-parr, .fg-load.is-hl .fg-darr, .fg-load.is-hl .fg-denv, .fg-load.is-hl .fg-marc { stroke: var(--accent); }
.fg-load.is-hl .fg-phead, .fg-load.is-hl .fg-dhead, .fg-load.is-hl .fg-mhead { fill: var(--accent); }

/* diagramas */
.fd-ax-l { fill: none; stroke: var(--ink2); stroke-width: 1; }
.fd-ax-h { fill: var(--ink2); }
.fd .fd-ax { fill: var(--ink2); }
.fd .fd-mi { font-family: var(--math); font-style: italic; font-size: 13px; }
.fd-guide { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 3 3; }
.fd-area.fd-c { fill: var(--real-soft); }
.fd-area.fd-v { fill: var(--virt-soft); }
.fd-area.fd-a { fill: var(--defl-soft); }
.fd-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fd-line.fd-c { stroke: var(--real); }
.fd-line.fd-v { stroke: var(--virt); }
.fd-line.fd-a { stroke: var(--defl); }
.fd-dot { stroke: var(--paper); stroke-width: 1.5; }
.fd-dot.fd-c { fill: var(--real); }
.fd-dot.fd-v { fill: var(--virt); }
.fd-dot.fd-a { fill: var(--defl); }
.fd .fd-lbl { fill: var(--ink); }
.fd .fd-big { font-weight: 600; }

/* ------------------------------------------------------ PANEL «PASOS» */
.hj-pl-b { padding: 8px 4px; }
.hj-idx { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hj-ib { width: 100%; min-height: 40px; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; align-items: center; padding: 4px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--ink); }
.hj-ib:hover { background: var(--sel); }
.hj-ib.is-cur { background: var(--accent-soft); }
.hj-ib-n { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--fill); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.hj-ib-n.is-ic { background: none; color: var(--ink2); }
.hj-ib.is-cur .hj-ib-n:not(.is-ic) { background: var(--accent-fill); color: #fff; }
.hj-ib-t { display: flex; flex-direction: column; min-width: 0; }
.hj-ib-title { font-size: 13px; line-height: 16px; }
.hj-ib-title i, .hj-ib-title sub { font-family: var(--math); }
.hj-ib-title i { font-size: 14px; }
.hj-ib.is-cur .hj-ib-title { font-weight: 600; }
.hj-ib-r { font-size: 12px; line-height: 16px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hj-ib-r i, .hj-ib-r sub, .hj-ib-r sup { font-family: var(--math); }
.hj-ib-r i { font-size: 13.5px; }
.hj-ib-r sub { font-size: 9.5px; line-height: 0; }
.hj-ib-q { font-style: italic; }
.hj-legend { padding: 4px 12px 8px; }
.hj-legend .sec-h { margin-top: 0; }
.hj-legend ul { list-style: none; margin: 0; padding: 0; }
.hj-legend li { height: 28px; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; align-items: center; font-size: 12px; }
.hj-legend .hj-m { font-size: 13.5px; }
.hj-sw { width: 16px; height: 3px; justify-self: center; border-radius: 2px; }
.hj-sw-real { background: var(--real); }
.hj-sw-virt { background: var(--virt); }
.hj-sw-defl { background: var(--defl); }
.hj-empty { margin: 8px; font-size: 13px; color: var(--ink2); }

/* -------------------------------------------------- PANEL «RESULTADOS» */
.hj-pr-b { padding: 4px 12px 12px; }
.hj-rsec { display: flex; flex-direction: column; padding-bottom: 8px; }
.hj-rsec + .hj-rsec { border-top: .5px solid var(--sep); margin-top: 4px; }
.hj-rsec .sec-h { margin-top: 4px; }
.hj-rt { display: grid; grid-template-columns: 52px minmax(0, 1fr) 76px; grid-auto-rows: minmax(28px, auto); align-items: center; }
.hj-rt-o { align-items: baseline; }
.hj-rs { font-family: var(--math); font-size: 16px; }
.hj-rs sub { font-size: 10.5px; line-height: 0; }
.hj-rv { font-family: var(--mono); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.hj-ru { padding-left: 8px; font-size: 12px; color: var(--ink2); white-space: nowrap; }
.hj-defl { color: var(--defl); }
.hj-rs.is-big { font-size: 22px; line-height: 44px; }
.hj-rs.is-big sub { font-size: 13px; }
.hj-rv.is-big { font-size: 26px; line-height: 44px; font-weight: 600; letter-spacing: -.02em; }
.hj-ru.is-big { font-size: 13px; font-weight: 600; }
.hj-rfig { margin: 0 0 8px; display: flex; flex-direction: column; gap: 4px; }
.hj-rfig figcaption { font-size: 12px; line-height: 16px; color: var(--ink2); }
.hj-rfig .hj-m { color: var(--ink); font-size: 14px; }
.hj-studyr { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 8px; }
#pr-solucion .panel-f .btn { gap: 6px; }

/* ------------------------------------------------------------ TABLETA */
[data-form="tablet"] .hj-sheet { padding: 48px 40px 88px; }

/* ----------------------------------------------------------- TELÉFONO
   Hoja al ancho con 8 px, pasos como tarjetas que se despliegan.            */
[data-form="phone"] .hj-wrap { padding: var(--m-top-h, 150px) 8px 0; }
.hj-sheet.is-phone { width: 100%; min-height: calc(100vh - 150px); padding: 24px 16px 172px; border-radius: 16px 16px 0 0; background-size: 16px 16px; background-position: 0 0; }
.hj-sheet.is-phone .hj-head { flex-direction: column; gap: 4px; padding-bottom: 16px; margin-bottom: 8px; }
.hj-sheet.is-phone .hj-head h1 { font-size: 20px; line-height: 26px; }
.hj-sheet.is-phone .hj-head p { font-size: 15px; }
.hj-sheet.is-phone .hj-head-m { flex-direction: row; align-items: center; gap: 8px; padding: 0; }
.hj-sheet.is-phone .hj-step { margin: 0; padding: 0; border-radius: 16px; gap: 16px; }
.hj-sheet.is-phone .hj-step + .hj-step { margin-top: 12px; }
.hj-sheet.is-phone .hj-en { padding: 8px 0; }
.hj-sheet.is-phone .hj-en.is-cur { background: none; box-shadow: none; }
.hj-sheet.is-phone .hj-en .hj-cur { display: none; }
.hj-sheet.is-phone .st-check-d:not([open]) { padding: 4px 0 4px 12px; }
.hj-sheet.is-phone .hj-body > :not(.st-fig):not(.hj-hide):not(.hj-deepbar), .hj-sheet.is-phone .hj-body > .st-check, .hj-sheet.is-phone .hj-hide { margin-left: 0; }
.hj-sheet.is-phone .st-fig figcaption { padding-left: 0; }
/* la tarjeta del teléfono descansa sobre la hoja como los pasos del escritorio
   (sin fondo blanco): su contorno fino la delimita porque se despliega; el
   azul del paso actual la cubre con una sombra interior que se desvanece    */
.hj-card { background: transparent; box-shadow: 0 0 0 .5px var(--sep2); }
.hj-card.is-cur { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft), 0 12px 28px -16px var(--accent); }
.hj-card.is-cur.is-arrive { animation: hj-llega-card 1.8s ease-out both; }
@keyframes hj-llega-card {
  0%, 30% { box-shadow: inset 0 0 0 1.5px var(--accent), inset 0 0 0 999px var(--accent-soft), 0 0 0 4px var(--accent-soft), 0 12px 28px -16px var(--accent); }
  100% { box-shadow: inset 0 0 0 1.5px var(--accent), inset 0 0 0 999px transparent, 0 0 0 4px var(--accent-soft), 0 12px 28px -16px var(--accent); }
}
@media (prefers-reduced-motion: reduce) { .hj-step.is-cur.is-arrive, .hj-card.is-cur.is-arrive { animation: none; } }
.hj-card.is-open { padding: 4px 12px 16px !important; }
/* (tres columnas en todas las tarjetas: el número, el título con su resumen y la flecha; «Paso actual» va fuera, sobre el borde) */
.hj-card-h { width: 100%; min-height: 52px; display: grid; grid-template-columns: 24px minmax(0, 1fr) 14px; column-gap: 12px; align-items: center; padding: 12px; border: 0; background: transparent; text-align: left; color: var(--ink); }
.hj-card.is-open .hj-card-h { padding: 12px 0; }
.hj-card-h .hj-num { align-self: start; margin-top: -1px; }
.hj-card-t { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; min-width: 0; }
.hj-card-h .hj-title { flex: 0 1 auto; font-size: 15px; line-height: 20px; }
.hj-card.is-open .hj-title { font-size: 17px; line-height: 22px; }
.hj-card-r { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; font-family: var(--math); font-size: 16px; line-height: 20px; white-space: nowrap; color: var(--ink); }
.hj-card-r i { font-size: 16px; }
.hj-card-r sub { font-size: 11px; line-height: 0; }
.hj-chev { color: var(--ink2); display: flex; }
.hj-sheet.is-phone .hj-cur { right: 16px; }
.hj-deepbar { display: flex; align-items: center; gap: 12px; }
.hj-deepbar span:first-child { flex: 1 1 auto; min-width: 0; font-size: 13px; line-height: 18px; color: var(--ink2); }
.hj-deep-lg { height: 44px; gap: 6px; padding: 0 14px 0 12px; border-radius: 22px; background: var(--raised); box-shadow: 0 0 0 .5px var(--sep2), 0 1px 3px rgba(0, 0, 0, .08); font-size: 15px; font-weight: 600; }
.hj-sheet.is-phone .st-meth { display: flex; }
.hj-sheet.is-phone .mchain, .hj-sheet.is-phone .mline, .hj-sheet.is-phone .st-eqs, .hj-sheet.is-phone .st-defs, .hj-sheet.is-phone .st-datum, .hj-sheet.is-phone .st-comb, .hj-sheet.is-phone .st-dl { font-size: 16px; }
.hj-sheet.is-phone .st-dsub-c { font-size: 15.5px; }
.hj-sheet.is-phone .st-comb { padding-left: 20px; }
.hj-sheet.is-phone .st-comb-n { max-width: calc(100% + 20px); margin-left: -20px; }
.hj-sheet.is-phone .st-vtab { font-size: 15px; }
.hj-sheet.is-phone .st-vtab th, .hj-sheet.is-phone .st-vtab td { padding-right: 12px; }
.hj-sheet.is-phone .mf { font-size: 14px; }
.hj-sheet.is-phone .mchain { column-gap: 8px; }
.hj-sheet.is-phone .st-eqs { grid-template-columns: max-content minmax(0, 1fr); column-gap: 10px; row-gap: 6px; }
.hj-sheet.is-phone .st-eq-r { grid-column: 2; margin-bottom: 6px; }
.hj-sheet.is-phone .st-eq-e { white-space: normal; }
.hj-sheet.is-phone .st-defs { grid-template-columns: max-content minmax(0, 1fr); column-gap: 8px; }
.hj-sheet.is-phone .st-defs .st-c { grid-column: 2; }
.hj-sheet.is-phone .st-given { display: flex; flex-direction: column; gap: 8px; }
.hj-sheet.is-phone .st-given-l { font-weight: 600; }
.hj-sheet.is-phone .st-datum { grid-template-columns: 20px 16px minmax(0, 1fr); }
.hj-sheet.is-phone .st-ask { font-size: 15px; }
.hj-sheet.is-phone .st-p { font-size: 15px; line-height: 22px; }
.hj-sheet.is-phone .st-check, .hj-sheet.is-phone .st-int, .hj-sheet.is-phone .st-dtr, .hj-sheet.is-phone .st-part { padding-left: 10px; }
.hj-sheet.is-phone .st-opt { grid-template-columns: minmax(0, 1fr); }
.hj-sheet.is-phone .st-box { font-size: 18px; }
.hj-sheet.is-phone .hj-deep:not(.hj-deep-lg) { display: none; }
.hj-sheet.is-phone .btn { height: 44px; border-radius: 22px; padding: 0 18px; font-size: 15px; }
.hj-sheet.is-phone .st-btn { height: 36px; border-radius: 18px; }

/* ------------------------------------------------------------ IMPRIMIR
   «Exportar PDF»: solo la hoja, sin barras ni paneles, sin cuadrícula.      */
@media print {
  #app[data-mode="solucion"] #tb, #app[data-mode="solucion"] #ribbon, #app[data-mode="solucion"] #pl,
  #app[data-mode="solucion"] #pr, #app[data-mode="solucion"] #sb, #app[data-mode="solucion"] #m-top,
  #app[data-mode="solucion"] #m-bottom, #app[data-mode="solucion"] #m-sheets, #app[data-mode="solucion"] #toast { display: none !important; }
  #app[data-mode="solucion"] #ws { position: static !important; overflow: visible !important; height: auto !important; }
  .hj-wrap { padding: 0 !important; background: none; }
  /* la hoja lleva container: hoja / inline-size (contención de tamaño en línea):
     con width: auto, en su contenedor flex, medía 0 px al imprimir y todo salía
     en una columna angosta (medido con media: print por CDP) */
  .hj-sheet { width: 100% !important; flex: 1 1 auto; min-height: 0; padding: 0 !important; box-shadow: none !important; background: none !important; border-radius: 0; }
  .hj-step { break-inside: avoid-page; background: none !important; box-shadow: none !important; animation: none !important; }
  .hj-card { box-shadow: none !important; }
  .hj-modos, .hj-deep, .hj-deepbar, .hj-cur, .hj-chev, .st-meth, .st-conv .btn, .st-opt .btn, .st-others, .st-tabref, .hj-hide .btn { display: none !important; }
  .hj-step.is-cur .hj-num:not(.hj-num-ic) { background: var(--fill); color: var(--ink); }
  .st-fig, .mchain { overflow: visible !important; }
  /* pie de marca: solo en papel y en el PDF, al final de la hoja (y de la
     ayuda avanzada si se imprime desde ahí); en pantalla no existe */
  .hj-sheet::after, .ay-sheet::after {
    content: "Uttensio \00B7  uttensio.com \00B7  \00AB Lo que parece misterio, no lo es.\00BB  (Stevin)";
    display: block; margin-top: 28px; padding-top: 6px; border-top: .5pt solid #d2d2d7;
    font-family: var(--ui); font-size: 8.5pt; line-height: 1.3; font-weight: 400; letter-spacing: .01em;
    color: #6e6e73; text-align: center; break-before: avoid-page; break-inside: avoid;
  }
}

/* Contraste (integración): en el paso resaltado del panel «Pasos» los
   símbolos de color toman el color del texto (naranja sobre azul < 4.5:1). */
.hj-ib.is-cur .st-defl, .hj-ib.is-cur .st-real, .hj-ib.is-cur .st-virt { color: inherit; }

/* ============================================================== FIGURA DEL CORTE
   (vigas-12) VigaFigs.corte de figs.js: la parte izquierda de la viga cortada
   en x, en los bloques del análisis por tramos. Solo tokens de tokens.css.
   Las reglas de .st-tramos / .st-tramo (§5.11) llegan con la hoja, en su
   propio bloque. Contrato en docs/tramos.md §4.                              */
.fg-corte .fg-ghost { stroke: var(--ink3); opacity: 1; }
.fg-beam-g { fill: none; stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 3 3; }
/* V y M internos en la cara del corte: en --real, como sus diagramas (el color
   dice qué es; --defl es solo para desplazamientos: docs/dominio.md, 20 y 27) */
.fg-int-l { stroke: var(--real); stroke-width: 2; }
.fg-int-a { fill: none; stroke: var(--real); stroke-width: 2; }
.fg-int-h { fill: var(--real); }
.fg .fg-int-t { fill: var(--real); font-family: var(--math); font-style: italic; }
.fg-res-l { stroke: var(--ink2); stroke-width: 1.4; stroke-dasharray: 4 3; }
.fg-res-h { fill: var(--ink2); }
.fg .fg-res-t { fill: var(--ink2); font-family: var(--math); font-style: italic; }
.fg .fg-arm-t { fill: var(--ink); font-family: var(--mono); }
.fg .fg-giro-t { fill: var(--ink2); font-family: var(--ui); }
.fg-rx.is-hl .fg-r-l { stroke-width: 3; }
/* además de §5.11: el arco de M_A resaltado, los símbolos de las reacciones y
   de las unitarias en su color (fg-mi pinta con currentColor), las letras con
   un halo del papel (pueden caer sobre una banda) y las cotas de los brazos de
   lo que entra en el tramo, resaltadas como sus fuerzas                       */
.fg-rx.is-hl .fg-r-a { stroke-width: 3; }
.fg-corte .fg-r-t { color: var(--real); }
.fg-corte .fg-unit-t { color: var(--virt); }
.fg-corte .fg-lab { paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
/* lo que ENTRA en el tramo conserva su color (tinta, --real, --virt): se
   distingue con un trazo más grueso y su cota va en --ink2 con el marcador
   (--hl) detrás del rótulo. --accent queda solo para la interfaz.          */
.fg-corte .fg-load.is-hl .fg-parr, .fg-corte .fg-load.is-hl .fg-darr, .fg-corte .fg-load.is-hl .fg-denv, .fg-corte .fg-load.is-hl .fg-marc { stroke: var(--ink); stroke-width: 2.6; }
.fg-corte .fg-load.is-hl .fg-phead, .fg-corte .fg-load.is-hl .fg-dhead, .fg-corte .fg-load.is-hl .fg-mhead { fill: var(--ink); }
.fg-corte .fg-load.is-hl .fg-unit-l { stroke-width: 3.2; }
.fg-corte .fg-load.is-hl .fg-unit-arc { stroke-width: 2.8; }
.fg-dimr.is-hl .fg-dim, .fg-dimr.is-hl .fg-tick { stroke: var(--ink2); stroke-width: 1.3; }
.fg .fg-dimr.is-hl .fg-arm-t { fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: var(--hl); stroke-width: 8px; stroke-linejoin: round; }

/* ============================================================== ANÁLISIS POR TRAMOS
   (vigas-12, E4 y E5) Bloques .st-tramos / .st-tramo de steps.js: el paso
   «Cortante y momento por tramos» (n = 0) y los bloques de M por tramo del
   caso 0, de cada caso unitario y de cada objetivo. Estilo libreta: sin
   tarjetas ni fondos; cada tramo, separado por una línea fina. Lo que
   explica va en los porqués ocultos (explica.css); en Apuntes, sus notas
   quedan debajo del título del tramo. Contrato en docs/tramos.md.          */
.st-tramos { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-tramo { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 12px; border-top: .5px solid var(--sep2); scroll-margin-top: 16px; }
.hj-sheet.is-phone .st-tramo { scroll-margin-top: calc(var(--m-top-h, 150px) + 8px); }
.st-tramo-h { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font: 600 14px/20px var(--ui); color: var(--ink); }
.st-tramo-h i { font-family: var(--math); font-size: 17px; font-weight: 400; }
.st-tramo-m { font-family: var(--math); font-size: 16px; font-weight: 400; color: var(--ink); }
.st-tramo-m .mf { font-size: 13px; }
.st-tramo-forma { padding: 0 8px; border-radius: 9px; box-shadow: 0 0 0 .5px var(--sep2); font: 500 11px/18px var(--ui); color: var(--ink2); }
.st-tramo-forma i { font-size: 12.5px; }
.st-tramo-g { display: grid; grid-template-columns: var(--tf, 320px) minmax(0, 1fr); gap: 8px 16px; align-items: start; }
.st-tramos.is-pila .st-tramo-g, .hj-sheet.is-phone .st-tramo-g { grid-template-columns: minmax(0, 1fr); }
.st-tramo-f { margin: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.st-tramo-f svg { display: block; max-width: 100%; height: auto; }
.st-tramo-t { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-tramo-n { margin: 0; font-size: 13px; line-height: 19px; color: var(--ink2); }
/* ΣF_y y ΣM_corte: en el escritorio, el título en su columna y la ecuación con
   su despeje debajo, en la otra; en el teléfono, uno debajo del otro. Gana a
   la rejilla de cuatro columnas de Apuntes (explica.css).                   */
.hj-sheet .st-tramos .st-tramo .st-eqs.st-tramo-e { grid-template-columns: max-content minmax(0, 1fr); column-gap: 12px; row-gap: 4px; }
.hj-sheet .st-tramos .st-tramo .st-eqs.st-tramo-e > span { grid-column: 2; white-space: normal; }
.hj-sheet .st-tramos .st-tramo .st-eqs.st-tramo-e > span.st-eq-t { grid-column: 1; }
.hj-sheet.is-phone .st-tramos .st-tramo .st-eqs.st-tramo-e { grid-template-columns: minmax(0, 1fr); }
.hj-sheet.is-phone .st-tramos .st-tramo .st-eqs.st-tramo-e > span, .hj-sheet.is-phone .st-tramos .st-tramo .st-eqs.st-tramo-e > span.st-eq-t { grid-column: 1; }
/* apilado en un cuerpo angosto (steps.js lo marca .is-angosto cuando el título
   y el término más largo no caben lado a lado): como en el teléfono          */
.hj-sheet .st-tramos.is-angosto .st-tramo .st-eqs.st-tramo-e { grid-template-columns: minmax(0, 1fr); }
.hj-sheet .st-tramos.is-angosto .st-tramo .st-eqs.st-tramo-e > span { grid-column: 1; }
.hj-sheet .st-tramos .st-tramo .st-eqs.st-tramo-e > span.st-eq-r:empty { display: none; }
.hj-sheet.is-phone .st-tramo .st-eqs.st-tramo-e > .st-eq-r, .hj-sheet .st-tramos.is-angosto .st-tramo .st-eqs.st-tramo-e > .st-eq-r { margin-bottom: 4px; }
.st-tramo-x { row-gap: 6px; }
.st-tramo-x .st-tramo-gl { margin-left: 8px; }
.st-tramo .st-whys { margin: 0; }
details.st-tramo > summary { cursor: pointer; list-style: none; min-height: 44px; align-items: center; }
details.st-tramo > summary::-webkit-details-marker { display: none; }
details.st-tramo > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid var(--ink2); border-bottom: 1.5px solid var(--ink2); transform: rotate(45deg); transition: transform .15s; }
details.st-tramo:not([open]) > summary::after { transform: rotate(-45deg); }
details.st-tramo > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.st-tramos-chk .st-tramo:first-of-type { border-top: 0; }
/* en los casos virtuales (m₁, m_δ…) los internos del corte van en --virt, como su diagrama */
.st-tramos:is([data-bloque^="unit"], [data-bloque^="goal"]) .fg-int-l, .st-tramos:is([data-bloque^="unit"], [data-bloque^="goal"]) .fg-int-a { stroke: var(--virt); }
.st-tramos:is([data-bloque^="unit"], [data-bloque^="goal"]) .fg-int-h, .st-tramos:is([data-bloque^="unit"], [data-bloque^="goal"]) .fg .fg-int-t { fill: var(--virt); }
@media (prefers-reduced-motion: reduce) { details.st-tramo > summary::after { transition: none; } }
@media print {
  .st-tramo { break-inside: avoid; }
  .hj-step:has(.st-tramo) { break-inside: auto; }
  .st-tramo-f { overflow: visible !important; }
  details.st-tramo > summary::after { display: none; }
}

/* ============================================================== MARCOS
   (fase B, docs/marcos.md §11b) figs-marco.js y pasos-marco.js. Prefijo mk-;
   solo tokens de tokens.css. Las figuras reutilizan las clases fg- y fd- de
   figs.js; aquí van las piezas nuevas: barras en cualquier ángulo (orilla y
   relleno), la fibra punteada y la flecha de x, el hueco de un corte, las
   zonas de toque del lienzo (mk-hit), el resalte de una barra (mk-lit) y el
   de lo seleccionado (mk-sel: un halo del acento; los colores de identidad
   no cambian).                                                              */
.mk-fig { max-width: 100%; }
.mk-bar-e { stroke: var(--beam-edge); stroke-linecap: round; }
.mk-bar { stroke: var(--beam); stroke-linecap: round; }
.mk-dfig .mk-bar-e { stroke: var(--ink3); }
.mk-dfig .mk-bar { stroke: var(--paper); }
.mk-gap { stroke: var(--paper); stroke-linecap: butt; }
.mk-fiber { stroke: var(--ink2); stroke-width: 1.4; stroke-dasharray: 2 3; stroke-linecap: round; }
.mk-xarr { stroke: var(--ink2); stroke-width: 1.2; }
.mk-xhead { fill: var(--ink2); }
.fg .mk-xt { font-family: var(--math); font-style: italic; font-size: 14px; fill: var(--ink2); }
.mk-hit { fill: transparent; stroke: none; }
.mk-lit { stroke: var(--accent-soft); stroke-linecap: round; }
.mk-sel { stroke: var(--accent-soft); stroke-linecap: round; }
.mk-sel-a { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
.mk-sel-g .fg-parr, .mk-sel-g .fg-darr, .mk-sel-g .fg-denv, .mk-sel-g .fg-marc { stroke-width: 2.6; }
.mk-mini-w { fill: none; stroke: var(--ink2); stroke-width: 1; }
.mk-mini-p { stroke-width: 1.4; }
.mk-mini-m { stroke-width: 1.2; }
.fg .mk-bub-t { font-size: 13px; }
.fg .mk-proj-t { font-size: 11px; }
.fg .mk-tag { font-family: var(--math); font-style: italic; font-size: 13px; fill: var(--ink2); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.fd .mk-dlbl, .fg .mk-dlbl { font-size: 11px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; }
.mk-dfig .fd-area { stroke: none; }
.mk-dfig .fd-line { stroke-width: 1.8; }
/* hoja de marcos (pasos-marco.js): la suma barra por barra de cada Δ, f o δ va
   en su bloque (mk-int), con el mismo espacio entre renglones que la hoja     */
.mk-int { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mk-int > .mk-bar { gap: 12px; }
.mk-barh { line-height: 18px; }
.mk-side { font-size: 13px; }
.mk-tens { margin-top: -6px; }
.mk-nline { font-size: 17px; }
.mk-kline { font-size: 17px; }
.mk-geol { font-size: 16px; line-height: 1.6; overflow-x: auto; }
.mk-tab { font-family: var(--math); font-size: 15px; color: var(--ink); }
.mk-tab th, .mk-tab td { white-space: nowrap; }
.mk-tab thead th { font-family: var(--ui); font-size: 12px; font-weight: 600; color: var(--ink2); }
.mk-tab thead th i, .mk-tab thead th sub { font-family: var(--math); font-weight: 400; color: var(--ink); }
.mk-tab tbody th { font-weight: 400; }
.mk-mtab tr.mk-tr1 > * { border-top: 1px solid var(--sep2); }
.mk-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px 28px; }
.mk-node { min-width: 0; overflow-x: auto; }
.mk-ntab caption { caption-side: top; text-align: left; padding: 0 0 4px; font-family: var(--ui); font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.mk-ntab .mk-sub td { color: var(--ink2); }
.mk-ntab .mk-sum td { font-weight: 600; border-bottom: 1px solid var(--sep2); }
.mk-sys { overflow-x: visible; }
.mk-sys .msys-r > span { white-space: normal; }
.mk-bt { color: var(--ink2); }
.mk-keys { font-size: 13.5px; }
.hj-sheet .mk-aug { font-size: 15px; }
.mk-aug .mm-g { gap: 6px 12px; }
/* con 4 o más casos, la tabla de momentos es una tarjeta por barra también en el escritorio */
.mk-mtab.mk-cards thead { display: none; }
.mk-mtab.mk-cards tr { display: flex; flex-wrap: wrap; gap: 2px 18px; padding: 6px 0; border-bottom: 1px solid var(--sep); }
.mk-mtab.mk-cards tr.mk-tr1 { border-top: 1px solid var(--sep2); }
.mk-mtab.mk-cards tr.mk-tr1 > * { border-top: 0; }
.mk-mtab.mk-cards th, .mk-mtab.mk-cards td { border: 0; padding: 0; white-space: nowrap; }
.mk-mtab.mk-cards td:empty, .mk-mtab.mk-cards th:empty { display: none; }
.mk-mtab.mk-cards .mk-cl { display: inline; }
@container hoja (max-width: 620px) {
  /* hoja angosta: la tabla de momentos pasa a una tarjeta por barra (cada fila, en bloque) */
  .mk-mtab thead { display: none; }
  .mk-mtab tr { display: flex; flex-wrap: wrap; gap: 2px 12px; padding: 6px 0; border-bottom: 1px solid var(--sep); }
  .mk-mtab tr.mk-tr1 { border-top: 1px solid var(--sep2); }
  .mk-mtab tr.mk-tr1 > * { border-top: 0; }
  .mk-mtab th, .mk-mtab td { border: 0; padding: 0; white-space: normal; }
  .mk-mtab td:empty, .mk-mtab th:empty { display: none; }
  .mk-mtab .mk-cl { display: inline; }
}
.mk-cl { display: none; }
