/* =========================================================================
   Theme overrides — light mode + new shell features (collapse, star, settings)
   Loaded after colors_and_type.css / app.css / tools.css so these win.
   ========================================================================= */

/* ---------- Light mode tokens ---------- */
html.light {
  --color-bg:              #f5f3f7;
  --color-background-dark: #f5f3f7;
  --color-surface:         #ffffff;
  --color-surface-dark:    #ffffff;
  --color-surface-raised:  #fafafa;
  --color-border:          #e2dfeb;
  --color-border-dark:     #e2dfeb;

  --text-hi:    #0a070e;
  --text-md:    #1f1830;
  --text-lo:    #4b5563;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
}
html.light body { color: var(--text-hi); }
html.light body::before, html.light body::after { opacity: 0.08; }

html.light .sidebar { background: rgba(255,255,255,0.75); }
html.light .header  { background: rgba(255,255,255,0.7); }
html.light .tool-list { background: rgba(0,0,0,0.015); }
html.light .note-meta-bar,
html.light .json-status { background: rgba(0,0,0,0.02); }
html.light .diff-side-head { background: rgba(0,0,0,0.04); }
html.light .pwd-vault { background: rgba(0,0,0,0.02); }

html.light .nav-item:hover { background: rgba(0,0,0,0.04); color: var(--text-hi); }
html.light .nav-item.active {
  background: rgba(var(--primary-rgb, 127,13,242), 0.08);
}
html.light .sidebar-foot .iconbtn:hover { background: rgba(0,0,0,0.04); }
html.light ::-webkit-scrollbar-thumb { background: #d4d0e0; }

html.light .pwd-output {
  background: linear-gradient(135deg,
    rgba(var(--primary-rgb, 127,13,242), 0.06),
    rgba(255,255,255,0.95) 60%,
    rgba(var(--primary-rgb, 127,13,242), 0.04));
}

html.light .md-view .md-inline-code,
html.light .md-view .md-code,
html.light .json-tree,
html.light .note-textarea,
html.light .json-raw,
html.light .diff-input { background: var(--color-surface); }

html.light .lh-segmented button.is-active { color: #fff; }

html.light .us-overlay { background: rgba(20, 14, 30, 0.35); }

/* Focus ring works in both modes */
html.light .lh-input:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 127,13,242), 0.15);
}

/* ---------- Boot loader ---------- */
.boot-loader {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg);
  z-index: 999;
}
.boot-loader .brand-tile {
  width: 56px; height: 56px;
  animation: boot-pulse 1.4s ease-in-out infinite;
}
.boot-loader .brand-tile .material-symbols-outlined { font-size: 32px; }
@keyframes boot-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ---------- Sidebar collapse ---------- */
.app.is-collapsed { grid-template-columns: 64px 1fr; }
.sidebar-brand .brand-tile {
  border: 0; cursor: pointer; padding: 0;
  font-family: inherit; transition: transform 150ms;
}
.sidebar-brand .brand-tile:hover { transform: scale(1.05); }

.app.is-collapsed .sidebar-brand { justify-content: center; padding: 18px 0; }
.sidebar-collapse-btn {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.sidebar-collapse-btn:hover { color: var(--text-hi); background: rgba(127,13,242,0.08); }
.sidebar-collapse-btn .material-symbols-outlined { font-size: 18px; }

.sidebar-icon-btn {
  width: 40px; height: 40px;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--text-lo);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  transition: all 120ms;
}
.sidebar-icon-btn:hover {
  color: var(--color-primary);
  border-color: rgba(var(--primary-rgb, 127,13,242), 0.4);
  background: rgba(var(--primary-rgb, 127,13,242), 0.08);
}
.sidebar-icon-btn .material-symbols-outlined { font-size: 18px; }

