/* Everything that floats: dialogs, the palette, the model picker and browser.
 *
 * One card style for all of them — a raised surface on a soft scrim that
 * settles into place — so a settings page and a confirmation are plainly the
 * same kind of thing at different sizes.
 */

/* ---- the layer ---------------------------------------------------------- */
.dialog-layer,
.palette-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 32px;
}
.dialog-layer .scrim,
.palette-layer .scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
  /* No blur behind the scrim, or anywhere on the page: Qt WebEngine on
     Windows flickers whenever a backdrop filter is redrawn, and one the size
     of the window is redrawn for every hover. */
  animation: fade-in 200ms var(--ease) both;
}

.dialog-layer.leaving .scrim,
.palette-layer.leaving .scrim { animation: fade-out 160ms var(--ease) both; }
@keyframes fade-out { to { opacity: 0; } }

/* The window behind an open one goes soft as well as dim: a plain blur of
   the app as it stands, drawn once, never a backdrop filter (above), and
   never animated, since it is the whole window (docs/speed.md, rules 6 and
   8). Settings › Appearance › Windows can turn it off. */
html.dialog-open:not(.no-window-blur) #app { filter: blur(3px); }
/* A window opened over another blurs that one the same way, drawn once and
   never animated, so its words never show through the one in front. */
html:not(.no-window-blur) .dialog-layer:has(~ .dialog-layer:not(.leaving)) > .dialog { filter: blur(3px); }

/* ---- the card ----------------------------------------------------------- */
.dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-height: min(86vh, 860px);
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--raised);
  box-shadow: var(--shadow-window);
  animation: dialog-in 260ms var(--ease-out) both;
  outline: none;
  overflow: hidden;
}
.dialog-layer.leaving .dialog { animation: dialog-out 150ms var(--ease) both; }
.dialog.nudge { animation: dialog-nudge 320ms var(--ease-spring); }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes dialog-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes dialog-nudge { 0%, 100% { transform: none; } 40% { transform: scale(1.012); } }

.dialog.small { width: min(440px, 100%); }
.dialog.medium { width: min(640px, 100%); }
.dialog.large { width: min(780px, 100%); height: min(640px, 86vh); }
.dialog.browser { width: min(1040px, 100%); height: min(720px, 88vh); }

.dialog-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 6px 24px;
  flex: none;
}
.dialog-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 560;
  letter-spacing: -0.012em;
  color: var(--text);
  font-variation-settings: "SOFT" 40, "opsz" 36;
}
/* A window with no title over it: its close button floats in the corner
   and what it holds starts at the top. */
.dialog.untitled > .dialog-head { position: absolute; top: 12px; right: 12px; z-index: 3; padding: 0; gap: 4px; }
.dialog.untitled > .dialog-head .head-actions:empty { display: none; }
.dialog.untitled > .dialog-body { padding-top: 22px; }
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.dialog-head .head-actions { display: flex; align-items: center; gap: 6px; }
.dialog-head .close { color: var(--text3); }

.dialog-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dialog-text {
  margin: 0;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}
.dialog-text.lead { margin-top: -4px; }
.dialog.small .dialog-body { gap: 12px; padding-bottom: 22px; }

.dialog-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 16px 24px;
  border-top: 1px solid var(--border);
  flex: none;
}
.dialog.small .dialog-foot { border-top: 0; padding-top: 0; padding-bottom: 20px; }
/* Beside the one filled button a window asks for, a second choice has a hairline. */
.dialog-foot .btn:not(.primary, .danger, .ghost, .danger-text) { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); }
.dialog-foot .btn:not(.primary, .danger, .ghost, .danger-text):hover:not(:disabled) { background: var(--soft); }
.dialog-foot .btn:not(.primary, .danger, .ghost, .danger-text):active:not(:disabled) { background: var(--soft-hover); }
.foot-spacer { flex: 1; }
.foot-note { color: var(--text3); font-size: 12px; }

.code-pane {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-fg);
  border: 1px solid var(--code-border);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  overflow: auto;
}
.dialog .code-pane { flex: 1; min-height: 0; }

