/* bench-kit: the initials box and ⚙ Settings. Loaded after the bench's own research.css (whose
   .settings, .token-row, .check-row, .tour-row, .theme-swatches and .dev-warn styles it builds on). */

/* the initials box */
dialog.ini-dlg { width: min(92vw, 380px); }
dialog.ini-dlg .ini-in { text-transform: uppercase; letter-spacing: .08em; width: 7em; }
dialog.ini-dlg .ini-in::placeholder { text-transform: none; letter-spacing: 0; }
dialog.ini-dlg .ini-msg:empty { display: none; }
.ini-need { font: inherit; color: var(--red); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ini-need:hover { color: var(--text); }

/* ⚙ Settings, in tabs */
dialog.set-dlg { width: min(94vw, 600px); }
.set-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin: 4px 0 6px; }
.set-tabs button { font: 500 13px var(--sans); color: var(--text-dim); background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 9px 7px; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.set-tabs button:hover { color: var(--text); }
.set-tabs button.on { color: var(--text); border-bottom-color: var(--amber); }
.set-pane { display: grid; gap: 8px; min-height: 300px; align-content: start; }
.set-pane[hidden] { display: none; }
.set-pane h2:first-child { margin-top: 2px; }
.set-pane .row-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0; }
.set-dlg .set-msg { color: var(--red); margin: 0; }
.set-dlg .set-msg:empty { display: none; }
/* Settings ▸ Bench (project.js): the locked GitHub locations and their log */
.set-pane .pk-locked { opacity: .7; cursor: default; }
.set-pane .pk-again:not([hidden]) { display: grid; gap: 3px; margin-top: 4px; color: var(--amber); }
.set-pane .pk-log { display: grid; gap: 4px; font-size: 12.5px; color: var(--text-dim); }
.set-pane .pk-entry .btn { padding: 1px 7px; font-size: 12px; margin-left: 4px; }
/* Versions ▾ ▸ Add a version from files (builder.js) */
.bd-drop { border: 1px dashed var(--line); border-radius: 6px; padding: 14px; text-align: center; color: var(--text-dim); font-size: 13px; }
.bd-drop.on { border-color: var(--amber); color: var(--text); }
.bd-list, #bd-made { display: grid; gap: 4px; }
.bd-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.bd-file select { margin-left: auto; }
.bd-file .btn { padding: 1px 8px; }
.bd-list .smp { display: grid; gap: 2px; text-align: left; justify-items: start; padding: 6px 10px; width: 100%; min-width: 0; white-space: normal; }
.bd-list .smp b { font-weight: 600; }
/* an annotation's type (SW.BENCH.annotationTypes), above its text */
.ntype { display: inline-block; font: 600 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 3px; border: 1px solid currentColor; color: var(--text-dim); margin-bottom: 4px; }
.ntype[data-type="observation"] { color: var(--beam); }
.ntype[data-type="question"] { color: var(--amber); }
.ntype[data-type="metaphor"] { color: var(--violet); }
.ntype[data-type="pattern"] { color: var(--green); }
.ntype[data-type="context"] { color: var(--text-dim); }
.ntype[data-type="critique"] { color: var(--red); }
/* Read: another file of the version beside the one chosen (Beside, in Read's toolbar) */
.rd-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; align-items: start; }
.rd-beside { position: sticky; top: 0; max-height: calc(100vh - var(--bar-h, 90px) - 60px); overflow: auto; border-left: 1px solid var(--line); background: var(--bg); }
.rd-beside .bs-head { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.rd-beside .bs-head .btn { padding: 1px 8px; font-size: 12px; }
.rd-beside .bs-ln { display: grid; grid-template-columns: 4.5em minmax(0, 1fr); font-family: var(--code-font); font-size: var(--code-size); line-height: 1.55; white-space: pre-wrap; }
.rd-beside .bs-ln .n { color: var(--text-faint); text-align: right; padding-right: 12px; user-select: none; }
@media (max-width: 760px) { .rd-pair { grid-template-columns: minmax(0, 1fr); } .rd-beside { position: static; max-height: 60vh; border-left: 0; border-top: 1px solid var(--line); } }
/* repairs to versions made here (mending.js) */
.ln.mend .n { color: var(--kin); cursor: help; }
#dlg-mend .mend-held { margin: 0; padding: 6px 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; max-height: 12em; overflow: auto; white-space: pre-wrap; color: var(--text-dim); }
#dlg-mend textarea.mono { font-family: var(--code-font, var(--mono)); font-size: 13px; }
/* the About box: a bench's Zenodo badge in its DOI row (about.doiBadge) */
.about-badge img { display: inline-block; vertical-align: middle; margin-bottom: 3px; }
.about-badge.dim img { opacity: .5; filter: saturate(.6); transition: opacity .15s, filter .15s; }
.about-badge.dim:hover img, .about-badge.dim:focus-visible img { opacity: 1; filter: none; }
.set-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.set-foot .set-gap { flex: 1; }

/* naming, marking and tracings (tracings.js), from the Spacewar! bench's Dynamic Profile */
.gz-name { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; font-size: 12.5px; color: var(--text-dim); }
.gz-name input { width: 15em; font: 13px var(--sans); padding: 3px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.gz-real { color: var(--text-faint); font-weight: 400; }
.gz-marks { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; }
.gz-mk { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; background: var(--mk); padding: 0; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.gz-mk.on { border-color: var(--text); }
.gz-mk-none { background: none; color: var(--text-faint); font-size: 10px; line-height: 12px; }
.gz-mk:focus-visible { outline: 2px solid var(--beam); outline-offset: 1px; }
.gz-pen { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-dim); }
.gz-pen .gz-mk { width: 12px; height: 12px; cursor: default; display: inline-block; }
.gz-trchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 1px 4px 1px 8px; border: 1px solid var(--beam); border-radius: 12px; }
.gz-trchip .btn { padding: 0 6px; font-size: 12px; }
.gz-trpop { width: min(340px, 86vw); }
.gz-trpop h4 { margin: 6px 0 4px; }
.gz-trpop input { display: block; width: 100%; margin: 4px 0; font: 13px var(--sans); padding: 4px 7px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.gz-trlist { max-height: 40vh; overflow: auto; display: grid; gap: 4px; }
.gz-tri { display: flex; gap: 4px; align-items: start; }
.gz-tro { flex: 1; text-align: left; border: 1px solid var(--line-soft); background: var(--bg); color: var(--text); border-radius: 5px; padding: 4px 8px; cursor: pointer; font: 12.5px var(--sans); }
.gz-tro:hover { border-color: var(--text-dim); }
.gz-tro .faint { display: block; font-size: 11.5px; }
.gz-trsub { margin: 6px 0 2px; }

/* The About box (about.js) */
#dlg-about { max-width: 640px; max-height: 92vh; overflow: auto; }
.about-head { display: flex; align-items: center; gap: 14px; }
.about-head h2 { margin: 0; }
.about-meta { border-collapse: collapse; font-size: 12px; margin: 8px 0; }
.about-meta td { padding: 4px 8px; border-top: 1px solid var(--line-soft); vertical-align: top; line-height: 1.4; }
.about-meta td:first-child { color: var(--text-dim); white-space: nowrap; width: 7em; }
.about-cite { font-family: var(--serif, Georgia, serif); }
.about-kitmark { display: block; margin-top: 10px; text-align: center; font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); text-decoration: none; }
.about-kitmark:hover { color: var(--accent); text-decoration: underline; }

/* the Functional overview (functional.js) */
.fo-chip { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.fo-mk { display: inline-block; width: 4px; height: 12px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.fo-loop { margin: 6px 0 10px; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.fo-loop li { display: block; padding: 4px 8px; border-left: 2px solid var(--line-soft); }
.fo-ln { display: inline-block; min-width: 2.6em; font: 12px var(--mono); color: var(--text-faint); }
.fo-how { display: inline-block; width: 1.4em; color: var(--text-dim); }
.fo-fn { font-weight: 600; margin-right: 8px; }
.fo-next { margin: 3px 0 0 4em; font: 12px var(--mono); color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.fo-start td.fo-run { font-size: 12px; }
.fo-matrix th, .fo-matrix td { white-space: nowrap; }
.fo-matrix td.fo-self { background: color-mix(in srgb, var(--text) 6%, transparent); }
.fo-cell { font: inherit; background: none; border: 0; color: var(--beam); cursor: pointer; padding: 0 4px; text-decoration: underline dotted; }
.fo-cell.on { color: var(--text); font-weight: 700; }
.fo-pairs h4 { margin: 12px 0 6px; }

/* dictionary.js: a word looked up */
.dict-pop { max-width: 30em; max-height: 60vh; overflow: auto; font-size: 13px; line-height: 1.45; }
.dict-word + .dict-word { border-top: 1px solid var(--line-soft); margin-top: 8px; padding-top: 8px; }
.dict-q { margin-bottom: 4px; }
.dict-src { font: 10.5px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin: 6px 0 2px; }
.dict-head { font-weight: 600; }
.dict-read { color: var(--muted, #666); }
.dict-field { font-size: 11px; padding: 0 5px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-dim); }
.dict-senses { margin: 3px 0 3px 0.9em; }
.dict-sense { margin: 2px 0; }   /* the source's own numbers, (1., (a)), kept in the text */
.dict-etym { color: var(--text-dim); font-size: 12px; }
.dict-credit { color: var(--text-faint); font-size: 11px; margin-top: 4px; }

/* textstats.js: its figures (charts, the shaded table and the stepper), coloured by the theme's tokens only */
.ts-chart { display: block; width: 100%; height: auto; max-width: 100%; }
.ts-chart text { font-family: inherit; }   /* the figure's own font (bench.css sets svg text in mono) */
.ts-chart circle { cursor: default; }
.ts-heat { border-collapse: collapse; font: 11px var(--mono); }
.ts-heat th { font-weight: 400; color: var(--text-dim); padding: 1px 6px; text-align: left; white-space: nowrap; }
.ts-heat thead th { text-align: center; padding: 2px 4px; }
.ts-heat td { width: 26px; min-width: 26px; height: 16px; border: 1px solid var(--surface); cursor: pointer; text-align: center; color: var(--text); }
.ts-heat td:hover { outline: 1px solid var(--text); }
.ts-step { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.ts-step input[type="range"] { flex: 1 1 260px; min-width: 160px; accent-color: var(--amber); }
.ts-step .btn { min-width: 2.2em; }
.ts-step-l { font: 13px var(--serif); color: var(--text); min-width: 14em; }

/* word clouds (wordcloud.js): the figure's own font (bench.css sets svg text in mono) */
.wc-cloud { display: block; max-width: 100%; height: auto; }
.wc-cloud text { font-family: inherit; }
.wc-cloud text[data-w] { cursor: pointer; }
.wc-cloud text[data-w]:hover { fill-opacity: 0.7; }

/* the Topics tab (topics.js): a model's settings */
.tp-sum { border-collapse: collapse; font-size: 13px; }
.tp-sum th { text-align: left; font-weight: 400; color: var(--text-dim); padding: 2px 14px 2px 0; vertical-align: top; white-space: nowrap; }
.tp-sum td { padding: 2px 16px 2px 0; color: var(--text); }

/* the word cloud's format control (wordcloud.js): a Look menu and ⚙ with the details in a pop-over */
.wc-ctl { display: inline-flex; align-items: center; gap: 6px; }
.wc-ctl .wc-grid { grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; row-gap: 6px; min-width: 270px; }
.wc-ctl .wc-grid > label { font-size: 12.5px; color: var(--text-dim); }
.wc-ctl .wc-grid select { width: 100%; }
.wc-ctl .wc-checks label { font-size: 12.5px; color: var(--text); margin-right: 10px; }
.wc-ctl .wc-own { display: none; }
.wc-ctl .wc-grid > :not(label):not(select):not(span):not(button) { grid-column: 1 / -1; }
.wc-ctl .wc-reset { grid-column: 1 / -1; justify-self: start; }
.wc-ctl [hidden] { display: none !important; }
/* the cloud's figure (wordcloud.js frame()): zoom and export above it, the cloud scrolled when zoomed in */
.wc-frame .wc-zbar { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; margin: 0 0 4px; }
.wc-frame .wc-zbar .btn { padding: 2px 8px; font-size: 12px; }
.wc-frame .wc-zl { min-width: 3.4em; }
.wc-frame .wc-exp { margin-left: 8px; }
.wc-frame .wc-zoom { overflow: auto; max-height: 80vh; }
.wc-frame .wc-zoom svg.wc-cloud { display: block; height: auto; }
.wc-ctl .wc-reset[hidden] { display: none !important; }

/* ← Back in the tab row, after a jump from one place to another (SW.trail, base.js) */
.trail-back { color: var(--amber) !important; font-weight: 600; }
/* the Topics tab: a model whose text has changed since it was made */
.tp-warn-src { color: var(--red); font-size: 13px; margin: 6px 0; }
/* the Topics tab's parts (topics.js) */
.tp-part { font-size: 13px; }
.tp-using { margin: 0 0 4px; }
.tp-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px 18px; }
.tp-topic { border-top: 1px solid var(--line); padding-top: 6px; }
.tp-th { font-weight: 600; margin-bottom: 3px; }
.tp-words { font-size: 13px; line-height: 1.55; }
.tp-words a, .tp-carriers a, .tp-bars a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line); }
.tp-words a:hover, .tp-carriers a:hover, .tp-bars a:hover { color: var(--amber); }
.tp-num { font-variant-numeric: tabular-nums; color: var(--text-dim); font-size: 12px; }
.tp-bars { border-collapse: collapse; width: 100%; font-size: 13px; }
.tp-bars th { text-align: left; font-weight: 400; padding: 3px 10px 3px 0; width: 55%; }
.tp-bars td { padding: 3px 0; }
.tp-bar { display: inline-block; height: 9px; background: var(--amber); border-radius: 2px; min-width: 1px; }
.tp-bars .tp-num { text-align: right; padding-left: 8px; width: 4em; }
.tp-heatwrap { overflow-x: auto; }
.tp-fig svg { display: block; width: 100%; height: auto; }
.tp-carriers p { margin: 2px 0; font-size: 13px; }
.tp-thin { color: var(--text-dim); }
.tp-across { border-collapse: collapse; font-size: 12px; }
.tp-across th, .tp-across td { padding: 2px 8px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tp-across tbody th { text-align: left; font-weight: 400; }
.tp-thinrow { color: var(--text-dim); font-style: italic; }
.tp-pick { margin: 6px 0; font-size: 12px; }
.tp-selbox textarea { font: 14px/1.5 var(--serif, Georgia, serif); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 4px; padding: 6px; }
.tp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.tp-gmap h4 select { font-size: 12px; margin-left: 6px; }
.tp-gmap .ts-heat td { color: var(--text-dim); font-size: 10px; }

/* File ▾ ▸ Open a version… (menus.js): folders on the left, the versions on the right, each opening to its files */
dialog.ov-dlg { width: min(96vw, 980px); }
.ov-dlg .ov-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ov-dlg .ov-head h2 { margin: 0; flex: 1 1 auto; }
.ov-dlg .ov-q { width: min(320px, 100%); }
.ov-body { display: grid; grid-template-columns: 220px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 6px; height: min(62vh, 560px); margin: 10px 0; overflow: hidden; }
.ov-folders { overflow-y: auto; border-right: 1px solid var(--line); padding: 6px 0; background: var(--surface-2, var(--surface)); }
.ov-folder { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 5px 12px; font-size: 13px; cursor: pointer; }
.ov-folder.sub { padding-left: 30px; font-size: 12.5px; }
.ov-folder:hover { background: var(--surface); }
.ov-folder.on { background: color-mix(in srgb, var(--beam) 18%, transparent); font-weight: 600; }
.ov-ico { display: inline-block; width: 1.4em; color: var(--text-dim); }
.ov-list { overflow-y: auto; outline: none; font-size: 13px; }
.ov-row { display: grid; grid-template-columns: 22px minmax(180px, 2fr) minmax(80px, 1fr) minmax(90px, 1fr) minmax(80px, 1fr); align-items: center; padding: 4px 10px 4px 4px; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); cursor: default; user-select: none; }
.ov-row.ov-th { position: sticky; top: 0; background: var(--surface); color: var(--text-dim); font-size: 11.5px; text-transform: none; z-index: 1; }
.ov-row.on { background: color-mix(in srgb, var(--beam) 22%, transparent); }
.ov-row.cur .ov-name { font-weight: 600; }
.ov-row.lost { color: var(--text-dim); font-style: italic; }
.ov-row.ov-file { font-size: 12.5px; }
.ov-row.ov-file .ov-name { padding-left: 18px; grid-column: 2 / -1; }
.ov-fgroup { padding: 4px 10px 2px 44px; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.ov-twist { background: none; border: 0; color: var(--text-dim); cursor: pointer; padding: 0 4px; font-size: 12px; }
.ov-more { padding: 10px; }
.ov-dlg .row { display: flex; align-items: center; gap: 8px; }
.ov-dlg .ov-hint { flex: 1 1 auto; }
@media (max-width: 640px) { .ov-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .ov-folders { border-right: 0; border-bottom: 1px solid var(--line); max-height: 120px; } .ov-row { grid-template-columns: 22px 1fr 80px; } .ov-ref, .ov-med { display: none; } }

/* Edit (kit/vt-edit.js): the page's image beside the text. The text and the colours under it are set alike, a line for a line */
.vte { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.vte-bar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
.vte-nav, .vte-do, .vte-beside { display: inline-flex; align-items: center; gap: 4px; }
.vte-win { max-width: 22ch; }
.vte-status { padding: 0 12px 8px; }
.vte-split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-rows: minmax(0, 1fr); border-top: 1px solid var(--line); }
.vte-split.vte-alone { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.vte-alone .vte-pane { display: none; }
.vte-alone .vte-stack { max-width: 46em; margin: 0 auto; }
.vte-pane { overflow: auto; border-right: 1px solid var(--line); min-height: 0; }
.vte-img { display: block; width: 100%; cursor: zoom-in; }
.vte-img.big { width: 220%; max-width: none; cursor: zoom-out; }
.vte-credit { padding: 4px 8px; font-size: 11px; }
.vte-other { margin: 0; padding: 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.6 var(--serif, Georgia, serif); color: var(--text-dim); }
.vte-text { overflow: auto; min-height: 0; overflow-anchor: none; }
.vte-stack { display: grid; min-height: 100%; }
.vte-back, .vte-in { grid-area: 1 / 1; margin: 0; padding: 14px 16px; border: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.6 var(--serif, Georgia, serif); letter-spacing: normal; tab-size: 4; box-sizing: border-box; width: 100%; }
.vte-back { color: var(--text); pointer-events: none; }
.vte-in { color: transparent; caret-color: var(--text); background: transparent; resize: none; overflow: hidden; outline: none; }
.vte-locked .vte-in { cursor: default; caret-color: transparent; }
.vte-locked .vte-back { color: var(--text-dim); }
.vte-lock { white-space: nowrap; }
.vte-in::selection { background: color-mix(in srgb, var(--amber) 28%, transparent); color: transparent; }
.vte-mk { color: var(--text-faint); }
.vte-hd { color: var(--text-dim); }
.vte-new { background: color-mix(in srgb, #8f6c00 22%, transparent); border-radius: 2px; }
.vte-save { width: min(760px, 94vw); max-height: 86vh; padding: 0; }
.vte-save form { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; }
.vte-save h3 { margin: 0; }
.vte-save .vt-ch { margin-bottom: 12px; }
.vte-allwhy { display: flex; gap: 8px; align-items: center; }
.vte-allwhy input { flex: 1; }
.vte-list { overflow: auto; max-height: 52vh; }
.vte-why, .vte-src { width: 100%; box-sizing: border-box; margin-top: 4px; }
.vte-save .row { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 560px) { .vte-split:not(.vte-alone) { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } .vte-pane { border-right: 0; border-bottom: 1px solid var(--line); } }