.app.is-collapsed .sidebar-scroll { padding: 0 8px 12px; align-items: stretch; }
.app.is-collapsed .nav-section-label {
  padding: 12px 0 4px;
  display: flex; justify-content: center;
  color: var(--text-faint);
}
.app.is-collapsed .nav-section-label .material-symbols-outlined { font-size: 12px; }
.nav-section-dot {
  width: 16px; height: 1px;
  background: var(--color-border);
  display: block;
}
.nav-section-label { display: flex; align-items: center; gap: 6px; }
.nav-section-label .material-symbols-outlined { font-size: 13px; color: var(--color-primary); }

/* ---------- Collapsible / customizable sections ---------- */
.nav-section-label.is-toggle { padding: 12px 4px 4px; gap: 4px; }
.nav-section-toggle {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px; border-radius: 8px;
  transition: color 120ms, background 120ms;
}
.nav-section-toggle:hover { color: var(--text-hi); background: rgba(255,255,255,0.03); }
.nav-section-chevron {
  font-size: 15px !important; color: var(--text-faint) !important;
  transition: transform 160ms ease;
}
.nav-section-chevron.is-open { transform: rotate(90deg); }
.nav-section-name { flex: 1; text-align: left; }
.nav-section-meta {
  font-size: 10px; font-weight: 600; letter-spacing: 0;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* Drag handles (customize mode) */
.nav-drag-handle {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  cursor: grab;
  flex-shrink: 0;
}
.nav-drag-handle .material-symbols-outlined { font-size: 16px; }
.nav-section-label.is-customizing { cursor: grab; }
.nav-section-label.is-customizing:active,
.nav-item-wrap.is-customizing:active { cursor: grabbing; }
.nav-item-wrap.is-customizing { padding-left: 0; }
.nav-item-wrap.is-customizing .nav-item { cursor: grab; }

/* Drop indicators */
.nav-item-wrap.is-drop-target { box-shadow: 0 -2px 0 0 var(--color-primary); border-radius: 0; }
.nav-section-label.is-drop-target { box-shadow: 0 -2px 0 0 var(--color-primary); }

/* Customize toggle row */
.sidebar-customize-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--color-border);
}
.sidebar-customize-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 8px 12px; border-radius: 9px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer;
  transition: all 120ms;
}
.sidebar-customize-btn:hover { color: var(--text-hi); background: rgba(255,255,255,0.04); }
.sidebar-customize-btn .material-symbols-outlined { font-size: 16px; }
.sidebar-customize-btn.is-active {
  color: var(--color-primary);
  background: rgba(var(--primary-rgb, 127,13,242), 0.1);
  border-color: rgba(var(--primary-rgb, 127,13,242), 0.25);
}
.sidebar-reset-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--color-border);
  border-radius: 9px; color: var(--text-muted); cursor: pointer;
  transition: all 120ms;
}
.sidebar-reset-btn:hover { color: var(--text-hi); border-color: rgba(255,255,255,0.2); }
.sidebar-reset-btn .material-symbols-outlined { font-size: 16px; }

/* Remove (−) button on items in customize mode */
.nav-remove {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--text-faint); cursor: pointer; transition: all 120ms;
}
.nav-remove:hover { color: var(--color-error); background: rgba(248,113,113,0.1); }
.nav-remove .material-symbols-outlined { font-size: 17px; }
.nav-item-wrap.is-customizing .nav-item { padding-right: 32px; }

/* Section action buttons (rename / delete custom sections) */
.nav-section-act {
  width: 24px; height: 24px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: 6px;
  color: var(--text-faint); cursor: pointer; transition: all 120ms;
}
.nav-section-act:hover { color: var(--text-hi); background: rgba(255,255,255,0.05); }
.nav-section-act.is-danger:hover { color: var(--color-error); background: rgba(248,113,113,0.1); }
.nav-section-act .material-symbols-outlined { font-size: 15px; }

.nav-section-empty {
  font-size: 11px; color: var(--text-faint);
  padding: 8px 12px; margin: 2px 0;
  border: 1px dashed var(--color-border); border-radius: 9px;
  text-align: center;
}
.nav-section-empty.is-drop-target {
  border-color: rgba(var(--primary-rgb, 127,13,242), 0.6);
  background: rgba(var(--primary-rgb, 127,13,242), 0.08);
  color: var(--color-primary);
}

