/* sites section: styles only this section uses. */

/* Rows that open a page: the name link covers the row, controls sit above it. */
.st-tr { cursor: pointer; }
.st-rowlink { color: var(--text); }
.st-rowlink:hover { color: var(--text); text-decoration: none; }
.st-rowlink::after { content: ''; position: absolute; inset: 0; }
.tr.off .st-rowlink { color: var(--muted); }
.st-over { position: relative; z-index: 1; }
.st-tile { width: 20px; height: 20px; border-radius: 3px; color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-tile.lg { width: 24px; height: 24px; font-size: 12px; }

/* Templates: the order edits in place — Enter saves, ✓/✕ show while it has focus. */
.st-ord { display: flex; justify-content: flex-end; margin-right: -8px; outline: 0; }
.st-ord-box { position: relative; z-index: 1; display: flex; }
.st-ord-in.inp { width: 58px; height: 28px; padding: 0 8px; text-align: right; border-color: transparent; background: transparent; font-size: 13px; }
.st-ord-in.inp:hover { border-color: var(--btn-line); }
.st-ord-in.inp:focus { border-color: var(--accent); background: var(--input-bg); }
/* Unfocused, the saved number shows; a value left unsaved stays in the field until it is focused again. */
.st-ord-in.inp:not(:focus) { color: transparent; }
.st-ord-val { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 13px; pointer-events: none; }
.st-ord:focus-within .st-ord-val { visibility: hidden; }
.st-ord-btns { display: none; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); gap: 2px; z-index: 2; }
.st-ord-hint { display: none; position: absolute; right: 18px; top: calc(var(--row-h) + 2px); z-index: 3; background: var(--menu-bg); border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; font-size: 11.5px; gap: 6px; align-items: center; box-shadow: var(--shadow); white-space: nowrap; }
.st-ord:focus-within .st-ord-btns, .st-ord:focus-within .st-ord-hint { display: flex; }
.tr:has(.st-ord:focus-within) { background: var(--cur-bg); box-shadow: inset 0 0 0 1px var(--accent); }
.tr:has(.st-ord:focus-within) .acts { display: none; }

.st-cond { border-bottom: 1px solid var(--line-2); }

/* Pages with their own page bar head (template editor, run report). */
.pbar.st-edit-bar { padding: 0 18px; }
.pbar.st-run-bar { padding: 0 16px 0 8px; }
.st-h1 { font-size: 15px; font-weight: 600; min-width: 0; }
.st-unsaved { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--info-fg); white-space: nowrap; }

/* Template editor: section nav, the form, the request preview. */
/* A size container: the sticky side columns are exactly as tall as the view (100cqh). */
.st-edit { flex-grow: 1; display: grid; grid-template-columns: 188px minmax(0, 1fr) 400px; align-items: start; min-height: 0; overflow: auto; container-type: size; }
.st-nav { position: sticky; top: 0; height: 100cqh; box-sizing: border-box; padding: 16px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.st-form { padding: 20px 28px 48px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.st-fs { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.st-sec { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 20px; }
.st-sec h2 { margin: 0; font-size: 15px; font-weight: 600; }
.st-g2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.st-hr { height: 1px; background: var(--line); flex-shrink: 0; }
.st-pill:has(.cb:checked) { border-color: var(--pill-on-line); background: var(--pill-on-bg); color: var(--pill-on-fg); }
.st-fs[disabled] .st-pill, .st-fs[disabled] .seg label { cursor: default; }
.st-danger { display: flex; flex-direction: column; }
.st-danger-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.st-danger-row + .st-danger-row { border-top: 1px solid var(--line-2); }
.st-aside { position: sticky; top: 0; height: 100cqh; box-sizing: border-box; border-left: 1px solid var(--line); background: var(--panel-2); padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.st-pre { display: none; position: relative; background: var(--code-bg); border-radius: 4px; padding: 14px; color: var(--code-fg); border: 1px solid var(--line); }
.st-pre pre { margin: 0; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.st-aside:has(input[name="preview"][value="curl"]:checked) .st-pre[data-preview="curl"],
.st-aside:has(input[name="preview"][value="json"]:checked) .st-pre[data-preview="json"],
.st-aside:has(input[name="preview"][value="python"]:checked) .st-pre[data-preview="python"] { display: block; }
.st-copy.btn { position: absolute; top: 8px; right: 8px; background: var(--code-btn); border-color: var(--code-btn-line); color: #fff; }
.st-copy.btn:hover { background: var(--code-btn-line); color: #fff; }

/* Benchmark run report: cases card and the facts beside it. */
.st-run { flex-grow: 1; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; padding: 16px; min-height: 0; background: var(--canvas); }
.st-run .card .list { min-height: 0; }
.st-run .card .th { border-top: 0; }

/* a suggestion's route: its tags give way, each to an ellipsis, before the cell cuts one off */
.st-route { display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.st-route > .chip { flex: 0 1 auto; min-width: 28px; overflow: hidden; text-overflow: ellipsis; }

/* a narrow window: the request preview goes under the form, then the sections become
   a strip over a single column; a benchmark's facts go under its cases */
@container content (width < 1100px) {
  .st-edit { grid-template-columns: 188px minmax(0, 1fr); }
  .st-aside { grid-column: 2; position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .st-run { grid-template-columns: minmax(0, 1fr); }
}
@container content (width < 720px) {
  .st-edit { grid-template-columns: minmax(0, 1fr); }
  .st-aside { grid-column: auto; }
  .st-nav { z-index: 2; height: auto; flex-direction: row; padding: 6px 10px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--panel); }
  .st-nav > :not(a) { display: none; }
  .st-form { padding: 16px 14px 40px; }
  .st-g2 { grid-template-columns: minmax(0, 1fr); }
}