/* ---- forms ---------------------------------------------------------------- */
.form-row { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-control { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-hint { font-size: 12px; color: var(--text3); line-height: 1.45; }
.form-error { color: var(--danger); font-size: 12.5px; min-height: 1em; }
.form-error:empty { display: none; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
/* Send with options: Web search and Reasoning have five and six choices,
   more than half the window holds, so each row takes the whole width. */
.dialog.send-options .form-grid { grid-template-columns: minmax(0, 1fr); }
.form-section { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.form-section-title {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
}
.form-section-detail { font-size: 12.5px; color: var(--text3); }
.toggle-stack { display: flex; flex-direction: column; gap: 12px; }

.check .check-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--text); padding-top: 1px; }

.field-with-button { display: flex; align-items: center; gap: 8px; }
.field-with-button > .field,
.field-with-button > .dropdown { flex: 1; min-width: 0; }
.field-with-button .reveal { margin-left: -46px; margin-right: 8px; z-index: 1; }
.field-with-button input[type="password"],
.field-with-button input[type="text"] { padding-right: 40px; }

.field.small { height: 30px; font-size: 12.5px; }

/* The number field with its two steps. */
.stepper {
  display: flex;
  align-items: center;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--input-bg);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  overflow: hidden;
}
.stepper:focus-within { border-color: var(--text2); box-shadow: inset 0 0 0 0.5px var(--text2); }
.stepper .field {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: none !important;
}
.stepper .step {
  display: grid;
  place-items: center;
  width: 32px;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text3);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.stepper .step:hover { background: var(--soft); color: var(--text); }
.stepper .step .icon { width: 14px; height: 14px; }
.stepper .suffix { color: var(--text3); font-size: 12px; padding-right: 4px; }

/* A menu dressed as a field. */
.dropdown {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}
.dropdown .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown .chev { width: 14px; height: 14px; color: var(--text3); transition: transform var(--dur) var(--ease); }
.dropdown.open .chev { transform: rotate(180deg); }
.dropdown.placeholder .label { color: var(--text3); }
.dropdown .mark { width: 16px; height: 16px; display: inline-flex; color: var(--text2); }
.dropdown .mark svg { width: 100%; height: 100%; }
.model-field-row { display: flex; align-items: center; gap: 6px; }
.model-field-row .dropdown { flex: 1; min-width: 0; }

/* Segmented choices with a sliding thumb. */
.segmented {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--soft);
  max-width: 100%;
}
.segmented button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.segmented button .icon { width: 14px; height: 14px; }
.segmented button:hover:not(:disabled) { color: var(--text); }
.segmented button.on { color: var(--text); }
/* Shown, but not to be changed while something else is off. */
.segmented.disabled,
.form-row.disabled > :not(.form-control) { opacity: 0.5; }
.segmented button:disabled { cursor: default; }
.segmented .seg-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  height: 28px;
  width: 0;
  border-radius: 999px;
  background: var(--raised);
  box-shadow: 0 1px 2px var(--shadow-soft), 0 0 0 1px var(--border);
  transition: transform 220ms var(--ease), width 220ms var(--ease);
}
html.dark .segmented .seg-thumb { background: var(--soft-pressed); box-shadow: none; }

/* A slider with its value beside it. */
.slider { display: flex; align-items: center; gap: 14px; }
.slider input[type="range"] {
  flex: 1;
  height: 20px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  --fill: 50%;
}
.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--fill), var(--soft-pressed) var(--fill));
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: transform 160ms var(--ease-spring);
}
.slider input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.slider-value { min-width: 58px; text-align: right; color: var(--text2); font-size: 13px; font-variant-numeric: tabular-nums; }

/* How a test went. */
.test-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.result { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text3); min-width: 0; animation: fade-in var(--dur) var(--ease); }
.result:empty { display: none; }
.result .icon { width: 15px; height: 15px; }
.result.ok { color: color-mix(in srgb, var(--added) 90%, var(--text)); }
.result.bad { color: var(--danger); }
.result .star-loader { width: 14px; height: 14px; }
.result { flex-wrap: wrap; }
.result-details { color: var(--text3); }
.result-details summary { cursor: pointer; user-select: none; }
.result-details .said { display: block; margin-top: 4px; max-width: 460px; font-family: var(--font-mono); font-size: var(--ui-meta);
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }

/* ---- Settings: its frame and pages are css/settings.css ---------------------- */