/* Customize panel (add section + removed items) */
.sidebar-customize-panel { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.customize-add-section {
  display: flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 12px; font-weight: 500;
  padding: 9px 12px; border-radius: 9px;
  background: transparent;
  border: 1px dashed var(--color-border);
  color: var(--text-md); cursor: pointer; transition: all 120ms;
}
.customize-add-section:hover {
  color: var(--color-primary);
  border-color: rgba(var(--primary-rgb, 127,13,242), 0.4);
  background: rgba(var(--primary-rgb, 127,13,242), 0.06);
}
.customize-add-section .material-symbols-outlined { font-size: 17px; }

.customize-hidden {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 4px;
}
.customize-hidden-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-faint); padding: 6px 8px 4px;
}
.customize-hidden-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 9px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer; transition: all 120ms;
  font-family: inherit; font-size: 13px; text-align: left;
}
.customize-hidden-item:hover { color: var(--text-hi); background: rgba(255,255,255,0.04); }
.customize-hidden-item > .material-symbols-outlined:first-child { font-size: 18px; }
.customize-hidden-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customize-hidden-add { font-size: 17px !important; color: var(--text-faint) !important; }
.customize-hidden-item:hover .customize-hidden-add { color: var(--color-primary) !important; }

.app.is-collapsed .nav-item {
  justify-content: center; padding: 9px 0;
}
.app.is-collapsed .nav-item .material-symbols-outlined { font-size: 20px; }

.sidebar-foot-collapsed {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 8px 12px;
}
.sidebar-foot-collapsed .sidebar-icon-btn { margin: 0; }

/* ---------- Star button ---------- */
.nav-item-wrap {
  position: relative;
  display: flex; align-items: center;
}
.nav-item-wrap .nav-item { flex: 1; }
.nav-star {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  border: 0; background: transparent; cursor: pointer;
  border-radius: 6px;
  color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 120ms, color 120ms;
}
.nav-item-wrap:hover .nav-star,
.nav-star.is-starred { opacity: 1; }
.nav-star.is-starred { color: #fbbf24; }
.nav-star:hover { color: #fbbf24; background: rgba(251,191,36,0.1); }
.nav-star .material-symbols-outlined {
  font-size: 16px;
  font-variation-settings: "FILL" 1, "wght" 500;
}
.nav-star:not(.is-starred) .material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400;
}

/* Hide nav-count when star is showing on hover, to avoid collision */
.nav-item-wrap:hover .nav-count { opacity: 0; }
.nav-count { transition: opacity 120ms; }

/* When a nav item is starred, the star is always visible — reserve space on
   the right so the star and the count don't overlap. */
.nav-item-wrap:has(.nav-star.is-starred) .nav-item { padding-right: 32px; }

/* ---------- Settings modal ---------- */
.settings-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 250;
  animation: fadein 150ms ease-out;
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }

.settings-modal {
  width: min(680px, 100%);
  max-height: 86vh;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5),
              0 0 0 1px rgba(var(--primary-rgb, 127,13,242), 0.15);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.settings-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}
.settings-head h2 {
  margin: 0; font-size: 16px; font-weight: 700;
  color: var(--text-hi); letter-spacing: -0.01em;
}
.settings-head .material-symbols-outlined { color: var(--color-primary); font-size: 20px; }

.settings-body {
  flex: 1; overflow-y: auto; padding: 8px 20px 20px;
}
.settings-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}
.settings-section:last-child { border-bottom: 0; }
.settings-section header h3 {
  margin: 0; font-size: 13px; font-weight: 700;
  color: var(--text-hi); letter-spacing: -0.005em;
}
.settings-section header p {
  margin: 2px 0 14px; font-size: 12px; color: var(--text-muted);
}
.settings-section-body { display: flex; flex-direction: column; gap: 14px; }

