/* Prednáška 2 – Matematika učenia. Triedy s prefixom l2-. */
.l2-gap { margin-top: 16px; }
.stage svg.l2-plot text { font-size: 13px; }
.l2-drag svg, .l2-drag canvas { cursor: crosshair; }
.stage.l2-static svg { touch-action: auto; }
.l2-legend { margin-top: 10px; }
.l2-status { font-size: .875rem !important; line-height: 1.55 !important; color: var(--text-2) !important; min-height: 2.9em; }
.l2-status b { font-weight: 600; }
.l2-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }

/* kompaktné tabuľky v laboch */
.l2-tbl th, .l2-tbl td { padding: 8px 12px; font-size: .875rem; }
.l2-tbl th { font-size: .75rem; text-transform: none; letter-spacing: 0; }
.l2-tbl td[colspan] { font-family: var(--font-mono); font-size: .8125rem; color: var(--text-2); }
.l2-steps td.num { min-width: 7ch; }

/* tabuľka pravidiel: text sa môže zalamovať */
.l2-rules td { white-space: normal; min-width: 9ch; vertical-align: top; }
.l2-rules td:nth-child(-n+2) { white-space: nowrap; font-family: var(--font-mono); color: var(--text); }
.l2-rules td:last-child { min-width: 24ch; color: var(--text-2); }

/* reťaz neurónov */
.l2-chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr) auto) minmax(0, 1fr); gap: 6px; align-items: stretch; }
.l2-node { display: grid; gap: 6px; align-content: center; justify-items: center; min-width: 0; padding: 12px 4px; border-radius: 12px; border: 1px solid var(--line-2); background: #090c13; text-align: center; }
.l2-node b { font: 600 1.125rem/1 var(--font-display); color: var(--text); }
.l2-node small { font: 400 .75rem/1.2 var(--font-mono); color: var(--text-3); white-space: nowrap; }
.l2-node span { font: 600 .9375rem/1 var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; }
.l2-link { display: grid; gap: 4px; align-content: center; justify-items: center; padding: 0 2px; font: 500 .6875rem/1 var(--font-mono); color: var(--text-3); white-space: nowrap; }
.l2-link i { font-style: normal; font-size: 1.25rem; line-height: .8; color: var(--accent-hi); }
.l2-link b { font-size: .8125rem; font-weight: 600; color: var(--accent-hi); font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .l2-chain { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .l2-node { grid-template-columns: 2.5ch minmax(0, 1fr) auto; justify-items: start; text-align: left; padding: 11px 14px; gap: 12px; align-items: center; }
  .l2-node small { font-size: .8125rem; }
  .l2-link { grid-template-columns: auto auto 1fr; justify-items: start; gap: 10px; padding: 3px 14px; font-size: .75rem; }
  .l2-link i { order: -1; transform: rotate(90deg); }
}

.l2-sumline { margin-top: 8px; font: 500 .8125rem/1.5 var(--font-mono); color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .readout.l2-wrap { white-space: normal; }
  .l2-tbl th, .l2-tbl td { padding: 7px 6px; font-size: .8125rem; }
  .l2-tbl th:first-child, .l2-tbl td:first-child { padding-left: 10px; }
  .l2-tbl th:last-child, .l2-tbl td:last-child { padding-right: 10px; }
}
@media (max-width: 760px) {
  .l2-rules, .l2-rules tbody { display: block; }
  .l2-rules thead { display: none; }
  .l2-rules tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .l2-rules tr:last-child { border-bottom: 0; }
  .l2-rules td { padding: 0; border: 0; min-width: 0 !important; }
  .l2-rules td:nth-child(2) { color: var(--accent-hi); }
  .l2-rules td:nth-child(2)::before { content: "→ "; color: var(--text-3); }
  .l2-rules td:last-child { grid-column: 1 / -1; margin-top: 6px; white-space: normal; }
}
@media (max-width: 760px) {
  .l2-rules tr.hl { background: rgba(242, 165, 65, .07); }
  .l2-rules tr.hl td { background: none; }
}
