/* Prednáška 5 – Attention a transformer: štýly labov */
.l5-top { display: grid; gap: 10px; margin-bottom: 16px; }
.l5-ask { color: var(--text-2) !important; font-size: .9375rem !important; line-height: 1.5 !important; }
.l5-scroll { overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.l5-dim { color: var(--text-3); white-space: normal; }
.l5-explain { white-space: normal; min-height: 3.6em; }
.l5-explain sub, .l5-explain sup { font-size: .72em; }
.l5-res { color: var(--accent-hi) !important; }
.l5-sa { color: var(--violet); font-weight: 600; }
.l5-sb { color: var(--teal); font-weight: 600; }
.l5-sub { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }

/* matica s číslami */
.l5-mx { display: inline-grid; gap: 6px; align-content: start; }
.l5-mx-t { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: .8125rem; color: var(--text-3); }
.l5-mx-t b { font: 600 1rem/1.2 var(--font-mono); color: var(--text); }
.l5-mx-t b sub, .l5-mx-t b sup { font-size: .7em; }
.l5-grid { display: grid; gap: 3px; align-items: center; }
.l5-corner { font: 500 .6875rem/1 var(--font-mono); color: var(--text-3); padding-right: 6px; white-space: nowrap; }
.l5-ch { font: 500 .75rem/1.2 var(--font); color: var(--text-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-bottom: 2px; }
.l5-rh { font: 500 .8125rem/1.2 var(--font); color: var(--text-2); text-align: right; padding-right: 8px; white-space: nowrap; }
.l5-c { display: grid; place-items: center; height: 34px; min-width: 0; padding: 0 2px; border-radius: 6px; border: 1px solid transparent; font: 500 .8125rem/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); background: rgba(255, 255, 255, .03); transition: box-shadow .15s, opacity .15s; }
button.l5-c { cursor: pointer; }
.l5-mx.edit .l5-c { border: 1px dashed rgba(242, 165, 65, .45); }
.l5-c.inf { color: var(--text-3); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 5px, rgba(255, 255, 255, .07) 5px 10px); }
.l5-c.zero { color: var(--text-3); }
.l5-c.sa { box-shadow: inset 0 0 0 2px var(--violet); }
.l5-c.sb { box-shadow: inset 0 0 0 2px var(--teal); }
.l5-c.sa.sb { box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 2px var(--teal); }
.l5-c.cur { box-shadow: 0 0 0 2px var(--accent-hi); position: relative; z-index: 1; }
.l5-c.sel { box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(242, 165, 65, .5); border-style: solid; border-color: var(--accent); }
.l5-c.bad { color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }

/* stĺpce */
.l5-bars { display: grid; gap: 6px; }
.l5-bar { display: grid; grid-template-columns: 56px 52px minmax(0, 1fr) 50px; gap: 8px; align-items: center; font: 500 .8125rem/1.2 var(--font-mono); color: var(--text-3); }
.l5-bl { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); }
.l5-bm { text-align: right; }
.l5-bar i { height: 12px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.l5-bar u { display: block; height: 100%; border-radius: 99px; background: var(--violet); transition: width .25s var(--ease); }
.l5-bar em { font-style: normal; text-align: right; color: var(--text-2); }
.l5-bar.top em, .l5-bar.top .l5-bl { color: var(--text); font-weight: 600; }
.l5-pane { display: grid; gap: 10px; align-content: start; }
.l5-pane .readout { white-space: normal; line-height: 1.6; }

/* oblúky */
.l5-sentwrap { padding: 46px 16px 18px; }
.l5-sent { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 52px 6px; }
.l5-arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.l5-tok { position: relative; display: grid; justify-items: center; gap: 2px; padding: 7px 10px 6px; border-radius: 10px; border: 1px solid var(--line-2); color: var(--text); font: 500 1.0625rem/1.2 var(--font); cursor: pointer; min-width: 44px; transition: background-color .2s, border-color .2s; }
.l5-tok small { font: 500 .6875rem/1 var(--font-mono); color: var(--text-2); }
.l5-tok.q { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); background: rgba(242, 165, 65, .18) !important; }
.l5-tok.q small { color: var(--accent-hi); }
.l5-tok.fut { opacity: .45; }
.l5-legend { margin-top: 12px; }
.l5-sentwrap + .readout { margin-top: 12px; white-space: normal; }

