/* public/tools/settings-homee.css - Settings > Homee (2026-11-08, Richard approved the
   mockup). Tokens only, both themes. The page REUSES the AI connections layout
   (settings-ai.css: .ai-head, .ai-status, .ai-door, .ai-pane, .ai-bar, .ai-kpis,
   .ai-list, .ai-row-main, .ai-card, .ai-savebar, .ai-empty), loaded on the same
   Settings page, so the two tabs look alike by construction. This file only lays
   out what Homee has and AI connections does not. */
.ds-kpi-value small { font-size: var(--text-sm); font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.ds-kpi-value.hm-good { color: var(--success-ink); }
.ds-kpi-value.hm-warn { color: var(--warn-ink); }
.hm-title { display: flex; gap: var(--s-3); align-items: center; }
/* The header's Homee picture: the whole mascot, no tile or circle behind it (Richard 2026-11-08). */
.hm-set-mascot { flex: none; display: block; width: 36px; height: 36px; max-width: none; object-fit: contain; }
.hm-door { flex-wrap: wrap; }
.hm-door-text { flex: 1; min-width: 220px; color: var(--ink-2); }
.hm-door-text strong { color: var(--ink); }
.hm-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.hm-live { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); color: var(--ink-3); font-size: var(--text-sm); }
.hm-editor { min-height: 240px; line-height: 1.6; }
.hm-model { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4) var(--s-5); margin-top: var(--s-5); }
.hm-plain { margin: 0; color: var(--ink-2); line-height: 1.55; }
.hm-locked { margin-top: var(--s-5); border: 1px dashed var(--border); border-radius: var(--r-md); background: var(--surface-2); padding: var(--s-3) var(--s-4); }
.hm-locked-head { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; }
.hm-locked-head svg { width: 16px; height: 16px; color: var(--ink-3); }
.hm-locked > p { margin: var(--s-1) 0 var(--s-3); color: var(--ink-3); font-size: var(--text-sm); }
.hm-pre { margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border-subtle); font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.6; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.hm-result { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin: var(--s-3) 0; color: var(--ink-2); }
.hm-note { color: var(--ink-2); margin-top: var(--s-1); font-size: var(--text-sm); }
.hm-diff { margin: 0 var(--s-4) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.hm-diff-head { display: flex; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-2) var(--s-4); background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 600; font-size: var(--text-sm); }
.hm-diff-head span + span { color: var(--ink-3); font-weight: 500; }
.hm-dl { display: grid; grid-template-columns: 28px minmax(0, 1fr); padding: 2px var(--s-4) 2px 0; font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.6; color: var(--ink-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.hm-dl b { font-weight: 500; text-align: center; }
.hm-dl.is-add { background: var(--success-soft); color: var(--ink); }
.hm-dl.is-add b { color: var(--success-ink); }
.hm-dl.is-del { background: var(--danger-soft); color: var(--ink); }
.hm-dl.is-del b { color: var(--danger-ink); }
.hm-run { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); margin-bottom: var(--s-4); }
.hm-run p { margin: 0; color: var(--ink-2); }
.hm-answer { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.hm-answer.is-missing { color: var(--ink-3); font-style: italic; }
.hm-question { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.hm-sw-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-1) var(--s-3); align-items: start; padding: var(--s-3) 0; min-height: 44px; }
.hm-sw-row + .hm-sw-row { border-top: 1px solid var(--border-subtle); }
.hm-sw-row .ds-switch { margin-top: 2px; }
/* The 38 x 22 switch keeps its look; its tap area is 44 x 44. */
.hm-sw-row .ds-switch::before { content: ""; position: absolute; inset: -11px -3px; }
.hm-sw-title { font-weight: 600; }
.hm-sw-help { grid-column: 2; color: var(--ink-3); font-size: var(--text-sm); }
.hm-limits { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4) var(--s-5); margin-top: var(--s-3); }
.hm-limits .ai-money .ds-input { width: 140px; }
.hm-prob { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-1) var(--s-3); align-items: center; padding: var(--s-2) 0; }
.hm-prob + .hm-prob { border-top: 1px solid var(--border-subtle); }
.ai-card + .ai-card.hm-card, .hm-card { margin-top: var(--s-4); }
/* How Homee makes changes: two radio cards (Drafts, Auto) and, under Auto, its switch. */
.hm-modes-block { border-top: 1px solid var(--border-subtle); padding: var(--s-3) 0 var(--s-1); }
.hm-modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-3); margin-top: var(--s-2); }
.ds-radio.hm-mode { position: relative; display: flex; align-items: flex-start; gap: var(--s-3); min-height: 44px; min-width: 0; padding: var(--s-3) var(--s-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); user-select: auto; transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease); }
.ds-radio.hm-mode:hover { border-color: var(--accent); }
.ds-radio.hm-mode.is-on { border-color: var(--accent); background: var(--accent-soft); }
.hm-mode .ds-radio-dot { margin-top: 2px; }
.hm-mode-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-mode-help { color: var(--ink-3); font-size: var(--text-sm); }
.hm-sub-sw { margin-top: var(--s-2); }
/* Models: one row per role, then the people with their own setting. Every control is a
   44px target; below 640px the table is the design system's card view. */
