.mi-usability-layer,
.mi-alert-modal {
  color: var(--text, #eef4f1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.mi-usability-ready .public-market-now,
body.mi-usability-ready .feed.surface {
  display: none !important;
}

body.mi-usability-ready.mi-public-mode .dashboard-grid,
body.mi-usability-ready.mi-public-mode .history.surface,
body.mi-usability-ready.mi-public-mode .settings-view,
body.mi-usability-ready.mi-public-mode .topbar {
  display: none !important;
}

.mi-usability-layer {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin: 0 0 10px;
}

.mi-dashboard-panel,
.mi-history-panel {
  display: grid;
  gap: 10px;
}

/* MOBILE-INVOSIGHTS-VALUE-FIRST-2026-05-30: diagnostics disclosure wrapping
   Liquidation Watch + Data Status. Desktop/tablet — the summary bar is hidden
   and the body renders inline, so the wide layout is visually identical to
   before. Mobile (≤640px, see the media block below) — the summary becomes a
   tap target and the body collapses so the screen leads with insight. */
.mi-diag { margin: 0; padding: 0; border: 0; background: transparent; }
.mi-diag-body { display: grid; gap: 10px; }
.mi-diag-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  border: 1px solid var(--line, #28333d);
  background: rgba(13, 19, 24, 0.96);
  color: #dce8e4;
  font-weight: 800;
  font-size: 13px;
  min-height: 42px;
}
.mi-diag-summary::after {
  content: "Hide";
  color: var(--muted, #94a39d);
  font-weight: 600;
  font-size: 12px;
}
.mi-diag-title { min-width: 0; }
.mi-diag-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted, #94a39d);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.mi-diag-preview span {
  border: 1px solid rgba(148, 163, 157, 0.24);
  padding: 2px 6px;
}
.mi-diag:not([open]) > .mi-diag-summary::after {
  content: "Show";
}
.mi-diag > summary::-webkit-details-marker { display: none; }

body.mi-view-history .mi-dashboard-panel,
body:not(.mi-view-history) .mi-history-panel {
  display: none !important;
}

body.mi-usability-ready.mi-public-mode .mi-dashboard-panel,
body.mi-usability-ready.mi-public-mode .mi-history-panel {
  display: grid !important;
}

.mi-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line, #28333d);
  background: rgba(13, 19, 24, 0.96);
  padding: 12px;
}

.mi-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mi-brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(64, 216, 154, 0.56);
  color: #40d89a;
  font-weight: 900;
}

.mi-brand-name {
  display: block;
  color: #f4fbf8;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.mi-brand-sub {
  display: block;
  color: var(--muted, #94a39d);
  font-size: 12px;
  margin-top: 2px;
}

.mi-brand-live {
  color: #cfeee2;
  font-size: 12px;
  white-space: nowrap;
}

.mi-hero-card,
.mi-alerts-card,
.mi-status-card,
.mi-liquidation-watch,
.mi-data-status-card,
.mi-history-panel {
  border: 1px solid var(--line, #28333d);
  background: rgba(13, 19, 24, 0.96);
  padding: 12px;
  min-width: 0;
}

.mi-hero-card {
  display: grid;
  gap: 7px;
}

.mi-section-kicker,
.mi-meta,
.mi-note {
  color: var(--muted, #94a39d);
  font-size: 12px;
  line-height: 1.35;
}

.mi-section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.mi-hero-title {
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 900;
  line-height: 1.04;
}

.mi-hero-story {
  color: #dce8e4;
  font-size: 14px;
  line-height: 1.4;
  max-width: 86ch;
}

.mi-hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 5px;
  max-width: 92ch;
}

.mi-hero-points li {
  position: relative;
  padding-left: 15px;
  color: #cdded8;
  font-size: 13px;
  line-height: 1.4;
}

.mi-hero-points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(64, 216, 154, 0.85);
}

.mi-hero-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.mi-hero-chips-label,
.mi-hero-confidence-label,
.mi-hero-watch-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted, #94a39d);
}

.mi-hero-chip {
  border: 1px solid rgba(64, 216, 154, 0.34);
  background: rgba(64, 216, 154, 0.09);
  color: #d7efe6;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
}

.mi-hero-confidence {
  color: #cdded8;
  font-size: 12.5px;
  line-height: 1.4;
  max-width: 92ch;
}

.mi-hero-confidence-label {
  margin-right: 4px;
  color: #e7f3ee;
}

.mi-hero-watch {
  display: grid;
  gap: 4px;
}

.mi-hero-watch ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.mi-hero-watch li {
  position: relative;
  padding-left: 15px;
  color: #b9ccc5;
  font-size: 12.5px;
  line-height: 1.35;
}

