/* Trajectory viewer (trajectories.html, assets/traj.js). Every color is a token from styles.css, so dark mode comes
   from the token blocks there. */

.tj-page, .tj-page body { overflow-anchor: none; } /* traj.js keeps the reading position itself as chunks fill in */

.tj-head { padding-bottom: 28px; }

.tj { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 56px; align-items: start; }
.tj-main { min-width: 0; }

/* ------------------------------------------------------------------ task picker */
.tj-tasks { position: sticky; top: calc(var(--tj-top, 64px) + 16px); max-height: calc(100vh - var(--tj-top, 64px) - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.tj-tasks-toggle { display: none; }
.tj-tgroup { margin: 28px 0 10px; font-family: var(--font-sans); font-size: var(--fs-small); font-weight: 620; letter-spacing: 0; color: var(--muted); }
.tj-tgroup:first-child { margin-top: 0; }
.tj-tlist { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.tj-task { display: grid; gap: 2px; padding: 9px 8px 9px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.tj-task:hover { color: var(--ink); background: var(--hover); }
.tj-task[aria-current="true"] { color: var(--ink); border-left-color: var(--accent); background: var(--sheet); }
.tj-task-name { font-size: 0.875rem; font-weight: 560; line-height: 1.35; }
.tj-task[aria-current="true"] .tj-task-name { font-weight: 640; }
.tj-task-sum { font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.35; }
.tj-task:focus-visible { outline-offset: -2px; }

@media (max-width: 1023px) {
  .tj { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tj-tasks { position: static; max-height: none; overflow: visible; }
  .tj-tasks-toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; cursor: pointer; text-align: left;
    border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--sheet); color: var(--ink);
  }
  .tj-tasks-toggle:hover { border-color: var(--accent); }
  .tj-tt-k { font-size: var(--fs-small); color: var(--muted); }
  .tj-tt-v { flex: 1; min-width: 0; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tj-tt-c { width: 8px; height: 8px; margin: 0 4px 4px 0; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform 140ms; }
  .tj-tasks.open .tj-tt-c { transform: rotate(225deg); margin-bottom: -4px; }
  .tj-task-list { display: none; margin-top: 8px; padding: 14px 14px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); columns: 2; column-gap: 28px; }
  .tj-tasks.open .tj-task-list { display: block; }
  .tj-task-list .tj-tgroup { break-after: avoid; }
  .tj-task-list .tj-tlist { break-inside: auto; }
  .tj-task-list li { break-inside: avoid; }
  .tj-task[aria-current="true"] { background: var(--hover); }
}
@media (max-width: 600px) { .tj-task-list { columns: 1; } }

/* ------------------------------------------------------------------ task header and grid */
.tj-task-head h2 { margin-top: 6px; font-size: clamp(1.5rem, 2.6vw, 1.875rem); line-height: 1.15; font-weight: 660; }
.tj-task-sub { margin-top: 12px; max-width: 70ch; color: var(--ink-2); }
.tj-task-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 2px 0; font-size: var(--fs-small); color: var(--muted); }
.tj-task-meta > * + *::before { content: "·"; display: inline-block; margin: 0 9px; color: var(--muted); }
.tj-task-meta a { color: var(--ink-2); }

.tj-gridcard { margin-top: 32px; padding: 22px 26px 24px; }
.tj-gridhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; }
.tj-gridhead h3 { font-size: 1.0625rem; font-weight: 650; }
.tj-legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tj-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.tj-ramp { display: inline-block; width: 80px; height: 10px; border-radius: 0; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 8%, var(--sheet)), var(--accent) 60%, color-mix(in oklab, var(--accent), var(--ink) 26%)); }
.tj-swatch { display: inline-block; width: 14px; height: 12px; border-radius: 0; }
.tj-swatch.empty { background: repeating-linear-gradient(135deg, transparent 0 2.5px, var(--rule-strong) 2.5px 4px); box-shadow: inset 0 0 0 1px var(--rule-strong); }
/* Positioned so the visually hidden caption is clipped by the scroll box rather than widening the page. */
.tj-gridscroll { position: relative; margin-top: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tj-grid { border-collapse: separate; border-spacing: 3px; font-variant-numeric: tabular-nums; margin: -3px; }
.tj-grid thead th { padding: 0 0 2px; font-size: 0.75rem; font-weight: 560; color: var(--muted); text-align: center; }
.tj-grid th.tj-gm { padding-right: 14px; text-align: left; font-weight: 400; white-space: nowrap; }
.tj-gname { display: block; font-size: 0.875rem; font-weight: 560; color: var(--ink); line-height: 1.25; }
.tj-gmeta { display: none; font-size: 0.6875rem; color: var(--muted); line-height: 1.25; }
.tj-grid td { padding: 0; }
.tj-grid td.tj-gs, .tj-grid th.tj-gs { width: 48px; padding-left: 6px; text-align: right; font-size: 0.8125rem; color: var(--ink-2); }
.tj-grid th.tj-gs { color: var(--muted); font-size: 0.75rem; }
.tj-grid td.tj-gs:nth-last-child(2) { padding-left: 14px; width: 56px; }
.tj-cell {
  display: block; width: 46px; height: 30px; padding: 0; border: 0; border-radius: 0; cursor: pointer;
  background: color-mix(in oklab, color-mix(in oklab, var(--accent), var(--ink) var(--tj-q, 0%)) var(--tj-p, 8%), var(--sheet)); color: var(--ink);
  font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; transition: box-shadow 120ms;
}
/* Finished but never validly graded: selectable, with no reward. */
.tj-cell.ungraded { background: var(--sheet); color: var(--muted); box-shadow: inset 0 0 0 1px var(--rule-strong); }
/* Light mode: ink on the paler cells, light text from 84% accent (.deep) and on the deepened cells (.top). Dark mode:
   the cells brighten instead, so dark text from 74% (.hi, which .deep cells also carry) and on .top. */
.tj-cell.deep, .tj-cell.top { color: var(--sheet); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tj-cell.hi, :root:not([data-theme="light"]) .tj-cell.top { color: var(--on-btn); } }
:root[data-theme="dark"] .tj-cell.hi, :root[data-theme="dark"] .tj-cell.top { color: var(--on-btn); }
.tj-cell:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.tj-cell[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--ink); }
.tj-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.tj-cell.empty { cursor: default; background: repeating-linear-gradient(135deg, transparent 0 3px, var(--rule-strong) 3px 4.5px); box-shadow: inset 0 0 0 1px var(--rule-strong); }
/* select runs on the CAD tasks: hidden test parts shown (traj.js markGraded) */
.tj-cell.graded, .tj-swatch.graded { position: relative; }
.tj-cell.graded::after, .tj-swatch.graded::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1.5px var(--sheet); }
.tj-swatch.graded { background: color-mix(in oklab, var(--accent) 40%, var(--sheet)); }
.tj-swatch.graded::after { top: 1.5px; right: 1.5px; width: 4px; height: 4px; }
.tj-gridfoot { margin-top: 14px; }
@media (max-width: 640px) {
  .tj-gridcard { padding: 14px 12px 14px; }
  .tj-grid { border-spacing: 2px; margin: -2px; }
  .tj-grid .tj-gs { display: none; }
  .tj-gmeta { display: block; }
  .tj-grid th.tj-gm { padding-right: 8px; max-width: 104px; white-space: normal; }
  .tj-gname { font-size: 0.8125rem; }
  .tj-cell { width: 28px; height: 30px; font-size: 0.6875rem; border-radius: 0; }
}

