/* CodecMem token strip v1: token bars under the method teaser, as HTML (tokbar.js keeps them in sync).
   Bars are drawn to one scale: the dense frame's 340 tokens fill the bar column minus --tk-reserve, the room
   the longest value ('340: first frame kept whole', 12.7em) needs after a full bar. */

.tk-box { background: #0a0a0a; border: 1px solid var(--line, rgba(255, 255, 255, .14)); border-radius: 6px; overflow: hidden; }
.tk-box > video { border: 0; border-radius: 0; display: block; width: 100%; height: auto; }

.tk {
  --tk-dense: rgb(74, 143, 227);
  --tk-codec: rgb(118, 186, 0);
  --tk-fs: 13.5px;
  --tk-lab: 11.6em;            /* label column */
  --tk-reserve: 13.9em;        /* room after a full bar: the value text and the gap */
  --tk-d: 340;                 /* tokens of the full bar (tokbar.js sets it from the spec) */
  container-type: inline-size;
  background: #0a0a0a; color: var(--ink-soft, #d6d6d6);
  font-family: var(--font-sans, Arial, Helvetica, sans-serif); font-size: var(--tk-fs); line-height: 1.45;
  font-variant-numeric: tabular-nums; text-align: left;
}
.tk-in { padding: .8em 1.1em .9em; }
.tk-note, .tk-clip { color: var(--ink-muted, #a7a7a7); font-size: .963em; line-height: 1.5; margin: 0; }
.tk-note { margin-bottom: .45em; }
.tk-clip { margin-top: .4em; }
.tk-clip b { color: #fff; font-weight: 700; }
.tk-clip .tk-ours { color: var(--accent-light, #9bdc2a); }
.tk-row { align-items: center; display: grid; grid-template-columns: var(--tk-lab) minmax(0, 1fr); min-height: 1.95em; }
.tk-lab { color: var(--ink, #f7f7f7); font-weight: 700; white-space: nowrap; }
.tk-lab .tk-ours { color: var(--accent-light, #9bdc2a); }
.tk-track { align-items: center; display: flex; gap: .85em; min-width: 0; }
.tk-bar {
  background: var(--tk-dense); border-radius: .22em; display: block; flex: none; height: .8em;
  width: calc(var(--n, 0) / var(--tk-d) * (100% - var(--tk-reserve)));
}
.tk-row--codec .tk-bar { background: var(--tk-codec); }
.tk-zero .tk-bar { display: none; }
.tk-val { color: #fff; font-weight: 700; white-space: nowrap; }

/* narrow (phones, small tablets): label and value on one line, the bar under them at full width */
@container (max-width: 680px) {
  .tk-in { font-size: .93em; padding: .75em .9em .85em; }
  .tk-row { --tk-reserve: 0px; grid-template-areas: "lab val" "bar bar"; grid-template-columns: minmax(0, 1fr) auto; margin-top: .3em; row-gap: .3em; }
  .tk-track { display: contents; }
  .tk-lab { grid-area: lab; }
  .tk-val { grid-area: val; }
  .tk-bar { grid-area: bar; justify-self: start; height: .7em; }
  .tk-zero .tk-bar { display: block; visibility: hidden; }
}