/* ---- Activity: a list of calls to a model and what each cost (Spending) ------ */
.activity-total { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text3); }
.activity-total .spent { font-size: 20px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.activity-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.activity-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto auto 62px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--text2);
  animation: rise-in var(--dur) var(--ease-out) both;
}
.activity-row + .activity-row { border-top: 1px solid var(--border); }
.activity-row:hover { background: var(--surface-hover); }
.activity-row .state { width: 14px; height: 14px; color: var(--tile-teal); }
.activity-row.failed .state { color: var(--danger); }
.activity-row .what { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.activity-row .kind { color: var(--text); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row .where, .activity-row .detail { color: var(--text3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row .detail { color: var(--danger); }
.activity-row .tokens, .activity-row .cost, .activity-row .when { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text3); }
.activity-row .cost { color: var(--text2); }
.activity-row .when { text-align: right; }
.settings-page .empty-note { padding: 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--text3); font-size: 13px; text-align: center; }

/* ---- the New Chat picture ---------------------------------------------------- */
/* Four across, in groups (core/scenes.py CATEGORIES). */
.scene-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scene-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.scene-card:hover { background: var(--card-hover); border-color: var(--border-strong); }
.scene-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.scene-card .thumb { position: relative; display: block; aspect-ratio: 3 / 2; margin-bottom: 5px; }
.scene-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Off: an empty frame where the picture would be. */
.scene-card .thumb-off {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text3);
}
.scene-card .thumb-off .icon { width: 22px; height: 22px; }
.scene-card .label { font-size: 13.5px; font-weight: 600; color: var(--text); padding: 0 2px; }
.scene-options { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.scene-card .detail { font-size: 12px; color: var(--text3); padding: 0 2px; min-height: 1.3em; }

/* ---- the prompt library ---------------------------------------------------- */
.dialog-body.library-body { flex-direction: row; gap: 18px; padding-top: 6px; }
.library-side { width: 220px; flex: none; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.library-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.library-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.library-row:hover, .library-row:focus-visible { background: var(--surface-hover); outline: none; }
.library-row.on { background: var(--selection-strong); }
.library-row .text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; }
.library-row .label { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; font-weight: 550; color: var(--text); }
.library-row .label > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-row .kind { flex: none; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; color: var(--text2); background: var(--surface-hover); }
.library-row .detail { font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-row .ibtn { opacity: 0; flex: none; }
.library-row:hover .ibtn, .library-row:focus-within .ibtn, .library-row.on .ibtn { opacity: 1; }
.library-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.library-editor { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }
.library-editor > * { flex: none; }
.library-editor > .form-hint { margin-top: -8px; }
.library-editor > .form-row.grow { flex: 1; min-height: 0; }
.library-editor .form-row.grow textarea { flex: 1; }
.library-blanks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: -6px; }
.library-blanks .blank {
  padding: 2px 8px; border-radius: 999px; font-size: 12px;
  color: var(--accent-ink); background: var(--accent-wash);
}
.library-body .empty .btn { margin-top: 12px; }
/* Filling in a prompt's blanks (js/prompts.js). */
.prompt-preview {
  max-height: 220px; overflow-y: auto; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text2);
}
.prompt-preview mark { border-radius: 4px; padding: 0 3px; color: var(--accent-ink); background: var(--accent-wash); }
.prompt-preview mark.empty { color: var(--text3); background: transparent; outline: 1px dashed var(--border-strong); outline-offset: -1px; }
.library-actions { display: flex; justify-content: flex-end; }
.btn.danger-text { color: var(--danger); }
.btn.danger-text:hover:not(:disabled) { background: var(--danger-wash); color: var(--danger); }

/* ---- the coding agent's tiers --------------------------------------------- */
.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--card);
}
.tier-head { display: flex; align-items: center; gap: 9px; }
.tier-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #fff; }
.tier-icon .icon { width: 14px; height: 14px; }
.tier-icon.fast { background: var(--tile-teal); }
.tier-icon.standard { background: var(--tile-navy); }
.tier-icon.deep { background: var(--tile-oxblood); }
.tier-label { font-weight: 650; font-size: 14px; }
.tier-actions { margin-left: auto; display: flex; gap: 6px; }
.tier-desc { color: var(--text3); font-size: 12.5px; }
.tier-model { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 13px; }
.tier-model .mark { width: 16px; height: 16px; display: inline-flex; color: var(--text2); }
.tier-model .text { display: flex; flex-direction: column; min-width: 0; }
.tier-model .name { font-weight: 550; }
.tier-model .meta { color: var(--text3); font-size: 12px; }
.tier-model .warn { flex-basis: 100%; color: var(--accent-ink); font-size: 12px; }
.mono { font-family: var(--font-mono); font-size: 12px; }