/* ------------------------------------------------------------------ trial header */
.tj-trial { margin-top: 36px; }
.tj-trial-head { padding: 24px 26px; }
.tj-th-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 24px; }
.tj-th-who h3 { font-size: 1.25rem; font-weight: 660; line-height: 1.25; }
.tj-effort { margin-left: 10px; padding: 2px 9px; border-radius: 0; border: 1px solid var(--rule-strong); font-family: var(--font-sans); font-size: 0.75rem; font-weight: 560; letter-spacing: 0; color: var(--muted); vertical-align: 3px; white-space: nowrap; }
.tj-th-att { margin-top: 2px; font-size: var(--fs-small); color: var(--muted); }
.tj-th-reward { text-align: right; }
.tj-th-reward b { display: block; font-family: var(--font-display); font-size: 1.75rem; font-weight: 680; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tj-th-reward > span { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-small); color: var(--muted); }
.tj-facts { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(5, minmax(0, auto)); justify-content: space-between; gap: 12px 24px; }
.tj-facts dt { font-size: 0.75rem; color: var(--muted); }
.tj-facts dd { margin: 2px 0 0; font-size: var(--fs-ui); font-weight: 560; font-variant-numeric: tabular-nums; }
.tj-timebar { display: block; width: 100%; min-width: 96px; height: 4px; margin-top: 5px; border-radius: 0; background: var(--rule); overflow: hidden; }
.tj-timebar i { display: block; height: 100%; background: var(--mark-soft); }
.tj-kernel, .tj-trimnote { margin-top: 12px; font-size: var(--fs-small); color: var(--ink-2); padding-left: 10px; border-left: 2px solid var(--accent); }
.tj-trimnote { border-left-color: var(--rule-strong); color: var(--muted); }
@media (max-width: 860px) { .tj-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .tj-trial-head { padding: 14px 14px; }
  .tj-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tj-th-reward { text-align: left; }
}