.mi-hero-watch li::before {
  content: "\203A";
  position: absolute;
  left: 3px;
  top: 0;
  color: rgba(64, 216, 154, 0.8);
  font-weight: 800;
}

.mi-live-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.mi-live-item,
.mi-status-item {
  min-width: 0;
  border: 1px solid var(--line, #28333d);
  background: #0b1116;
  padding: 9px;
}

.mi-status-button {
  width: 100%;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.mi-status-button:hover {
  border-color: rgba(64, 216, 154, 0.64);
}

.mi-live-item span,
.mi-status-item span {
  display: block;
  color: var(--muted, #94a39d);
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.mi-live-item strong,
.mi-status-item strong {
  display: block;
  color: #f4fbf8;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.mi-status-explainer {
  display: block;
  margin-top: 5px;
  color: #b7c5c0;
  font-size: 12px;
  font-style: normal;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.mi-alert-list,
.mi-history-list,
.mi-status-grid {
  display: grid;
  gap: 8px;
}

.mi-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mi-status-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mi-data-status-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mi-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mi-card-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.mi-explainer-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.mi-explainer-row span {
  min-width: 0;
  border: 1px solid var(--line, #28333d);
  background: #101820;
  color: #cddbd7;
  padding: 8px;
  font-size: 12px;
  line-height: 1.35;
}

.mi-alert-card,
.mi-history-card {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid var(--line, #28333d);
  background: #0b1116;
  color: inherit;
  padding: 10px;
  cursor: pointer;
}

.mi-alert-card:hover,
.mi-history-card:hover {
  border-color: rgba(64, 216, 154, 0.64);
}

.mi-alert-top,
.mi-history-top,
.mi-alert-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.mi-alert-title,
.mi-history-title {
  display: block;
  margin-top: 7px;
  color: #f5fbf8;
  font-weight: 900;
  line-height: 1.22;
  overflow-wrap: break-word;
  word-break: normal;
}

.mi-alert-meta {
  margin-top: 6px;
  color: var(--muted, #94a39d);
  font-size: 12px;
  line-height: 1.3;
}

.mi-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border: 1px solid var(--line, #28333d);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.mi-badge-critical {
  color: #ff6970;
  border-color: rgba(255, 105, 112, 0.8);
}

.mi-badge-high,
.mi-impact-slightly-bearish {
  color: #f4bf5f;
  border-color: rgba(244, 191, 95, 0.78);
}

.mi-impact-bearish {
  color: #ff6970;
  border-color: rgba(255, 105, 112, 0.8);
}

.mi-impact-bullish,
.mi-impact-slightly-bullish {
  color: #40d89a;
  border-color: rgba(64, 216, 154, 0.75);
}

.mi-impact-neutral {
  color: #cbd8d4;
}

.mi-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mi-history-head h2,
.mi-alerts-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
}

.mi-alert-modal[hidden] {
  display: none !important;
}

.mi-alert-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
}

.mi-alert-dialog {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  border: 1px solid var(--line, #28333d);
  background: #0b1116;
  padding: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.mi-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.mi-dialog-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: break-word;
}

.mi-close {
  border: 1px solid var(--line, #28333d);
  background: #101820;
  color: #f4fbf8;
  min-width: 38px;
  min-height: 34px;
  cursor: pointer;
}

.mi-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.mi-detail-block {
  border: 1px solid var(--line, #28333d);
  background: #101820;
  padding: 10px;
  min-width: 0;
}

.mi-detail-block span {
  display: block;
  color: var(--muted, #94a39d);
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.mi-detail-block strong,
.mi-detail-block p {
  color: #f4fbf8;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.mi-source-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: var(--steel, #7eb7ff);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 920px) {
  .mi-live-strip,
  .mi-status-grid,
  .mi-status-grid-four,
  .mi-data-status-grid,
  .mi-explainer-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.mi-usability-ready .app-shell {
    padding: 10px !important;
  }

  .mi-usability-layer,
  .mi-dashboard-panel,
  .mi-history-panel {
    gap: 7px;
  }

  body.mi-usability-ready .topbar {
    min-height: auto !important;
    gap: 8px !important;
  }

  body.mi-usability-ready .brand-mark {
    width: 40px !important;
    height: 40px !important;
  }

  body.mi-usability-ready .brand-block {
    gap: 9px !important;
  }

  body.mi-usability-ready .tabs button {
    height: 38px !important;
    padding: 0 10px !important;
  }

  body.mi-usability-ready .vitals span,
  body.mi-usability-ready .vital-button {
    min-height: 30px !important;
    padding: 4px 8px !important;
  }

  .mi-live-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .mi-status-grid,
  .mi-status-grid-four,
  .mi-data-status-grid,
  .mi-explainer-row,
  .mi-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mi-hero-card,
  .mi-brand-row,
  .mi-alerts-card,
  .mi-status-card,
  .mi-liquidation-watch,
  .mi-data-status-card,
  .mi-history-panel {
    padding: 8px;
  }

  .mi-hero-card {
    gap: 4px;
  }

  .mi-brand-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .mi-brand-mark {
    width: 36px;
    height: 36px;
  }

  .mi-brand-name {
    font-size: 19px;
  }

  .mi-hero-title {
    font-size: 24px;
  }

  .mi-hero-story {
    font-size: 12px;
    margin: 0;
  }

  .mi-live-item,
  .mi-status-item,
  .mi-alert-card,
  .mi-history-card {
    padding: 7px;
  }

  .mi-live-item span,
  .mi-status-item span {
    font-size: 9px;
    margin-bottom: 3px;
  }

  .mi-live-item strong,
  .mi-status-item strong {
    font-size: 11px;
    line-height: 1.18;
  }

  .mi-status-explainer,
  .mi-explainer-row span {
    font-size: 10px;
    line-height: 1.25;
  }

  .mi-card-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 6px;
  }

  .mi-alert-list,
  .mi-history-list,
  .mi-status-grid,
  .mi-status-grid-four,
  .mi-data-status-grid {
    gap: 6px;
  }

  .mi-alerts-card h2,
  .mi-history-head h2,
  .mi-card-head h2 {
    font-size: 15px;
  }

  .mi-alert-title,
  .mi-history-title {
    font-size: 13px;
    margin-top: 5px;
  }

  .mi-alert-meta {
    margin-top: 4px;
    font-size: 10px;
  }

  .mi-badge {
    min-height: 18px;
    padding: 2px 5px;
    font-size: 9px;
  }

  .mi-alert-dialog {
    max-height: 88vh;
    padding: 12px;
  }

  /* MOBILE-INVOSIGHTS-VALUE-FIRST-2026-05-30 — collapse the diagnostics behind
     a tap, and trim the 8-item live strip to the 4 executive metrics (Live
     now, Latest news, New alerts, Data confidence). Liquidations / ETF flow /
     Source update / Stream stay available one tap away inside the disclosure
     and the Data Status card. Net: 390px leads with the market story + a tight
     metrics row + the top alerts, not a diagnostic wall. */
  .mi-diag-body { display: grid; gap: 7px; margin-top: 7px; }
  .mi-diag-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    padding: 11px 12px;
    border: 1px solid var(--line, #28333d);
    background: rgba(13, 19, 24, 0.96);
    color: #dce8e4;
    font-weight: 800;
    font-size: 13px;
    min-height: 44px;
  }
  .mi-diag-preview {
    gap: 4px;
    font-size: 10px;
  }
  .mi-diag-preview span {
    padding: 2px 4px;
  }
  .mi-diag-summary::after {
    content: "Show";
    color: var(--muted, #94a39d);
    font-weight: 600;
    font-size: 12px;
  }
  .mi-diag[open] > .mi-diag-summary::after { content: "Hide"; }
  .mi-live-strip .mi-live-item:nth-child(4),
  .mi-live-strip .mi-live-item:nth-child(5),
  .mi-live-strip .mi-live-item:nth-child(7),
  .mi-live-strip .mi-live-item:nth-child(8) { display: none; }
}

/* APP2-OWNER-LOGIN-PILL-2026-05-20 — small owner-status pill rendered on
   /market/app. Cosmetic only; backend auth is unchanged. Class-gated
   (#mi-owner-pill) so it cannot affect /, /app/, or any other surface
   that doesn't load the Market overlay. */
.mi-owner-pill {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(20, 22, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.mi-owner-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #7aa2ff;
  flex-shrink: 0;
}

.mi-owner-pill[data-state="signed-in"] .mi-owner-pill__dot {
  background: #7adf9b;
}

.mi-owner-pill__label strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
}

.mi-owner-pill__signin {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.mi-owner-pill__signin:hover,
.mi-owner-pill__signin:focus-visible {
  text-decoration: underline;
}

.mi-owner-pill__signout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  font: inherit;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 22px;
  touch-action: manipulation;
}

.mi-owner-pill__signout:hover,
.mi-owner-pill__signout:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.mi-owner-pill__signout:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (max-width: 480px) {
  .mi-owner-pill {
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 11px;
    gap: 6px;
  }
  .mi-owner-pill__signout {
    font-size: 10px;
    padding: 2px 8px;
  }
}

@media (max-width: 320px) {
  .mi-diag-summary {
    flex-wrap: wrap;
  }
  .mi-diag-preview {
    flex: 1 1 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }
}