/* ---- a code project's folders ---------------------------------------------- */
.folder-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.folder-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  animation: rise-in var(--dur) var(--ease-out) both;
}
.folder-row > .icon { color: var(--tile-amber); }
.folder-row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.folder-row .label { font-weight: 550; font-size: 13.5px; }
.folder-row .detail { color: var(--text3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: left; }
.folder-empty { padding: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--text3); font-size: 12.5px; line-height: 1.5; }
.form-control > div > .btn { align-self: flex-start; }

/* ---- pick one ------------------------------------------------------------------ */
.pick-list { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.pick-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  transition: background var(--dur-fast) var(--ease);
}
.pick-row:hover, .pick-row:focus-visible { background: var(--surface-hover); }
.pick-row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-row .label { font-weight: 550; }
.pick-row .detail { color: var(--text3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .tick { color: var(--accent-ink); }
.pick-row.extra { color: var(--text2); margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; }

/* ---- an answer's details ----------------------------------------------------------- */
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; font-size: 13px; }
.detail-list dt { color: var(--text3); }
.detail-list dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* ---- the palette ------------------------------------------------------------------ */
.palette-layer { place-items: start center; padding-top: 12vh; z-index: 80; }
.palette {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  max-height: min(560px, 72vh);
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--raised);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  animation: dialog-in 220ms var(--ease-out) both;
}
.palette-layer.leaving .palette { animation: dialog-out 140ms var(--ease) both; }
.palette-head {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.palette-lead .icon { width: 18px; height: 18px; color: var(--text3); }
.palette-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  color: var(--text);
}
.palette-input::placeholder { color: var(--text3); }
.palette-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; }
.palette-title {
  padding: 10px 12px 5px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text3);
}
.palette-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.palette-row.hot { background: var(--surface-hover); }
.palette-row .row-tile {
  width: 9px;
  height: 9px;
  margin: 0 4px 0 2px;
  border-radius: 2.5px;
  flex: none;
  align-self: flex-start;
  margin-top: 6px;
  transition: transform var(--dur) var(--ease-spring);
}
.palette-row.hot .row-tile { transform: rotate(45deg); }
.palette-row .row-mark { width: 28px; height: 28px; flex: none; display: grid; place-items: center; color: var(--text2); }
.palette-row .row-mark svg { width: 17px; height: 17px; }
.palette-row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.palette-row .label { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-row .detail { font-size: 12.5px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-row mark { background: var(--accent-wash); color: var(--text); border-radius: 4px; padding: 0 2px; }
.palette-row .label mark { font-weight: 650; }
.palette-row .side { color: var(--text3); font-size: 12px; white-space: nowrap; }
.palette-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px; color: var(--text3); }
.palette-empty .icon { width: 22px; height: 22px; }
.palette-foot {
  display: flex;
  gap: 18px;
  padding: 9px 18px;
  border-top: 1px solid var(--border);
  color: var(--text3);
  font-size: 12px;
  flex: none;
}
.palette-foot kbd { height: 18px; padding: 0 5px; margin-right: 3px; font-size: 10.5px; }

/* ---- the model menu --------------------------------------------------------------- */
/* A few panels in one window (js/models.js): the root, which never scrolls,
   and the models and the saved setups one step away. The root sets the
   height; the others lie over it at that height, so moving between them
   slides transform and opacity only and nothing is laid out again. */
.popover.model-popover { padding: 0; max-width: 380px; display: flex; flex-direction: column; }
/* Its panels pad themselves, in Compact too (compact.css pads every popover),
   so the strip runs edge to edge as on every other popover. */
html.ui-compact .popover.model-popover { padding: 0; }
.model-picker { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; outline: none; }
.picker-panel { display: flex; flex-direction: column; min-height: 0; }
.picker-panel[hidden] { display: none; }
/* In a window too small for it, the root scrolls rather than run off the top. */
.picker-root { flex: 1; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.picker-root.away { visibility: hidden; }
/* Over the root, on the window's own colour, so a panel sliding in covers it. */
.picker-panel:not(.picker-root) { position: absolute; inset: 0; background: var(--raised); }
.picker-sep { flex: none; height: 1px; margin: 4px; background: var(--border); }
/* A mosaic's menu is its models alone, at a height of their own. */
.model-picker.plain { flex: none; height: min(460px, 70vh); }
.model-picker.plain > .picker-panel { position: relative; inset: auto; flex: 1; }

/* Who answers, ticked, with Smart's two controls under it. */
.picker-now { display: flex; flex-direction: column; padding-bottom: 4px; }
.picker-current { display: flex; align-items: center; gap: 11px; padding: 6px 10px 6px 8px; }
.picker-current .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.picker-current .name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-current .meta-line { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.picker-current .meta { min-width: 0; font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* "Let Smart pick": a quiet link beside what answers, lit under the pointer. */
.picker-link {
  flex: none; padding: 0; border: 0; background: transparent; color: var(--text2); font: inherit; font-size: 12px;
  font-weight: 550; cursor: pointer; border-radius: 4px; text-decoration: underline; text-decoration-color: var(--border-strong);
  text-underline-offset: 3px; transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}
.picker-link:hover, .picker-link:focus-visible { color: var(--accent-ink); text-decoration-color: currentColor; outline: none; }
.picker-link[hidden] { display: none; }
/* The dot before it is not part of the link: not underlined (an inline block takes no underline). */
.picker-link::before { content: "·"; display: inline-block; margin-right: 8px; color: var(--text3); font-weight: 400; text-decoration: none; }
/* Beside a setup's own limits, in their title's row, it needs no dot. */
.picker-limits-title .picker-link { text-transform: none; letter-spacing: 0; }
.picker-limits-title .picker-link::before { content: none; }
.picker-glyph {
  position: relative; display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: var(--accent-wash); color: var(--accent-ink);
}
.picker-glyph > .icon { width: 15px; height: 15px; }
.picker-glyph.plain { background: var(--surface-hover); color: var(--text2); }
.picker-glyph.model { background: transparent; }
.picker-glyph.model .model-avatar { width: 30px; height: 30px; }
.picker-limits-wrap { padding: 2px 12px 0 49px; }
.picker-limits-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 2px 0 6px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text3);
}
.picker-limits { min-height: 40px; }
/* Loading, held at about the controls' height (two, and the line of what
   Smart uses unless one model answers), so the window barely moves when they come. */
.picker-limits.loading { display: grid; place-items: center; min-height: 160px; }
.picker-limits.loading.short { min-height: 122px; }
.picker-limits > .loader { margin: 8px auto; }
.picker-limits-note { margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--text3); }
.picker-limits-title[hidden], .picker-limits-note[hidden] { display: none; }

/* The ways on, and the mode switch: plain rows, their words lined up with
   the choice's and the controls' above them. */
.picker-nav, .picker-switch, .picker-back {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 12px 7px 49px; border: 0; border-radius: 9px;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.picker-nav[hidden] { display: none; }
.picker-nav:hover, .picker-switch:hover, .picker-back:hover,
.picker-nav:focus-visible, .picker-switch:focus-visible, .picker-back:focus-visible { background: var(--surface-hover); outline: none; }
.picker-nav .text, .picker-switch .text, .picker-back .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.picker-nav .name, .picker-switch .name { font-size: 13.5px; font-weight: 550; }
.picker-nav .meta, .picker-switch .meta, .picker-back .meta {
  font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picker-nav .chev { flex: none; width: 15px; height: 15px; color: var(--text3); transition: transform var(--dur-fast) var(--ease); }
.picker-nav:hover .chev, .picker-nav:focus-visible .chev { transform: translateX(2px); color: var(--text2); }
.picker-switch .name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* What the mode reaches: every chat, or this one when Chat settings gave it its own. */
.picker-scope {
  flex: none; padding: 0 7px; border: 1px solid var(--border); border-radius: 999px; font-size: 11px; line-height: 17px;
  font-weight: 550; color: var(--text3);
}
/* The switch itself, drawn as Settings draws one (.check .box). */
.picker-switch .box {
  position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong);
  transition: background var(--dur) var(--ease);
}
.picker-switch .box::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform var(--dur) var(--ease-spring);
}
.picker-switch[aria-checked="true"] .box { background: var(--accent); }
.picker-switch[aria-checked="true"] .box::after { transform: translateX(14px); }

/* Manual mode's controls: a row each, its name and its value, which reads
   quietly on Auto and plainly once set by hand. */
.picker-manual { display: flex; flex-direction: column; }
.picker-manual[hidden], .picker-now[hidden], .picker-sep[hidden] { display: none; }
.picker-control {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px 6px 12px; border: 0;
  border-radius: 9px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.picker-control:hover, .picker-control:focus-visible { background: var(--surface-hover); outline: none; }
.picker-control .name { flex: none; font-size: 13.5px; font-weight: 550; }
.picker-control .value {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 13px;
  font-weight: 550; color: var(--text); overflow: hidden; white-space: nowrap;
}
.picker-control .value > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.picker-control .value > .more { flex: none; color: var(--text3); font-weight: 500; }
.picker-control .value > .icon { flex: none; width: 14px; height: 14px; color: var(--text2); }
.picker-control .value > .model-avatar { width: 18px; height: 18px; border-radius: 5px; }
.picker-control .value > .model-avatar svg { width: 11px; height: 11px; }
.picker-control .value > .model-avatar .initials { font-size: 8px; }
.picker-control.is-auto .value { color: var(--text3); font-weight: 500; }
.picker-control .chev { flex: none; width: 15px; height: 15px; color: var(--text3); transition: transform var(--dur-fast) var(--ease); }
.picker-control:hover .chev, .picker-control:focus-visible .chev { transform: translateX(2px); color: var(--text2); }
.picker-control[aria-disabled="true"] { cursor: default; }
.picker-control[aria-disabled="true"]:hover { background: transparent; }
.picker-control[aria-disabled="true"] .name, .picker-control[aria-disabled="true"] .value { color: var(--text3); }
.picker-control[aria-disabled="true"] .chev { visibility: hidden; }
/* In Manual mode the rows of the root line up at their own left edge. */
.picker-root.manual .picker-nav, .picker-root.manual .picker-switch { padding-left: 12px; }
.picker-manual-intro { margin: 4px 12px 4px; font-size: 12px; line-height: 1.4; color: var(--text3); }
/* A control's choices: each with the line that says what it does, in full. */
.picker-choice .picker-row .meta { white-space: normal; line-height: 1.35; }
.picker-choice .picker-row { align-items: flex-start; }
.picker-choice .picker-row .tick, .picker-choice .picker-row .tick-space { margin-top: 2px; }
/* What Auto works within: Smart's two controls, laid out as under Smart's head. */
.picker-auto-body { padding: 4px 0 0; }
.picker-auto .picker-limits-wrap { padding: 4px 16px 0 18px; }
.picker-auto > .picker-note { margin: 12px 16px 4px 18px; }
/* Auto at the top of Manual mode's models. */
.picker-row.auto .picker-glyph { width: 28px; height: 28px; border-radius: 8px; background: transparent;
  border: 1px solid var(--border); color: var(--text2); }

/* The back row at the top of the models and the saved setups. */
.picker-back { flex: none; margin: 6px 6px 0; width: auto; padding: 7px 10px 7px 6px; }
.picker-back .chev { flex: none; width: 16px; height: 16px; color: var(--text2); transition: transform var(--dur-fast) var(--ease); }
.picker-back:hover .chev { transform: translateX(-2px); }
.picker-back .name { font-size: 13.5px; font-weight: 600; }

.picker-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 6px 12px 2px;
  padding: 0 11px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--text3);
  flex: none;
}
.picker-head .icon { width: 15px; height: 15px; }
.picker-search { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 13.5px; color: var(--text); }
.picker-search::placeholder { color: var(--text3); }
/* Positioned, so a row's offsetTop is its place in the list (js/models.js reveal). */
.picker-list { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 6px; }
.picker-title { padding: 10px 10px 4px; font-size: 11px; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text3); }
.picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 9px;
  border-radius: 9px;
  cursor: pointer;
}
.picker-row.hot { background: var(--surface-hover); }
.picker-row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.picker-row .name { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-row .meta { font-size: 11.5px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-row .badge { color: var(--text3); display: inline-flex; }
.picker-row .badge .icon { width: 14px; height: 14px; }
.picker-row .pin { opacity: 0; width: 24px; height: 24px; }
.picker-row.hot .pin, .picker-row .pin.on { opacity: 1; }
.picker-row .pin.on { color: var(--accent-ink); }
.picker-row .tick { flex: none; width: 16px; height: 16px; color: var(--accent-ink); }
.picker-row .tick-space { flex: none; width: 16px; }
/* Manual mode: the box that adds a model to those picked, drawn as the model browser's. */
.picker-row .row-check {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  padding: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: transparent;
  cursor: pointer;
}
.picker-row .row-check .icon { width: 13px; height: 13px; }
.picker-row .row-check:hover { border-color: var(--accent); }
.picker-row .row-check.shut, .picker-row .row-check.shut:hover { opacity: 0.4; cursor: default; border-color: var(--border-strong); }
.picker-row.on .row-check { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
/* A saved setup: its name and its settings in words, and Edit under the pointer. */
.picker-row.setup { padding: 9px 8px 9px 12px; }
.picker-row .picker-edit { height: 26px; padding: 0 10px; opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
.picker-row.hot .picker-edit, .picker-row .picker-edit:focus-visible { opacity: 1; }
.picker-note { margin: 10px 12px 4px; font-size: 12px; line-height: 1.45; color: var(--text3); }
.picker-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px; color: var(--text3); font-size: 13px; }
.picker-all {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  flex: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.picker-all:hover { background: var(--surface-hover); color: var(--text); }
.picker-all .hint { margin-left: auto; color: var(--text3); font-size: 12px; }

.model-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}
html.light .model-avatar { background: var(--raised); }
.model-avatar svg { width: 16px; height: 16px; }
.model-avatar .initials { font-size: 11px; font-weight: 700; color: var(--text2); }
.model-avatar.large { width: 48px; height: 48px; border-radius: 13px; }
.model-avatar.large svg { width: 26px; height: 26px; }
.model-avatar.large .initials { font-size: 16px; }

/* ---- the model browser ------------------------------------------------------------ */
.dialog-body.browser-body { flex-direction: row; gap: 0; padding: 0; overflow: hidden; border-top: 1px solid var(--border); margin-top: 8px; }
.browser-side { display: flex; flex-direction: column; width: 56%; min-width: 0; border-right: 1px solid var(--border); }
.browser-search { display: flex; align-items: center; gap: 10px; padding: 12px 16px 6px; color: var(--text3); }
.browser-search .field { height: 36px; border-radius: 10px; }
.browser-tabs { display: flex; gap: 2px; padding: 4px 12px 0; border-bottom: 1px solid var(--border); overflow-x: auto;
  overflow-y: hidden; scrollbar-width: none; }
/* The row scrolls sideways when it must, without a scrollbar drawn beside the tabs. */
.browser-tabs::-webkit-scrollbar { display: none; }
.browser-tab {
  position: relative;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text3);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.browser-tab:hover { color: var(--text); }
.browser-tab .tab-count { margin-left: 5px; font-size: 11px; font-weight: 500; color: var(--text3); font-variant-numeric: tabular-nums; }
.browser-tab.on { color: var(--text); }
.browser-tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease-out);
}
.browser-tab.on::after { transform: scaleX(1); }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px 6px; }
.browser-chips { display: flex; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.chip {
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text2);
  font-size: 12px;
  font-weight: 550;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.chip:hover { background: var(--surface-hover); color: var(--text); }
.chip.on { background: var(--accent-wash); border-color: transparent; color: var(--accent-ink); }
.browser-bar .sort { width: 150px; height: 28px; font-size: 12.5px; }
.browser-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; }
.browser-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.browser-row:hover { background: var(--surface-hover); }
.browser-row.focus { background: var(--selection-strong); }
.browser-row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.browser-row .name { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-row .meta { font-size: 12px; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-row .row-tags { display: flex; align-items: center; gap: 6px; }
.browser-row .row-pin { color: var(--accent-ink); display: inline-flex; }
.browser-row .row-pin .icon { width: 13px; height: 13px; }
.browser-row .tick { color: var(--accent-ink); }
/* A window with nothing to do at its foot (the model browser) has none. */
.dialog-foot[hidden] { display: none; }
.browser-foot { padding: 8px 18px; border-top: 1px solid var(--border); color: var(--text3); font-size: 12px; }

.browser-detail { flex: 1; min-width: 0; overflow-y: auto; padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; }
.browser-detail > * { animation: rise-in var(--dur) var(--ease-out) both; }
.detail-head { display: flex; align-items: center; gap: 14px; }
.detail-title { min-width: 0; }
.detail-title h3 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 560; letter-spacing: -0.01em; }
.detail-id { color: var(--text3); font-size: 12px; font-family: var(--font-mono); margin-top: 2px; word-break: break-all; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-badges:empty { display: none; }
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--border);
}
/* Cells of one table parted by hairlines; the workbench's own .fact cards
   (workbench.css) must not round and frame them. */