/* Mode picker */
.settings-mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-mode {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 12px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer; font-family: inherit; color: var(--text-md);
}
.settings-mode:hover { border-color: rgba(var(--primary-rgb, 127,13,242), 0.4); }
.settings-mode.is-active {
  border-color: var(--color-primary);
  background: rgba(var(--primary-rgb, 127,13,242), 0.05);
  color: var(--text-hi);
}
.settings-mode > .material-symbols-outlined { font-size: 18px; align-self: flex-start; }
.settings-mode > span { font-size: 13px; font-weight: 600; align-self: flex-start; }

.settings-mode-preview {
  height: 56px; border-radius: 8px;
  display: flex; align-items: center; padding: 8px; gap: 6px;
  position: relative; overflow: hidden;
}
.settings-mode-preview.is-dark { background: #0a070e; border: 1px solid #2d1b40; }
.settings-mode-preview.is-light { background: #f5f3f7; border: 1px solid #e2dfeb; }
.settings-mode-preview .dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--color-primary); flex-shrink: 0;
}
.settings-mode-preview .bar {
  height: 4px; flex: 1; border-radius: 2px;
  background: rgba(255,255,255,0.15);
}
.settings-mode-preview.is-light .bar { background: rgba(0,0,0,0.1); }
.settings-mode-preview .bar2 {
  height: 4px; width: 30px; border-radius: 2px;
  background: rgba(255,255,255,0.08);
}
.settings-mode-preview.is-light .bar2 { background: rgba(0,0,0,0.06); }