.tj-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 0; border: 1px solid var(--rule-strong); font-size: 0.6875rem; font-weight: 600; line-height: 1.5; color: var(--muted); white-space: nowrap; font-family: var(--font-sans); }
.tj-chip.acc { border-color: transparent; background: var(--accent-wash); color: var(--accent-ink); }
.tj-muted { color: var(--muted); }
.tj-loading { color: var(--muted); font-size: var(--fs-ui); }
.tj-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 10px; vertical-align: -1px; border-radius: 50%; border: 2px solid var(--rule-strong); border-top-color: var(--accent); animation: tj-spin 0.8s linear infinite; }
@keyframes tj-spin { to { transform: rotate(360deg); } }
.tj-fail { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--accent-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--warn-wash); color: var(--ink-2); font-size: var(--fs-ui); }
.tj-empty-panel { padding: 28px 0; color: var(--muted); }

/* ------------------------------------------------------------------ tabs and panels */
.tj-tabs { margin-top: 28px; border-bottom: 1px solid var(--rule); }
.tj-panel { min-width: 0; }
.tj-panel.is-loading .tj-steps { opacity: 0.4; pointer-events: none; }

/* ------------------------------------------------------------------ the sticky bar: timeline and tools */
.tj-bar { z-index: 6; padding: 12px 0 8px; background: var(--bg); border-bottom: 1px solid var(--rule); }
@media (min-width: 720px) and (min-height: 560px) {
  .tj-bar { position: sticky; top: var(--tj-top, 64px); }
}
.tj-tl-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: 0.75rem; color: var(--muted); }
.tj-tl-k { font-weight: 620; color: var(--ink-2); }
.tj-tl-key { display: inline-flex; flex-wrap: wrap; gap: 2px 12px; }
.tj-tl-key > span { display: inline-flex; align-items: center; gap: 5px; }
.tj-tl-key i { display: inline-block; }
.tj-tl-key .k-turns { width: 8px; height: 9px; background: var(--mark-soft); border-radius: 0; }
.tj-tl-key .k-sub { width: 2px; height: 11px; background: var(--ink-2); }
.tj-tl-key .k-graded { width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
.tj-tl-key .k-compact { width: 0; height: 11px; border-left: 2px dashed var(--accent-2); }
.tj-tl-key .k-nudge { width: 1.5px; height: 6px; background: var(--muted); }
.tj-tl-read { margin-left: auto; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tj-tl-body { position: relative; margin-top: 6px; padding-top: 12px; }
.tj-tl-track { position: relative; height: 40px; border-radius: 0; background: var(--hover); cursor: pointer; touch-action: none; }
.tj-tl-track.drag { cursor: grabbing; }
.tj-tl-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tj-tl-density { position: absolute; left: 0; top: 4px; width: 100%; height: calc(100% - 12px); display: block; }
.tj-tl-bars { fill: var(--mark-soft); }
.tj-tl-marks { position: absolute; inset: 0; pointer-events: none; }
.tj-mk-compact { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--accent-2); }
.tj-tl-nudges { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.tj-tl-nudges path { fill: none; stroke: var(--muted); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.tj-tl-subs { position: absolute; left: 0; right: 0; top: 0; height: 12px; }
.tj-tick { position: absolute; top: 0; width: 10px; height: 52px; margin-left: -5px; padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; }
.tj-tick::before { content: ""; position: absolute; left: 4px; top: 1px; width: 2px; height: 50px; background: var(--ink-2); opacity: 0.7; }
.tj-tick:hover::before, .tj-tick:focus-visible::before { opacity: 1; width: 3px; left: 3.5px; }
.tj-tick.graded { z-index: 3; }
.tj-tick.graded::before { background: var(--accent); opacity: 1; width: 2px; }
.tj-tick.graded::after { content: ""; position: absolute; left: 1px; top: -1px; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg); }
.tj-tick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tj-tl-head { position: absolute; top: -4px; bottom: -4px; width: 0; z-index: 4; pointer-events: none; border-left: 2px solid var(--ink); margin-left: -1px; }
.tj-tl-head::before { content: ""; position: absolute; left: -6px; top: -2px; border: 5px solid transparent; border-top: 6px solid var(--ink); }
.tj-tl-axis { position: relative; height: 16px; margin-top: 3px; font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tj-tl-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.tj-tl-axis span:first-child { transform: none; }
.tj-tl-axis span.end { right: 0; transform: none; color: var(--ink-2); background: var(--bg); padding-left: 6px; }

.tj-tools { display: flex; margin-top: 8px; }
.tj-search { display: flex; align-items: center; gap: 4px; flex: 1 1 240px; max-width: 340px; min-width: 0; }
.tj-q-in {
  flex: 1; min-width: 0; height: 34px; padding: 4px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  background: var(--sheet); color: var(--ink); font: inherit; font-size: 0.875rem;
}
.tj-q-in:hover { border-color: var(--accent); }
.tj-q-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.tj-q-count { min-width: 0; font-size: 0.75rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tj-q-count:empty { display: none; }
.tj-q-btn { width: 32px; height: 34px; flex: none; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: var(--sheet); color: var(--ink-2); cursor: pointer; font-size: 0.875rem; }
.tj-q-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); }
.tj-q-btn:disabled { opacity: 0.45; cursor: default; }
@media (max-width: 719px) {
  .tj-search { flex: 1 1 100%; }
  .tj-tl-key { display: none; }
}

/* ------------------------------------------------------------------ step list */
.tj-steps { min-height: 200px; }
.tj-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); position: relative; }
.tj-row.is-cur::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0; background: var(--accent); }
.tj-gut { display: grid; align-content: start; justify-items: end; gap: 0; padding-top: 2px; font-size: 0.75rem; line-height: 1.45; font-variant-numeric: tabular-nums; color: var(--muted); }
.tj-n { color: var(--ink-2); font-weight: 620; text-decoration: none; }
.tj-n:hover { color: var(--link-hover); text-decoration: underline; }
.tj-body { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; }