/* kalkulačka */
.l5-ctl { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: end; margin-bottom: 16px; }
.l5-steps { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
.l5-step { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; }
.l5-step small { font: 600 .6875rem/1 var(--font-mono); opacity: .7; }
.l5-step sub { font-size: .7em; }
.l5-card { margin-top: 8px; padding: 18px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #090c13; display: grid; gap: 14px; }
.l5-stephead { display: grid; gap: 6px; }
.l5-stephead h4 { margin: 0 !important; font-size: 1.1875rem; }
.l5-stephead h4 sub { font-size: .65em; }
.l5-stepn { font: 600 .75rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--violet) !important; }
.l5-stephead p:last-child { color: var(--text-2); font-size: .9375rem; line-height: 1.6; max-width: 76ch; }
.l5-f { justify-self: start; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font: 500 .9375rem/1.6 var(--font-mono); color: var(--text); overflow-x: auto; max-width: 100%; }
.l5-f sub, .l5-f sup { font-size: .72em; }
.l5-stage { display: flex; flex-wrap: wrap; gap: 14px 12px; align-items: center; overflow-x: auto; padding: 4px 2px 6px; }
.l5-op { font: 600 1.125rem/1 var(--font-mono); color: var(--text-3); padding-top: 22px; white-space: nowrap; }
.l5-dims { font-size: .8125rem !important; color: var(--text-3) !important; line-height: 1.5 !important; }
.l5-dims b { font-family: var(--font-mono); color: var(--text-2); font-weight: 600; }
.l5-nav { justify-content: space-between; }
.l5-under { margin-top: 16px; }
.l5-editor { padding: 14px 16px; border-radius: var(--r-sm); border: 1px dashed rgba(242, 165, 65, .35); background: rgba(242, 165, 65, .04); min-height: 74px; }
.l5-editor .ctl sub { font-size: .7em; }
.l5-edhint { font-size: .875rem !important; color: var(--text-2) !important; line-height: 1.5 !important; }
.l5-live { padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 8px; }
.l5-live .lab-label { margin: 0; }
.l5-livebars { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8125rem; color: var(--text-2); }
.l5-livebars span { display: inline-flex; align-items: center; gap: 6px; }
.l5-livebars i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-2); }
.l5-livebars b { font-family: var(--font-mono); color: var(--text); }
.l5-vec { display: grid; grid-template-columns: 38px repeat(4, minmax(0, 1fr)); gap: 3px; align-items: center; font-size: .75rem; color: var(--text-3); }
.l5-vec i { display: grid; place-items: center; height: 28px; border-radius: 6px; font: 500 .8125rem/1 var(--font-mono); font-style: normal; color: var(--text); }