.hm-models { margin-top: var(--s-1); }
.hm-models .ds-table tbody td { padding-top: var(--s-1); padding-bottom: var(--s-1); }
.hm-tiers { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); }
.ds-check.hm-tier { position: relative; min-height: 44px; font-size: var(--text-sm); }
.hm-tier input:disabled ~ .ds-check-box { opacity: 0.6; }
.ds-check.hm-tier:has(input:disabled) { cursor: not-allowed; }
.hm-models .ds-switch { min-height: 44px; min-width: 44px; }
.hm-models .ds-select, .hm-add-select { width: auto; min-width: 128px; min-height: 44px; font-size: var(--text-sm); }
.hm-add-select { max-width: 100%; }
.hm-who { font-weight: 600; }
.hm-who-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.hm-who-sub { display: block; color: var(--ink-3); font-size: var(--text-xs); font-weight: 500; }
.ds-btn.hm-remove { --btn-h: 44px; flex: none; }
.hm-remove svg { width: 16px; height: 16px; }
.ds-table tbody tr.hm-models-sub, .ds-table tbody tr.hm-models-sub:hover { background: var(--surface-2); }
.ds-table tbody tr.hm-models-sub td { color: var(--ink-3); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.hm-models-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-top: var(--s-4); }
.hm-models-pick { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; flex: 1 1 240px; min-width: 0; color: var(--ink-3); }
/* Morning check (PR 10, Main.dc.html): When, then one block per check (its switch, its words
   with the days box, today's count), then who it sends to; See today's list draws below the card. */