.tj-prose { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; line-height: 1.6; color: var(--ink); }
.tj-msg { color: var(--ink); }
.tj-prose .tj-fence { margin: 6px 0; white-space: pre; }
.tj-reason-text { padding: 2px 0 2px 12px; border-left: 2px solid var(--rule-strong); color: var(--ink-2); font-size: 0.875rem; }
.tj-note-text { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--sheet); border: 1px solid var(--rule); font-size: 0.875rem; color: var(--ink-2); max-height: 70vh; overflow-y: auto; }

.tj-fold {
  display: flex; align-items: baseline; gap: 8px; width: 100%; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer;
  text-align: left; font-size: 0.875rem; color: var(--ink-2);
}
.tj-fold::before { content: ""; flex: none; width: 6px; height: 6px; margin: 0 2px 2px 1px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 120ms; align-self: center; }
.tj-fold[aria-expanded="true"]::before { transform: rotate(45deg); margin-bottom: 4px; }
.tj-fold:hover { color: var(--ink); }
.tj-fold:hover .tj-k { text-decoration: underline; text-underline-offset: 3px; }
.tj-k { flex: none; font-weight: 620; color: var(--ink-2); }
.tj-prev { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.tj-hits { flex: none; padding: 0 7px; border-radius: 0; background: color-mix(in oklab, var(--accent) 22%, transparent); color: var(--ink); font-size: 0.6875rem; font-weight: 600; line-height: 1.6; }

/* code, commands and results: they scroll inside themselves */
.tj pre { margin: 0; font-size: 0.8125rem; line-height: 1.55; white-space: pre; overflow-x: auto; tab-size: 4; -webkit-overflow-scrolling: touch; }
.tj pre code { font-family: inherit; }
.tj-call { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.tj-call-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 0.75rem; }
.tj-tool { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-weight: 600; font-size: 0.75rem; color: var(--ink-2); padding: 1px 7px; border-radius: 0; background: var(--hover); border: 1px solid var(--rule); }
.tj-exit { padding: 1px 7px; border-radius: 0; font-weight: 600; color: var(--muted); border: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.tj-exit.bad { border-color: transparent; background: var(--warn-wash); color: var(--warn-ink); }
.tj-cmd { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--code-bg); border: 1px solid var(--rule); color: var(--ink); }
.tj-result { padding: 6px 12px; border-left: 2px solid var(--rule-strong); color: var(--ink-2); font-size: 0.78125rem; }
.tj-codewrap, .tj-out { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; min-width: 0; }
.tj-codewrap > .tj-fold, .tj-out > .tj-fold { width: auto; justify-self: start; font-size: 0.8125rem; color: var(--muted); padding-left: 12px; }
.tj-noout { font-size: 0.8125rem; color: var(--muted); padding-left: 12px; border-left: 2px solid var(--rule); }
.tj-callmain { font-size: 0.9375rem; font-weight: 560; color: var(--ink); overflow-wrap: anywhere; }
.tj-callmain a { color: var(--ink); }
.tj-path { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; }
.tj-callsub { font-size: var(--fs-small); color: var(--ink-2); overflow-wrap: anywhere; }
.tj-call.k-submit { padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-left: 3px solid var(--rule-strong); background: var(--sheet); }
.tj-call.k-submit.graded { border-left-color: var(--accent); }
.tj-subn { font-size: 0.875rem; font-weight: 640; color: var(--ink); }
.tj-subdesc { font-size: 0.9375rem; color: var(--ink); overflow-wrap: anywhere; }
.tj-call.k-submit .tj-result { border-left: 0; padding-left: 0; }
.tj-call.k-submit .tj-out > .tj-fold { padding-left: 0; }
.tj-img { margin: 4px 0 0; }
.tj-img img { display: block; max-width: min(100%, 560px); max-height: 420px; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--rule); background: var(--sheet); }
.tj-emptyturn { font-size: 0.875rem; }