.detail-facts .fact { display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 12px;
  border: 0; border-radius: 0; background: var(--raised); }
.detail-facts .label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text3); }
.detail-facts .value { font-size: 13px; color: var(--text); }
.detail-description { color: var(--text2); font-size: 13.5px; line-height: 1.6; white-space: pre-line; }
.detail-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 6px; }
.detail-actions .btn.pinned { color: var(--accent-ink); }
.detail-actions .in-use { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 10px; color: var(--accent-ink); font-weight: 550; }


/* ---- the Code craft's dialogs: rules, and a screenshot full size ---------- */
.dialog .rules-text { min-height: 180px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; resize: vertical; }
.dialog .rules-count { font-size: var(--ui-small); color: var(--text3); margin-right: 6px; font-variant-numeric: tabular-nums; }
.dialog .rules-count.over { color: var(--danger); }
.dialog .rules-files { display: grid; gap: 2px; margin-top: 4px; }
.dialog .rules-files .form-section-title { margin-bottom: 4px; }
.dialog .rules-file {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 6px 8px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--text2); text-align: left; cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.dialog .rules-file:hover { background: var(--surface-hover); color: var(--text); }
.dialog .rules-file .icon { width: 14px; height: 14px; flex: none; }
.dialog .rules-file .name { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog .rules-file .meta { font-size: var(--ui-small); color: var(--text3); }
.dialog .shot-full {
  border: 1px solid var(--border); border-radius: var(--radius-md); overflow: auto; background: var(--card);
  max-height: 60vh;
}
.dialog .shot-full img { display: block; width: 100%; height: auto; }
.dialog .shot-url { display: flex; align-items: center; gap: 6px; color: var(--text3); font-size: var(--ui-small); font-family: var(--font-mono); }
.dialog .shot-url .icon { width: 13px; height: 13px; flex: none; }
.dialog .shot-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog .shot-console {
  margin: 0; padding: 8px 10px; max-height: 160px; overflow: auto;
  border: 1px solid var(--code-border); border-radius: var(--radius-control);
  background: var(--code-bg); color: var(--code-fg); font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap;
}
/* Connection's steps to a key: the guide's, a touch tighter. */
.settings-page .connection-steps { margin: 0; gap: 4px; font-size: 13px; }

/* -- Settings › Ask from anywhere ------------------------------------------ */
.shortcut-row { display: flex; align-items: center; gap: 8px; }
.shortcut-field { min-width: 180px; justify-content: center; font-weight: 600; letter-spacing: 0.01em; }
.shortcut-field.listening { border-color: var(--accent); color: var(--accent-ink); }
.has-problem .form-hint { color: var(--danger); }
.anywhere-command {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: 12.5px / 1.4 var(--font-mono);
  overflow-x: auto;
  white-space: nowrap;
}
.anywhere-try, .notify-try { display: flex; }
/* Settings › Chats › Working: the reminders waiting, each with Cancel. */
.work-page .reminder-list { display: flex; flex-direction: column; gap: 6px; }
.work-page .reminder-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-md); }
.work-page .reminder-main { flex: 1; min-width: 0; }
.work-page .reminder-note { color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.work-page .reminder-when { margin-top: 2px; color: var(--text3); font-size: 12px; }

/* Settings › Your own models (js/endpoints.js). */
.endpoint-list { display: flex; flex-direction: column; gap: 6px; }
.endpoint-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 10px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer;
  animation: rise-in 360ms var(--ease-out) both;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.endpoint-row:hover, .endpoint-row:focus-visible { border-color: var(--border-strong); outline: none; }
.endpoint-row .glyph { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; color: #fff; }
.endpoint-row .glyph .icon { width: 17px; height: 17px; }
.endpoint-row .text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.endpoint-row .name { font-weight: 600; font-size: 13.5px; }
.endpoint-row .sub { display: flex; gap: 8px; min-width: 0; font-size: 12px; color: var(--text3); }
.endpoint-row .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono); font-size: 11.5px; }
.endpoint-row .state { flex: none; }
.endpoint-row.problem .state { color: var(--accent-ink); flex: 1 1 auto; white-space: normal; }
.endpoint-row.off { opacity: 0.6; }
.endpoint-row .ibtn { opacity: 0; }
.endpoint-row:hover .ibtn, .endpoint-row:focus-within .ibtn { opacity: 1; }
.endpoint-found:empty { display: none; }
.endpoint-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.endpoint-form {
  display: flex; flex-direction: column; gap: 14px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  animation: rise-in 280ms var(--ease-out) both;
}
.endpoint-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.endpoint-form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.endpoint-note { margin-top: 4px; }

/* Import chats (js/imports.js). */
.import-steps { display: flex; flex-direction: column; gap: 6px; }
.import-step {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.import-mark { flex: none; width: 64px; font-weight: 600; font-size: 13px; }
.import-path { color: var(--text2); font-size: 13px; }
.import-state { min-height: 20px; }
.import-state:empty { display: none; }