.hm-mc-when { display: flex; align-items: center; gap: var(--s-2) var(--s-3); flex-wrap: wrap; padding: var(--s-2) 0 var(--s-3); border-bottom: 1px solid var(--border-subtle); }
.hm-mc-when > .hm-sw-title { min-width: 64px; }
.hm-mc-when .ds-select { width: auto; min-width: 136px; min-height: 44px; }
.hm-mc-check { display: grid; gap: var(--s-3); padding: var(--s-4) 0; }
.hm-mc-check + .hm-mc-check { border-top: 1px solid var(--border-subtle); }
.hm-mc-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-1) var(--s-3); align-items: start; }
.hm-mc-top .ds-switch { margin-top: 2px; }
/* The 38 x 22 switch keeps its look; its tap area is 44 x 44. */
.hm-mc-top .ds-switch::before { content: ""; position: absolute; inset: -11px -3px; }
.hm-mc-text { display: flex; flex-direction: column; gap: var(--s-1); min-width: 0; }
.hm-mc-words { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-1) var(--s-2); color: var(--ink-3); font-size: var(--text-sm); }
.ds-input.hm-mc-days { width: 64px; min-height: 44px; text-align: center; }
.hm-mc-today { color: var(--ink-3); font-size: var(--text-sm); white-space: nowrap; }
.hm-mc-today:empty { display: none; }
.hm-mc-sends { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-2); padding-left: calc(38px + var(--s-3)); }
.hm-mc-label { min-width: 64px; color: var(--ink-3); font-size: var(--text-xs); font-weight: 600; }
.ds-chip.hm-mc-chip { min-height: 32px; padding-right: var(--s-1); font-size: var(--text-sm); }
.ds-chip-x.hm-mc-x { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 0; border-radius: var(--r-full); }
/* The remove button taps as 44 x 44. */
.ds-chip-x.hm-mc-x::before { content: ""; position: absolute; inset: -10px; }
.ds-chip-x.hm-mc-x:focus-visible { opacity: 1; box-shadow: var(--ring); outline: none; }
.hm-mc-x svg { width: 14px; height: 14px; }
.ds-btn.hm-mc-add { --btn-h: 44px; border: 1px dashed var(--border); border-radius: var(--r-full); color: var(--accent-ink); }
.hm-mc-none { color: var(--ink-3); font-size: var(--text-sm); }
.hm-mc-sends .ds-btn-sm { --btn-h: 44px; }
.hm-mc .ai-savebar { flex-wrap: wrap; }
.hm-mc-prev-head { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.hm-mc-prev-head h4 { flex: 1; }
.hm-mc-prev-head .ds-btn { --btn-h: 44px; }
.hm-mc-preview:focus-visible { outline: none; box-shadow: var(--ring); }
.hm-mc-person { padding: var(--s-3) 0; }
.hm-mc-person + .hm-mc-person { border-top: 1px solid var(--border-subtle); }
.hm-mc-pname { font-weight: 700; }
.hm-mc-ntitle { margin-bottom: var(--s-2); color: var(--ink-3); font-size: var(--text-sm); }
.hm-mc-status { margin: var(--s-1) 0 0; color: var(--ink-3); }
.hm-mc-sec + .hm-mc-sec { margin-top: var(--s-3); }
.hm-mc-sec-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); flex-wrap: wrap; }
.hm-mc-sec-title { font-weight: 600; font-size: var(--text-sm); }
.hm-mc-rows { margin: var(--s-2) 0 0; padding: 0; list-style: none; border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--surface-2); }
.hm-mc-rows li { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) var(--s-3); font-size: var(--text-sm); }
.hm-mc-rows li + li { border-top: 1px solid var(--border-subtle); }
.hm-mc-row-label { min-width: 0; overflow-wrap: anywhere; }
.hm-mc-row-detail { flex-shrink: 0; max-width: 50%; text-align: right; color: var(--ink-2); overflow-wrap: anywhere; }
.hm-mc-rows .hm-mc-more { color: var(--ink-3); }
@media (max-width: 720px) {
  .hm-model, .hm-limits { grid-template-columns: minmax(0, 1fr); }
  .hm-diff { margin: 0 0 var(--s-3); }
  .hm-modes { grid-template-columns: minmax(0, 1fr); }
  .hm-pane-usage .ds-btn { --btn-h: 44px; }
  .hm-pane-morning .ds-btn { --btn-h: 44px; }
  .hm-limits .ai-money .ds-input { min-height: 44px; }
  .hm-models-foot .hm-actions { width: 100%; justify-content: flex-end; }
}
@media (max-width: 640px) {
  .hm-tiers { justify-content: flex-end; }
  /* Phone: the count goes under the words, the people under the switch row, the buttons share the width. */
  .hm-mc-top { grid-template-columns: auto minmax(0, 1fr); }
  .hm-mc-today { grid-column: 2; white-space: normal; }
  .hm-mc-sends { padding-left: 0; }
  .hm-mc-label { flex-basis: 100%; }
  .hm-mc-when .ds-select { flex: 1 1 136px; }
  .hm-mc .ai-savebar .ds-btn { flex: 1 1 auto; }
  .hm-mc-rows li { flex-direction: column; gap: var(--s-1); }
  .hm-mc-row-detail { max-width: none; text-align: left; }
}