/* maska, heads */
.l5-maskrow .l5-mx { --cw: 46px; }
.l5-hmgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.l5-hmcard { padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: #090c13; display: grid; gap: 8px; min-width: 0; }
.l5-hm { display: grid; gap: 2px; align-items: center; }
.l5-hm i { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, .03); cursor: pointer; }
.l5-hm i.fut { background: transparent; outline: 1px solid rgba(255, 255, 255, .03); outline-offset: -1px; }
.l5-hm i.r { box-shadow: inset 0 1px 0 rgba(242, 165, 65, .8), inset 0 -1px 0 rgba(242, 165, 65, .8); }
.l5-hm i.cur { box-shadow: 0 0 0 2px var(--accent-hi); }
.l5-hl { all: unset; cursor: pointer; font: 500 .6875rem/1.2 var(--font); color: var(--text-3); text-align: right; padding: 0 6px 0 0; white-space: nowrap; max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
.l5-hl.on { color: var(--accent-hi); font-weight: 600; }
.l5-hl:focus-visible { outline: 2px solid var(--accent); }
.l5-96row { align-items: center; }
.l5-96stage { padding: 10px; }
.l5-grid96 canvas { width: 100%; }
.l5-stats .stat b { font-size: 1rem; }

/* posúvanie vektora */
.l5-static svg { touch-action: auto; }

/* architektúra */
.l5-archrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.l5-arch { padding: 8px; }
.l5-arch svg { max-width: 460px; margin-inline: auto; touch-action: manipulation; }
.l5-arch svg text { font-size: 13.5px; fill: #dfe3ea; pointer-events: none; }
.l5-wire { fill: none; stroke: #8f96a6; stroke-width: 1.5; }
.l5-frame { fill: rgba(255, 255, 255, .025); stroke: rgba(255, 255, 255, .22); stroke-width: 1.2; }
.l5-plus { fill: #090c13; stroke: #8f96a6; stroke-width: 1.5; }
.l5-pec { fill: #090c13; stroke: #c9ced8; stroke-width: 1.5; }
.l5-pel text { font-size: 12px !important; fill: var(--text-3) !important; }
.l5-box { cursor: pointer; outline: none; }
.l5-box rect { stroke-width: 1.5; transition: stroke .15s, filter .15s; }
.l5-box.att rect { fill: #2b2442; stroke: #b79bff88; }
.l5-box.an rect { fill: #3a3a1c; stroke: #e8e07a66; }
.l5-box.ff rect { fill: #183a3a; stroke: #5fd4d088; }
.l5-box.lin rect { fill: #1f2c4a; stroke: #7fa8ff88; }
.l5-box.sm rect { fill: #1d3a2b; stroke: #5ad99a88; }
.l5-box.emb rect { fill: #3a2a2a; stroke: #ff7a7a66; }
.l5-box:hover rect, .l5-box:focus-visible rect { stroke: #fff; }
.l5-box.on rect { stroke: var(--accent-hi); stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(242, 165, 65, .55)); }
.l5-box.lbl rect, .l5-box.nx rect { stroke: none; }
.l5-box.lbl.on text, .l5-box.nx.on text { fill: var(--accent-hi); font-weight: 700; }
.l5-box.pe.on .l5-pec, .l5-box.pe:hover .l5-pec { stroke: var(--accent-hi); }
.l5-part { transition: opacity .3s; }
.l5-part.off { opacity: .16; pointer-events: none; }
.l5-panel { padding: 18px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); display: grid; gap: 10px; align-content: start; min-width: 0; }
.l5-panel h4 { margin: 0 !important; font-size: 1.25rem; }
.l5-panel p { font-size: .9375rem !important; line-height: 1.6 !important; color: var(--text-2) !important; }
.l5-pk { font: 600 .75rem/1 var(--font) !important; letter-spacing: .08em; text-transform: uppercase; color: var(--violet) !important; }
.l5-panel .l5-ph { color: var(--text) !important; font-weight: 600; }
.l5-io { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.l5-io span { padding: 8px 10px; border-radius: 8px; background: #090c13; border: 1px solid var(--line); font-size: .8125rem; color: var(--text-2); line-height: 1.4; }
.l5-io b { display: block; font: 600 .6875rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.l5-cmp { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.l5-cmp th, .l5-cmp td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.l5-cmp th { color: var(--text-3); font-weight: 600; font-size: .75rem; }
.l5-cmp td:first-child { color: var(--text-3); }
.l5-cmp td:not(:first-child) { font-family: var(--font-mono); color: var(--text-2); }
.l5-cmp .hl { color: var(--accent-hi) !important; background: rgba(242, 165, 65, .06); }
.l5-cmp tr:last-child td { border-bottom: 0; }

/* statické obrázky v texte */
.l5-figsvg { padding: 16px; background: #090c13; }
.l5-figsvg svg text { font-size: 13px; }
.l5-cplx td.num { white-space: nowrap; }

@media (max-width: 1100px) {
  .l5-archrow { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .l5-c { height: 30px; font-size: .75rem; }
  .l5-mx { --cw: 44px !important; }
  .l5-maskrow .l5-mx { --cw: 40px; }
  .l5-card { padding: 14px 12px; }
  .l5-hmgrid { grid-template-columns: minmax(0, 1fr); }
  .l5-sentwrap { padding: 40px 8px 14px; }
  .l5-sent { gap: 46px 4px; }
  .l5-tok { font-size: .9375rem; padding: 6px 7px 5px; min-width: 36px; }
  .l5-bar { grid-template-columns: 50px 46px minmax(0, 1fr) 44px; gap: 6px; }
  .l5-io { grid-template-columns: 1fr; }
}
.l5-96stage { max-width: 360px; width: 100%; justify-self: center; }
.l5-stats .stat b { white-space: nowrap; }
#lab-norm .readout { white-space: normal; }
