/* MAG Hub — Focus, Launchpad, Data and Settings.
   Only what app.css does not already provide, built from its tokens. Class names carry the
   screen's name (focus-, launchpad-, dataview-, settings-) or more- when these screens share them. */

/* The kit styles a disabled .btn; the ghost button gets the same treatment. */
.btn-ghost:disabled { opacity: .55; cursor: default; }
.btn-ghost:disabled:hover { color: var(--ink-2); background: var(--surface); }

/* ---------- shared ---------- */
/* a company: its colour dot, then its name */
.more-co { display: inline-flex; align-items: center; gap: 7px; }
.more-co .nav-dot { margin: 0; }
/* the body of a card: blocks stacked with even gaps; the single column may shrink so a wide table scrolls inside it */
.more-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.more-stack > div:empty, .more-stack > p:empty { display: none; }
.more-stack > .card-foot { margin-top: 0; }
.more-note { font-size: 13px; }

/* ---------- focus ---------- */
/* nothing sits beside this hero, so its one block takes both columns */
.focus-lead { grid-column: 1 / -1; }
.focus-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.focus-filters .field { flex: 0 1 260px; min-width: 0; }
.focus-count { margin-left: auto; padding-bottom: 6px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* head and amount share the first row; evidence and actions run the full width beneath them */
.insight.focus-item { row-gap: 0; }
.focus-more { grid-column: 2 / -1; min-width: 0; }
.focus-more-note { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.focus-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.focus-actions .btn-ghost { white-space: nowrap; }
@media (max-width: 860px) {
  .focus-item .insight-impact { margin-top: 6px; }
  .focus-item .insight-impact small { display: inline; margin-left: 5px; }
  .focus-count { margin-left: 0; flex-basis: 100%; padding-bottom: 0; }
}

/* ---------- launchpad ---------- */
.launchpad-dot { margin: 0; align-self: center; }

/* ---------- data ---------- */
.dataview-source { min-width: 190px; font-weight: 500; }
.dataview-source .form-error { margin-top: 2px; font-weight: 400; }
.dataview-feeds { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dataview-feeds .more-co { white-space: nowrap; }
.dataview-sync { flex: none; white-space: nowrap; }
.dataview-reads { font-size: 13px; color: var(--ink-2); }
.dataview-sub { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.dataview-gaps { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }

/* ---------- settings ---------- */
/* one wrapper so the whole screen can be handed back on a refresh; its cards still sit in the page grid */
.settings-screen { display: contents; }
.settings-notices { display: grid; gap: 8px; }
.settings-temp > div { flex: 1 1 auto; min-width: 0; }
.settings-temp > button { flex: none; }
.settings-code { padding: 1px 6px; border: 1px solid var(--hairline); border-radius: 4px; background: var(--surface); font: 600 13.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; user-select: all; }
.settings-actions { display: flex; gap: 6px; justify-content: flex-end; }
.settings-actions .btn-ghost { white-space: nowrap; }
.settings-sub { font-size: 13px; font-weight: 600; }
.settings-hint { font-size: 12px; color: var(--ink-2); }

.settings-scope { flex: 1 1 100%; min-width: 0; margin: 0; padding: 0; border: 0; }
.settings-scope legend { padding: 0; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.settings-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.settings-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.settings-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }

.settings-target { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 200px) auto; gap: 4px 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--hairline); }
.settings-target:first-child { border-top: 0; padding-top: 0; }
.settings-target:last-child { padding-bottom: 0; }
.settings-target > label { padding-top: 9px; font-weight: 500; }
.settings-target > .btn-ghost { margin-top: 7px; }
.settings-read { margin-top: 3px; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .settings-target { grid-template-columns: minmax(0, 1fr) auto; }
  .settings-target > label { grid-column: 1 / -1; padding-top: 0; }
}

.settings-thresholds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px 18px; }

.settings-merge { align-items: flex-start; }
.settings-results { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border: 1px solid var(--hairline); border-radius: var(--r-input); }
.settings-results:empty { display: none; }
.settings-results li + li { border-top: 1px solid var(--hairline); }
.settings-results li.muted { padding: 7px 11px; font-size: 13px; }
.settings-result { display: block; width: 100%; padding: 7px 11px; border: 0; background: none; text-align: left; font-size: 13px; cursor: pointer; }
.settings-result:hover { background: var(--hover); }
.settings-confirm { display: grid; gap: 10px; justify-items: start; font-size: 13.5px; }