/* cut markers, as the build writes them: ⟪… 12,345 characters omitted …⟫ */
.tj-cut { display: inline-block; margin: 3px 0; padding: 0 8px; border: 1px dashed var(--rule-strong); border-radius: 0; font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 560; line-height: 1.7; color: var(--muted); white-space: nowrap; }
.tj-prose .tj-cut { font-size: 0.75rem; }

/* search marks */
.tj mark { background: color-mix(in oklab, var(--accent) 26%, transparent); color: inherit; border-radius: 0; box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 26%, transparent); }
.tj mark.cur { background: var(--accent); color: var(--on-btn); box-shadow: 0 0 0 2px var(--accent); }

/* harness lines, groups, compaction */
.tj-harness .tj-body { gap: 6px; }
.tj-hline { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 0.875rem; color: var(--ink-2); }
.tj-hk { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 0 8px; border-radius: 0; background: var(--hover); border: 1px solid var(--rule); font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.tj-hk small { font-size: 0.6875rem; font-weight: 500; }
.tj-htext { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.tj-harness .tj-fold { font-size: 0.875rem; }
.tj-gcount { flex: none; font-weight: 640; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tj-grange { flex: none; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.tj-glist { list-style: none; margin: 0; padding: 0 0 0 14px; display: grid; gap: 2px; font-size: 0.8125rem; border-left: 2px solid var(--rule); max-height: 50vh; overflow-y: auto; }
.tj-glist li { display: grid; grid-template-columns: 4.5em 3.5em minmax(0, 1fr); gap: 8px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tj-row.tj-harness, .tj-row.tj-compact { padding: 9px 0; }
.tj-compact .tj-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 0.8125rem; }
.tj-compact-k { font-weight: 640; color: var(--accent-ink); }
.tj-compact { border-bottom: 1px dashed var(--accent-2); }
.tj-row.tj-compact::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; border-top: 1px dashed var(--accent-2); }

@media (max-width: 640px) {
  .tj-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 0; }
  .tj-gut { display: flex; justify-content: flex-start; gap: 10px; padding-top: 0; }
  .tj-row.is-cur::before { left: -10px; }
  .tj-prose { font-size: 0.9375rem; }
  .tj-glist li { grid-template-columns: 4em 3em minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ submissions and output panels */
.tj-subs-lede { margin: 18px 0 10px; color: var(--ink-2); }
.tj-subs { width: 100%; border-collapse: collapse; font-size: var(--fs-ui); font-variant-numeric: tabular-nums; }
.tj-subs th { text-align: left; padding: 8px 12px 8px 0; font-size: var(--fs-small); font-weight: 560; color: var(--muted); border-bottom: 1px solid var(--rule-strong); white-space: nowrap; }
.tj-subs td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); }
.tj-subs .r { text-align: right; padding-right: 0; }
.tj-subs-n { width: 2.5em; font-weight: 620; color: var(--ink); }
.tj-subs-t { width: 4em; }
.tj-subs-d { overflow-wrap: anywhere; }
.tj-subs-d .tj-chip { margin-left: 8px; vertical-align: 1px; }
.tj-subs tr.graded td { color: var(--ink); }
.tj-subs tr.graded .tj-subs-n { box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.tj-subs-go { white-space: nowrap; font-size: var(--fs-small); }
.tj-subs th:first-child { padding-left: 0; }
.tj-subs tr:not(.graded) .tj-subs-n { padding-left: 10px; }
@media (max-width: 520px) { .tj-subs { font-size: 0.875rem; } }

.tj-cad { min-height: 120px; margin-top: 18px; }

/* Not in yet (2026-11-11): still running, or finished with its final grade still running */
.tj-cell.pending { background: var(--sheet); color: var(--accent-ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent-ink); }
.tj-cell.pending:disabled { cursor: default; }
.tj-swatch.pending { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--accent-ink); }