/* Swatches */
.settings-swatches {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.settings-swatch {
  width: 38px; height: 38px;
  border-radius: 12px;
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; position: relative;
  transition: transform 120ms;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.settings-swatch:hover { transform: scale(1.08); }
.settings-swatch.is-active {
  box-shadow: 0 0 0 3px var(--color-bg), 0 0 0 5px currentColor, 0 4px 14px rgba(0,0,0,0.25);
}
.settings-swatch .material-symbols-outlined { font-size: 20px; }
.settings-swatch.is-custom {
  background: conic-gradient(from 0deg, #ef4444, #f59e0b, #84cc16, #06b6d4, #8b5cf6, #ec4899, #ef4444);
  position: relative; overflow: hidden;
}
.settings-swatch.is-custom input[type="color"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.settings-color-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--text-lo);
}
.settings-color-meta code {
  font-family: ui-monospace, Menlo, monospace;
  padding: 3px 8px; background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: 6px; color: var(--text-md);
}

/* Branding */
.settings-row {
  display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 12px;
}
.settings-row > label {
  font-size: 11px; font-weight: 700;
  color: var(--text-lo); text-transform: uppercase; letter-spacing: 0.06em;
}
.settings-split-control {
  display: flex; flex-direction: column; gap: 8px;
}
.settings-split-control input[type="range"] { width: 100%; }
.settings-split-preview {
  font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
  padding: 8px 12px;
  background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: 8px; min-height: 36px;
  display: flex; align-items: center;
}

.settings-icons {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.settings-icon-btn {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  cursor: pointer; color: var(--text-lo);
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.settings-icon-btn:hover { color: var(--text-hi); border-color: rgba(var(--primary-rgb, 127,13,242), 0.4); }
.settings-icon-btn.is-active {
  background: rgba(var(--primary-rgb, 127,13,242), 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.settings-icon-btn .material-symbols-outlined { font-size: 18px; }

.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Tools manager — compact, searchable, scalable to 100+ tools */
.tools-mgr { display: flex; flex-direction: column; gap: 12px; }

.tools-mgr-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.tools-mgr-rerun {
  white-space: nowrap;
}
.tools-mgr-rerun .material-symbols-outlined { font-size: 16px; }
.tools-mgr-search {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: border-color 120ms;
}
.tools-mgr-search:focus-within {
  border-color: var(--color-primary);
}
.tools-mgr-search > .material-symbols-outlined { font-size: 16px; color: var(--text-muted); }
.tools-mgr-search input {
  flex: 1; background: transparent; border: 0; outline: none;
  font-family: inherit; font-size: 13px; color: var(--text-hi);
  min-width: 0;
}
.tools-mgr-search input::placeholder { color: var(--text-faint); }
.tools-mgr-clear {
  background: transparent; border: 0; cursor: pointer;
  padding: 2px; border-radius: 4px;
  color: var(--text-muted);
  display: flex;
}
.tools-mgr-clear:hover { color: var(--text-hi); background: rgba(0,0,0,0.1); }
.tools-mgr-clear .material-symbols-outlined { font-size: 14px; }
.tools-mgr-summary {
  font-size: 12px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tools-mgr-summary strong { color: var(--color-primary); font-weight: 700; }

.tools-mgr-list { display: flex; flex-direction: column; gap: 14px; }

.tools-mgr-group { display: flex; flex-direction: column; gap: 4px; }
.tools-mgr-group-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0 2px 4px;
}

.tools-mgr-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; color: var(--text-muted);
  font-size: 12px;
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: 10px;
}
.tools-mgr-empty .material-symbols-outlined { font-size: 18px; }

.tool-row-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 120ms, background 120ms;
}
.tool-row-card:hover { border-color: rgba(var(--primary-rgb, 127,13,242), 0.3); }
.tool-row-card.is-expanded {
  border-color: rgba(var(--primary-rgb, 127,13,242), 0.4);
  background: rgba(var(--primary-rgb, 127,13,242), 0.03);
}
.tool-row-card.is-off { opacity: 0.65; }
.tool-row-card.is-off:hover { opacity: 1; }

.tool-row-main {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
}

.tool-row-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-lo);
  flex-shrink: 0;
}
.tool-row-card.is-on .tool-row-icon {
  background: rgba(var(--primary-rgb, 127,13,242), 0.1);
  border-color: rgba(var(--primary-rgb, 127,13,242), 0.25);
  color: var(--color-primary);
}
.tool-row-icon .material-symbols-outlined { font-size: 16px; }

.tool-row-meta { flex: 1; min-width: 0; }
.tool-row-label {
  font-size: 13px; font-weight: 600; color: var(--text-hi);
}
.tool-row-desc {
  font-size: 11px; color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tool-row-toggle {
  width: 32px; height: 18px;
  border-radius: 999px;
  background: var(--color-border);
  position: relative; flex-shrink: 0;
  transition: background 150ms;
  cursor: pointer;
}
.tool-row-toggle.is-on { background: var(--color-primary); }
.tool-row-toggle-dot {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 150ms;
}
.tool-row-toggle.is-on .tool-row-toggle-dot { transform: translateX(14px); }

.tool-row-chevron {
  font-size: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 150ms;
}
.tool-row-card.is-expanded .tool-row-chevron { color: var(--color-primary); }

.tool-row-detail {
  border-top: 1px solid var(--color-border);
  padding: 12px;
  background: rgba(var(--primary-rgb, 127,13,242), 0.03);
}
.tool-row-detail-empty {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 4px;
  color: var(--text-muted);
}
.tool-row-detail-empty > .material-symbols-outlined {
  font-size: 22px; color: var(--text-faint);
  flex-shrink: 0;
}
.tool-row-detail-empty .title {
  font-size: 12px; font-weight: 600;
  color: var(--text-md);
}
.tool-row-detail-empty .sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Hide the old big-tile design (kept for back-compat, no longer used) ---- */
.settings-tool-list { display: none; }

.header-kbd {
  font-size: 10px; padding: 1px 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border); border-radius: 4px;
  color: var(--text-muted);
  font-family: ui-monospace, Menlo, monospace;
  margin-left: 4px;
}
html.light .header-kbd { background: rgba(0,0,0,0.05); }

/* Use --primary-rgb in existing rules where rgba(127,13,242,...) was hardcoded.
   We override the most important cases here so theme color cascades. */
.brand-tile { background: var(--color-primary); box-shadow: 0 8px 24px rgba(var(--primary-rgb, 127,13,242), 0.25); }
.lh-btn.primary { box-shadow: 0 6px 20px rgba(var(--primary-rgb, 127,13,242), 0.3); }
