/* Header data-health beacon + reusable macro trend diagnostics. */
.market-overview__health-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  min-height: 20px;
  margin-top: 4px;
  padding: 3px 6px;
  border: 1px solid var(--gside-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--gside-muted);
  cursor: pointer;
  font: inherit;
  font-size: 6.5px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.market-overview__health-button:hover { background: #f8fafc; }
.market-overview__health-button:focus-visible { outline: 2px solid var(--gside-accent); outline-offset: 2px; }
.market-overview__health-beacon {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #94a3b8;
}
.market-overview__health-button--healthy { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.market-overview__health-button--healthy .market-overview__health-beacon {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .1), 0 0 10px rgba(22, 163, 74, .32);
  animation: header-health-pulse 1.8s ease-in-out infinite;
}
.market-overview__health-button--warning { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.market-overview__health-button--warning .market-overview__health-beacon {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .1);
}
.market-overview__health-button--error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.market-overview__health-button--error .market-overview__health-beacon {
  background: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .1);
}

button.market-overview__macro-card {
  width: 100%;
  appearance: none;
  color: inherit;
  cursor: zoom-in;
  font: inherit;
  text-align: left;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
button.market-overview__macro-card:hover {
  border-color: color-mix(in srgb, var(--macro-tone) 45%, #d9e1e7);
  box-shadow: 0 5px 13px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
}
button.market-overview__macro-card:focus-visible { outline: 2px solid var(--macro-tone); outline-offset: 2px; }

.header-health-modal,
.macro-trend-modal {
  width: min(96vw, 1180px);
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .42);
  border-radius: 20px;
  background: #f8fbff;
  color: #0f172a;
  box-shadow: 0 32px 100px rgba(15, 23, 42, .27);
}
.header-health-modal::backdrop,
.macro-trend-modal::backdrop { background: rgba(15, 23, 42, .54); backdrop-filter: blur(4px); }

.header-health-modal__frame,
.macro-trend-modal__frame {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: min(92vh, 900px);
  max-height: 92vh;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.header-health-modal__header,
.macro-trend-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 18px 20px 15px;
  border-bottom: 1px solid rgba(148, 163, 184, .25);
  background: rgba(255, 255, 255, .94);
}
.header-health-modal__header h2,
.macro-trend-modal__header h2 { margin: 0; font-size: clamp(19px, 2vw, 25px); font-weight: 760; letter-spacing: -.035em; }
.header-health-modal__header p,
.macro-trend-modal__header p { margin: 5px 0 0; color: #64748b; font-size: 11px; line-height: 1.5; }
.header-health-modal__eyebrow,
.macro-trend-modal__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.header-health-modal__beacon,
.macro-trend-modal__live-dot { width: 8px; height: 8px; border-radius: 50%; }
.header-health-modal__beacon { background: #94a3b8; box-shadow: 0 0 0 4px rgba(148, 163, 184, .1); }
.macro-trend-modal__live-dot,
.header-health-modal__beacon[data-status="healthy"] { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .1), 0 0 14px rgba(22, 163, 74, .32); }
.header-health-modal__beacon[data-status="warning"] { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .1), 0 0 14px rgba(245, 158, 11, .26); }
.header-health-modal__beacon[data-status="error"] { background: #e11d48; box-shadow: 0 0 0 4px rgba(225, 29, 72, .1), 0 0 14px rgba(225, 29, 72, .26); }
.header-health-modal__close,
.macro-trend-modal__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 10px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}
.header-health-modal__close:hover,
.macro-trend-modal__close:hover { color: #0f172a; }

.header-health-modal__summary,
.macro-trend-modal__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  background: #f8fafc;
}
.header-health-modal__summary > div,
.macro-trend-modal__metric {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 12px;
  background: #ffffff;
}
.header-health-modal__summary span,
.header-health-modal__summary strong,
.header-health-modal__summary small,
.macro-trend-modal__metric span,
.macro-trend-modal__metric strong,
.macro-trend-modal__metric small { display: block; }
.header-health-modal__summary span,
.macro-trend-modal__metric span { color: #64748b; font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.header-health-modal__summary strong,
.macro-trend-modal__metric strong { margin-top: 5px; overflow: hidden; color: #0f172a; font-size: 14px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.header-health-modal__summary small,
.macro-trend-modal__metric small { margin-top: 3px; color: #94a3b8; font-size: 9px; line-height: 1.35; }

.header-health-modal__body,
.macro-trend-modal__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 14px 20px 20px; }
.header-health-modal__status,
.macro-trend-modal__status { color: #64748b; font-size: 10px; font-weight: 700; }
.header-health-modal__checks { display: grid; gap: 8px; margin-top: 10px; }
.header-health-modal__check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
  gap: 14px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 12px;
  background: #ffffff;
}
.header-health-modal__check--healthy { border-left-color: #16a34a; }
.header-health-modal__check--warning { border-left-color: #f59e0b; background: #fffdf7; }
.header-health-modal__check--error { border-left-color: #e11d48; background: #fffafa; }
.header-health-modal__check-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.header-health-modal__check-heading strong { color: #0f172a; font-size: 12px; }
.header-health-modal__check-heading > span:last-child { margin-left: auto; color: #64748b; font-size: 9px; white-space: nowrap; }
.header-health-modal__check-beacon { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #94a3b8; }
.header-health-modal__check--healthy .header-health-modal__check-beacon { background: #16a34a; }
.header-health-modal__check--warning .header-health-modal__check-beacon { background: #f59e0b; }
.header-health-modal__check--error .header-health-modal__check-beacon { background: #e11d48; }
.header-health-modal__check-main p { margin: 5px 0 0 16px; color: #64748b; font-size: 10px; line-height: 1.45; }
.header-health-modal__check-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; }
.header-health-modal__check-meta > div { min-width: 0; padding: 7px 8px; border: 1px solid #eef2f7; border-radius: 9px; background: #fbfdff; }
.header-health-modal__check-meta dt { color: #94a3b8; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.header-health-modal__check-meta dd { margin: 4px 0 0; overflow: hidden; color: #334155; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.macro-trend-modal { width: min(97vw, 1280px); }
.macro-trend-modal__header-actions { display: flex; align-items: center; gap: 8px; }
.macro-trend-modal__source-link { padding: 7px 9px; border: 1px solid #bae6fd; border-radius: 8px; background: #f0f9ff; color: #0369a1; font-size: 10px; font-weight: 800; text-decoration: none; }
.macro-trend-modal__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(190px, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  background: #f8fafc;
}
.macro-trend-modal__horizons,
.macro-trend-modal__degree-tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.macro-trend-modal__horizon,
.macro-trend-modal__degree-tab {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
}
.macro-trend-modal__horizon:hover,
.macro-trend-modal__degree-tab:hover { background: #f1f5f9; color: #0f172a; }
.macro-trend-modal__horizon.is-active,
.macro-trend-modal__degree-tab.is-active { border-color: #93c5fd; background: #eff6ff; color: #0057d9; }
.macro-trend-modal__status { text-align: right; }
.macro-trend-modal__summary { padding: 0; border: 0; background: transparent; margin-bottom: 10px; }
.macro-trend-modal__collection { margin: 0 0 10px; padding: 8px 10px; border: 1px solid #dbeafe; border-radius: 10px; background: #eff6ff; color: #475569; font-size: 10px; line-height: 1.45; }
.macro-trend-modal__coefficients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.macro-trend-modal__coefficient {
  min-width: 0;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #94a3b8;
  border-radius: 13px;
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.macro-trend-modal__coefficient:nth-child(1) { border-top-color: #0066ff; }
.macro-trend-modal__coefficient:nth-child(2) { border-top-color: #00a86b; }
.macro-trend-modal__coefficient:nth-child(3) { border-top-color: #ff7a00; }
.macro-trend-modal__coefficient.is-active { box-shadow: 0 0 0 2px rgba(0, 102, 255, .11), 0 8px 22px rgba(15, 23, 42, .06); }
.macro-trend-modal__coefficient-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 7px; border-bottom: 1px solid #eef2f7; }
.macro-trend-modal__coefficient-head strong { font-size: 11px; }
.macro-trend-modal__coefficient-head span { color: #64748b; font-size: 9px; font-weight: 850; }
.macro-trend-modal__coefficient > div:not(.macro-trend-modal__coefficient-head) { margin-top: 8px; }
.macro-trend-modal__coefficient > div > span { display: block; color: #94a3b8; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.macro-trend-modal__coefficient > div > strong { display: block; margin-top: 3px; overflow: hidden; color: #334155; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.macro-trend-modal__explanation { margin: 10px 0 0; padding: 9px 10px; border: 1px solid rgba(14, 165, 233, .22); border-radius: 10px; background: linear-gradient(90deg, rgba(239,246,255,.92), rgba(240,253,250,.84)); color: #475569; font-size: 10px; line-height: 1.5; }
.macro-trend-modal__explanation strong { color: #0f172a; }
.macro-trend-modal__chart-card { margin-top: 10px; overflow: hidden; border: 1px solid rgba(148, 163, 184, .28); border-radius: 15px; background: #ffffff; }
.macro-trend-modal__chart-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 10px 12px 0; }
.macro-trend-modal__chart-heading strong { font-size: 11px; }
.macro-trend-modal__chart-heading span { color: #64748b; font-size: 9px; text-align: right; }
.macro-trend-modal__canvas-wrap { position: relative; height: 250px; padding: 8px 10px 10px; }
.macro-trend-modal__canvas-wrap--companion { height: 220px; }
.macro-trend-modal__canvas-wrap canvas { display: block; max-width: 100%; }
.macro-trend-modal__method { margin: 10px 0 0; color: #64748b; font-size: 9px; line-height: 1.5; }
.macro-trend-modal__empty { display: grid; place-items: center; min-height: 320px; padding: 30px; border: 1px dashed rgba(148, 163, 184, .42); border-radius: 15px; background: #ffffff; color: #64748b; font-size: 12px; text-align: center; }
.macro-trend-modal__empty[hidden],
.macro-trend-modal__content[hidden],
.macro-trend-modal__source-link[hidden],
.macro-trend-modal__chart-card[hidden] { display: none !important; }

@keyframes header-health-pulse {
  0%, 100% { opacity: .68; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.06); }
}

@media (max-width: 900px) {
  .header-health-modal__summary,
  .macro-trend-modal__summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-health-modal__check { grid-template-columns: 1fr; }
  .macro-trend-modal__toolbar { grid-template-columns: 1fr; align-items: start; }
  .macro-trend-modal__status { text-align: left; }
  .macro-trend-modal__coefficients { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .header-health-modal,
  .macro-trend-modal { width: calc(100vw - 14px); max-height: 94vh; border-radius: 15px; }
  .header-health-modal__frame,
  .macro-trend-modal__frame { height: 94vh; max-height: 94vh; }
  .header-health-modal__header,
  .macro-trend-modal__header { padding: 14px; }
  .header-health-modal__summary,
  .macro-trend-modal__summary { grid-template-columns: 1fr 1fr; padding-right: 14px; padding-left: 14px; }
  .header-health-modal__body,
  .macro-trend-modal__body,
  .macro-trend-modal__toolbar { padding-right: 14px; padding-left: 14px; }
  .header-health-modal__check-meta { grid-template-columns: 1fr; }
  .macro-trend-modal__degree-tabs,
  .macro-trend-modal__horizons { width: 100%; }
  .macro-trend-modal__degree-tab,
  .macro-trend-modal__horizon { flex: 1 1 auto; }
  .macro-trend-modal__canvas-wrap { height: 210px; padding-right: 4px; padding-left: 4px; }
  .macro-trend-modal__chart-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .macro-trend-modal__chart-heading span { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .market-overview__health-button--healthy .market-overview__health-beacon,
  button.market-overview__macro-card { animation: none; transition: none; }
}

@media (min-width: 901px) {
  .market-overview__macro { grid-template-columns: 124px minmax(0, 1fr); }
}

/* SPY-style macro explorer charts: guarantee a measurable canvas, show rolling
 * normalized-coefficient history, and surface rendering failures instead of a
 * silent blank chart card. */
.macro-trend-modal__content,
.macro-trend-modal__chart-card,
.macro-trend-modal__canvas-wrap {
  min-width: 0;
}

.macro-trend-modal__strength-key {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.macro-trend-modal__strength-key > div {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  grid-template-areas:
    "swatch label"
    "swatch detail";
  column-gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 9px;
  background: rgba(255, 255, 255, .82);
}

.macro-trend-modal__strength-key strong,
.macro-trend-modal__strength-key small {
  display: block;
  min-width: 0;
}

.macro-trend-modal__strength-key strong {
  grid-area: label;
  color: #334155;
  font-size: 9px;
}

.macro-trend-modal__strength-key small {
  grid-area: detail;
  color: #64748b;
  font-size: 8px;
  line-height: 1.2;
}

.macro-trend-modal__strength-swatch {
  grid-area: swatch;
  width: 8px;
  height: 28px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 10px rgba(100, 116, 139, .22);
}

.macro-trend-modal__strength-swatch--very-strong { background: #00e676; box-shadow: 0 0 10px rgba(0, 230, 118, .28); }
.macro-trend-modal__strength-swatch--strong { background: #00a86b; box-shadow: 0 0 10px rgba(0, 168, 107, .24); }
.macro-trend-modal__strength-swatch--moderate { background: #00b8d9; box-shadow: 0 0 10px rgba(0, 184, 217, .22); }
.macro-trend-modal__strength-swatch--mild { background: #94a3b8; }

.macro-trend-modal__chart-error {
  margin: 10px 0 0;
  padding: 9px 10px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.macro-trend-modal__chart-error[hidden] { display: none !important; }

.macro-trend-modal__chart-card {
  background:
    radial-gradient(circle at 7% 0%, rgba(255, 43, 214, .045), transparent 30%),
    radial-gradient(circle at 92% 0%, rgba(0, 230, 118, .04), transparent 31%),
    #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .045);
}

.macro-trend-modal__chart-card--strength {
  background:
    radial-gradient(circle at 6% 0%, rgba(0, 230, 118, .05), transparent 29%),
    radial-gradient(circle at 94% 100%, rgba(225, 29, 72, .04), transparent 30%),
    #ffffff;
}

.macro-trend-modal__chart-card--companion {
  background:
    linear-gradient(135deg, rgba(236, 253, 245, .42), rgba(255, 255, 255, .96) 48%, rgba(255, 241, 242, .38));
}

.macro-trend-modal__canvas-wrap--primary { height: 300px; }
.macro-trend-modal__canvas-wrap--strength { height: 250px; }
.macro-trend-modal__canvas-wrap--companion { height: 230px; }


@media (max-width: 900px) {
  .macro-trend-modal__strength-key { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .macro-trend-modal__canvas-wrap--primary { height: 270px; }
  .macro-trend-modal__canvas-wrap--strength,
  .macro-trend-modal__canvas-wrap--companion { height: 230px; }
}

@media (max-width: 640px) {
  .macro-trend-modal {
    width: calc(100dvw - 8px);
    max-width: calc(100dvw - 8px);
    max-height: calc(100dvh - 8px);
    margin: auto;
    border-radius: 13px;
  }

  .macro-trend-modal__frame {
    width: 100%;
    height: calc(100dvh - 8px);
    max-height: calc(100dvh - 8px);
  }

  .macro-trend-modal__header h2 { font-size: 20px; }
  .macro-trend-modal__header-actions { gap: 5px; }
  .macro-trend-modal__source-link { padding: 6px 7px; }
  .macro-trend-modal__summary { gap: 7px; }
  .macro-trend-modal__metric { padding: 9px 10px; }
  .macro-trend-modal__metric strong { font-size: 13px; }
  .macro-trend-modal__coefficients { gap: 7px; }
  .macro-trend-modal__coefficient { padding: 10px; }
  .macro-trend-modal__strength-key { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .macro-trend-modal__canvas-wrap--primary { height: 245px; }
  .macro-trend-modal__canvas-wrap--strength,
  .macro-trend-modal__canvas-wrap--companion { height: 220px; }
}

/* Mobile viewport hardening. Wide analytical descendants keep their own local
 * horizontal scrollers; they must not enlarge the root layout viewport and make
 * the entire GSIDE page render at a desktop-like miniature scale. */
@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-x: clip;
  }

  body > .application-market-overview,
  body .app-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: 0;
    box-sizing: border-box;
  }

  body > .application-market-overview {
    padding-inline: 8px;
    overflow-x: hidden;
  }

  body > .application-market-overview .market-overview,
  body .app-shell > .app-topbar,
  body .app-shell > .market-main,
  body .app-shell > .app-main {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-inline: 0;
    box-sizing: border-box;
  }

  body .app-shell {
    padding: 14px 12px;
    overflow-x: hidden;
  }

  body .app-shell > .app-topbar {
    padding-right: 0;
    padding-left: 0;
  }

  body .app-shell > .market-main,
  body .app-shell > .app-main {
    padding-right: 0;
    padding-left: 0;
  }

  body .market-topbar__identity,
  body .market-topbar__workspace,
  body .market-topbar__operations,
  body .market-topbar__utility,
  body .market-system-status,
  body .market-system-status__content,
  body .market-header-lookup,
  body .app-account,
  body .market-nav {
    max-width: 100%;
    min-width: 0;
  }

  body .market-nav {
    width: 100%;
    margin: 0;
    column-gap: 16px;
    row-gap: 10px;
  }

  body .market-overview__content,
  body .market-overview__primary,
  body .market-overview__polynomial,
  body .market-overview__macro,
  body .market-overview__sectors,
  body .market-overview__scanner {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}


/* Macro charts use first-party SVG rendering instead of canvas sizing. This avoids
 * Chart.js dialog/canvas measurement failures on Safari while keeping the explorer
 * completely database-first. */
.macro-trend-modal__svg-surface {
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.macro-trend-modal__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.macro-trend-modal__svg text {
  user-select: none;
}

/* Bright macro explorer chart treatment — mirrors the high-contrast SPY intraday
 * explorer while keeping the macro modal database-only and SVG-rendered. */
.macro-trend-modal__chart-card {
  border-color: rgba(14, 165, 233, 0.30);
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,251,255,.98));
  box-shadow: 0 10px 30px rgba(15, 23, 42, .07), inset 0 1px rgba(255,255,255,.9);
}

.macro-trend-modal__chart-card--primary {
  border-top: 3px solid #00d4ff;
}

.macro-trend-modal__chart-card--strength {
  border-top: 3px solid #00e676;
}

.macro-trend-modal__chart-card--companion {
  border-top: 3px solid #ff9100;
}

.macro-trend-modal__chart-heading {
  padding: 12px 14px 2px;
}

.macro-trend-modal__chart-heading strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -.01em;
}

.macro-trend-modal__chart-heading span {
  color: #5f7188;
  font-size: 9px;
  font-weight: 650;
}

.macro-trend-modal__canvas-wrap {
  margin: 7px 10px 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, .20);
  border-radius: 12px;
  background: linear-gradient(135deg, #edfcff 0%, #f8f9ff 48%, #fff2f8 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.82), inset 0 12px 36px rgba(0,184,217,.035);
}

.macro-trend-modal__canvas-wrap--strength {
  background: linear-gradient(135deg, #effff6 0%, #ffffff 50%, #fff2f4 100%);
  border-color: rgba(0, 200, 83, .22);
}

.macro-trend-modal__canvas-wrap--companion {
  background: linear-gradient(135deg, #effff7 0%, #f1fbff 48%, #fff4ef 100%);
  border-color: rgba(255, 145, 0, .22);
}

.macro-trend-modal__svg-surface {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: 11px;
}

.macro-trend-modal__svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: saturate(1.13) contrast(1.02);
}

.macro-trend-modal__strength-key > div {
  border-color: rgba(14,165,233,.24);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(246,251,255,.94));
  box-shadow: 0 4px 12px rgba(15,23,42,.045);
}

.macro-trend-modal__strength-swatch {
  box-shadow: 0 0 10px currentColor;
}

.macro-trend-modal__coefficient {
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease, background 120ms ease;
}

.macro-trend-modal__coefficient:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 20px rgba(15,23,42,.07);
}

.macro-trend-modal__coefficient.is-active {
  background: linear-gradient(135deg, rgba(239,246,255,.98), rgba(255,255,255,.98));
  box-shadow: 0 0 0 2px rgba(0,102,255,.14), 0 10px 24px rgba(0,102,255,.09);
}

@media (max-width: 640px) {
  .macro-trend-modal__canvas-wrap {
    margin-right: 0;
    margin-left: 0;
  }
}


/* Sign-aware macro strength key. Percentile remains the strength metric; each
 * swatch shows the positive and negative color families meeting at yellow zero. */
.macro-trend-modal__strength-key > div {
  --macro-strength-positive: #d5ea00;
  --macro-strength-negative: #ffb300;
  box-shadow: none;
}

.macro-trend-modal__strength-key > div:nth-child(1) {
  --macro-strength-positive: #00e676;
  --macro-strength-negative: #ff1744;
}
.macro-trend-modal__strength-key > div:nth-child(2) {
  --macro-strength-positive: #64dd17;
  --macro-strength-negative: #ff3d00;
}
.macro-trend-modal__strength-key > div:nth-child(3) {
  --macro-strength-positive: #aeea00;
  --macro-strength-negative: #ff9100;
}
.macro-trend-modal__strength-key > div:nth-child(4) {
  --macro-strength-positive: #d5ea00;
  --macro-strength-negative: #ffb300;
}

.macro-trend-modal__strength-swatch,
.macro-trend-modal__strength-swatch--very-strong,
.macro-trend-modal__strength-swatch--strong,
.macro-trend-modal__strength-swatch--moderate,
.macro-trend-modal__strength-swatch--mild {
  background: linear-gradient(180deg, var(--macro-strength-positive) 0%, #ffd600 50%, var(--macro-strength-negative) 100%);
  box-shadow: 0 -3px 10px color-mix(in srgb, var(--macro-strength-positive) 40%, transparent),
              0 3px 10px color-mix(in srgb, var(--macro-strength-negative) 40%, transparent);
}

/* Phone console polish: compact the global shell without removing operational data.
 * Navigation and status lanes become touch-scrollable, stock pages avoid a duplicate
 * global ticker field, and the market overview uses larger snap-scrolling cards. */
@media (max-width: 640px) {
  body .app-shell {
    padding: 10px 12px max(28px, env(safe-area-inset-bottom));
  }

  body .app-shell > .app-topbar.market-topbar {
    min-height: 0;
    gap: 10px;
    padding: 0 0 12px;
  }

  body .market-topbar__identity {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  body .market-brand-link {
    width: max-content;
    max-width: 100%;
  }

  body .market-topbar__identity .gside-logo {
    gap: 9px;
  }

  body .market-topbar__identity .gside-logo__mark {
    width: 44px;
    height: 44px;
  }

  body .market-topbar__identity .gside-logo__name {
    font-size: 16px;
    letter-spacing: 0.075em;
  }

  body .market-topbar__identity .gside-logo__capital {
    margin-top: 4px;
    font-size: 7px;
    letter-spacing: 0.25em;
  }

  body .market-topbar__identity .market-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 1px 0 3px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body .market-topbar__identity .market-nav::-webkit-scrollbar {
    display: none;
  }

  body .market-topbar__identity .market-nav__link,
  body .market-topbar__identity .market-nav__link:visited {
    flex: 0 0 auto;
    min-height: 31px;
    padding: 7px 10px;
    border: 1px solid var(--gside-border);
    border-radius: 999px;
    background: var(--gside-surface);
    color: var(--gside-muted);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.15;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  body .market-topbar__identity .market-nav__link[aria-current="page"] {
    border-color: #b9e2ed;
    background: #eef9fc;
    color: #0d7089;
  }

  body .market-topbar__workspace {
    display: grid;
    width: 100%;
    gap: 8px;
    justify-items: stretch;
  }

  body .market-topbar__utility {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    width: 100%;
  }

  body .market-header-lookup {
    width: 100%;
    min-width: 0;
  }

  body .market-header-lookup__field {
    grid-template-columns: minmax(0, 1fr) 40px;
    border-radius: 10px;
  }

  body .market-header-lookup__input {
    height: 40px;
    padding-inline: 12px;
    font-size: 12px;
  }

  body .market-header-lookup__button {
    width: 40px;
    height: 40px;
  }

  body .market-topbar__utility .app-account {
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 0;
  }

  body .market-topbar__utility .app-account__email {
    display: none;
  }

  body .market-topbar__utility .app-sign-out {
    min-height: 40px;
    padding: 8px 10px;
    border-color: var(--gside-border-strong);
    border-radius: 10px;
    font-size: 11px;
  }

  body .market-topbar__workspace .market-topbar__operations {
    order: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
  }

  body .market-system-status {
    min-width: 0;
    overflow: hidden;
  }

  body .market-system-status__content {
    display: flex;
    width: 100%;
    min-width: 0;
    padding: 1px 0 2px;
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body .market-system-status__content::-webkit-scrollbar {
    display: none;
  }

  body .market-system-status__item {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 5px 8px;
    gap: 5px;
    font-size: 9px;
  }

  body .market-system-status__beacon {
    width: 6px;
    height: 6px;
  }

  body .market-settings-button {
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 9px;
    font-size: 10px;
  }

  body .market-topbar--stock-workspace .market-header-lookup {
    display: none;
  }

  body .market-topbar--stock-workspace .market-topbar__utility {
    grid-template-columns: 1fr;
    justify-items: end;
  }

  body .market-topbar--stock-workspace .market-topbar__utility .app-account {
    width: auto;
  }

  body > .application-market-overview {
    padding-inline: 0;
  }

  body > .application-market-overview .market-overview {
    padding: 5px 0 7px;
  }

  body .market-overview__primary {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  body .market-overview__benchmark {
    padding: 7px 10px;
  }

  body .market-overview__benchmark-symbol {
    font-size: 13px;
  }

  body .market-overview__benchmark-quote > strong {
    font-size: 14px;
  }

  body .market-overview__change {
    font-size: 10px;
  }

  body .market-overview__range {
    min-width: 30px;
    min-height: 28px;
    font-size: 10px;
  }

  body .market-overview__chart {
    padding: 5px 10px 4px;
  }

  body .market-overview__chart svg {
    height: 50px;
  }

  body .market-overview__conditions {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  body .market-overview__conditions::-webkit-scrollbar {
    display: none;
  }

  body .market-overview__metric {
    flex: 0 0 116px;
    padding: 7px 9px;
    scroll-snap-align: start;
  }

  body .market-overview__metric span {
    font-size: 8.5px;
  }

  body .market-overview__metric strong {
    font-size: 11px;
  }

  body .market-overview__metric small {
    font-size: 8px;
  }

  body .market-overview__polynomial {
    padding: 6px 8px;
  }

  body .market-overview__polynomial-track {
    grid-template-columns: repeat(3, 168px);
    gap: 6px;
  }

  body .market-overview__polynomial-item {
    padding: 4px 6px;
  }

  body .market-overview__macro {
    padding: 7px 8px 8px;
  }

  body .market-overview__macro-heading {
    align-items: center;
  }

  body .market-overview__macro-track {
    grid-template-columns: repeat(8, 156px);
    gap: 6px;
  }

  body .market-overview__macro-card {
    padding: 6px 7px;
  }

  body .market-overview__sectors,
  body .market-overview__scanner {
    width: auto;
    max-width: none;
    margin-right: 8px;
    margin-left: 8px;
  }

  body .market-overview__sector-track {
    grid-template-columns: repeat(11, 80px);
  }

  body .market-overview__sector {
    min-width: 80px;
    min-height: 30px;
    font-size: 10px;
  }

  body .market-overview__scanner {
    margin-top: 6px;
  }

  body .market-overview__scanner > summary {
    min-height: 30px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 10px;
  }

  body .app-shell > .market-main,
  body .app-shell > .app-main {
    padding-top: 16px;
    padding-bottom: max(40px, calc(24px + env(safe-area-inset-bottom)));
  }

  body .market-symbol-navigation {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 14px;
  }

  body .market-symbol-navigation > .market-text-link {
    width: max-content;
    margin: 0;
    font-size: 11px;
  }

  body .market-inline-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    max-width: none;
    gap: 8px;
  }

  body .market-inline-search .market-input,
  body .market-inline-search .market-button {
    min-height: 40px;
  }

  body .market-inline-search .market-input {
    min-width: 0;
    font-size: 13px;
  }

  body .market-inline-search .market-button {
    padding: 8px 12px;
  }

  body .intraday-band-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  body .intraday-band-page-actions .market-button {
    min-width: 0;
    padding: 8px 9px;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 390px) {
  body .market-topbar__identity .market-nav__link,
  body .market-topbar__identity .market-nav__link:visited {
    padding-right: 9px;
    padding-left: 9px;
    font-size: 10px;
  }

  body .market-overview__metric {
    flex-basis: 110px;
  }

  body .market-overview__polynomial-track {
    grid-template-columns: repeat(3, 160px);
  }

  body .market-overview__macro-track {
    grid-template-columns: repeat(8, 150px);
  }
}


/* Sector implications — appended to the 20260920-155318 context. The SVG charts,
 * SPY palette and the complete phone-console polish above are retained. */
.macro-trend-modal__sector-section {
  min-width: 0;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dbe4ee;
  border-top: 3px solid #00b8d9;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: none;
}
.macro-trend-modal__sector-section[hidden],
.macro-trend-modal__sector-columns[hidden] { display: none !important; }
.macro-trend-modal__sector-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.macro-trend-modal__sector-heading > div { min-width: 0; }
.macro-trend-modal__sector-kicker {
  margin: 0 0 5px;
  color: #0e7490;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.macro-trend-modal__sector-heading strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.macro-trend-modal__sector-badge {
  flex: none;
  padding: 5px 8px;
  border: 1px solid #bae6fd;
  border-radius: 999px;
  background: #f0f9ff;
  color: #0e7490;
  font-size: 9px;
  font-weight: 750;
}
.macro-trend-modal__sector-summary {
  margin: 10px 0 8px;
  color: #475569;
  font-size: 11px;
  line-height: 1.6;
}
.macro-trend-modal__sector-timing {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.macro-trend-modal__sector-timing[data-status="partial"],
.macro-trend-modal__sector-timing[data-status="unavailable"] { color: #a16207; }
.macro-trend-modal__sector-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.macro-trend-modal__sector-column { min-width: 0; }
.macro-trend-modal__sector-column-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: #334155;
  font-size: 11px;
}
.macro-trend-modal__sector-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.macro-trend-modal__sector-column--tailwind .macro-trend-modal__sector-dot {
  background: #00e676;
  box-shadow: 0 0 7px rgba(0, 230, 118, .32);
}
.macro-trend-modal__sector-column--headwind .macro-trend-modal__sector-dot {
  background: #ff6d00;
  box-shadow: 0 0 7px rgba(255, 109, 0, .28);
}
.macro-trend-modal__sector-list { display: grid; gap: 8px; min-width: 0; }
.macro-trend-modal__sector-card {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #00c853;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
}
.macro-trend-modal__sector-card--headwind { border-left-color: #ff6d00; }
.macro-trend-modal__sector-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.macro-trend-modal__sector-card-heading > div { min-width: 0; }
.macro-trend-modal__sector-card-heading > div > strong,
.macro-trend-modal__sector-card-heading a {
  color: #0369a1;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}
.macro-trend-modal__sector-card-heading a:hover { text-decoration: underline; }
.macro-trend-modal__sector-card-heading a:focus-visible { outline: 2px solid #00b8d9; outline-offset: 3px; }
.macro-trend-modal__sector-card-heading > div > span {
  display: inline-block;
  margin-left: 8px;
  color: #64748b;
  font-size: 10px;
}
.macro-trend-modal__sector-tilt {
  padding: 4px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 9px;
  font-weight: 750;
}
.macro-trend-modal__sector-card--headwind .macro-trend-modal__sector-tilt {
  background: #fff7ed;
  color: #c2410c;
}
.macro-trend-modal__sector-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.macro-trend-modal__sector-card-metrics > div { min-width: 0; }
.macro-trend-modal__sector-card-metrics span {
  display: block;
  color: #64748b;
  font-size: 9px;
  line-height: 1.4;
}
.macro-trend-modal__sector-card-metrics strong {
  display: block;
  margin-top: 3px;
  color: #334155;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.macro-trend-modal__sector-card-metrics strong.is-confirming { color: #047857; }
.macro-trend-modal__sector-card-metrics strong.is-diverging { color: #c2410c; }
.macro-trend-modal__sector-card-metrics strong.is-no-market-read { color: #64748b; }
.macro-trend-modal__sector-card-note {
  margin: 8px 0 0;
  color: #a16207;
  font-size: 9px;
  line-height: 1.5;
}
.macro-trend-modal__sector-caveat {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-size: 10px;
  line-height: 1.6;
}
.macro-trend-modal__sector-caveat:empty { display: none; }
.macro-trend-modal__sector-method {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 9px;
  line-height: 1.6;
}
.macro-trend-modal__sector-empty {
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
}
@media (max-width: 720px) {
  .macro-trend-modal__sector-section { padding: 12px; }
  .macro-trend-modal__sector-heading { flex-direction: column; gap: 7px; }
  .macro-trend-modal__sector-columns { grid-template-columns: minmax(0, 1fr); }
  .macro-trend-modal__sector-card { padding: 10px; }
  .macro-trend-modal__sector-card-heading > div > span { display: block; margin: 3px 0 0; }
}


/* Yahoo ^TNX / Massive source selector for the 10Y macro explorer. */
.macro-trend-modal__toolbar {
  grid-template-columns: auto minmax(0, 1fr) auto minmax(190px, auto);
}

.macro-trend-modal__sources {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

.macro-trend-modal__source-tab {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.macro-trend-modal__source-tab:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.macro-trend-modal__source-tab.is-active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #0057d9;
}

.macro-trend-modal__source-tab:disabled {
  cursor: not-allowed;
  opacity: .45;
}

@media (max-width: 900px) {
  .macro-trend-modal__toolbar { grid-template-columns: 1fr; }
  .macro-trend-modal__sources { width: 100%; }
}

@media (max-width: 640px) {
  .macro-trend-modal__source-tab { flex: 1 1 auto; }
}

/* Site data-health inventory: show every monitored feed/dataset instead of a
 * single synthetic row. The dialog remains read-only; provider calls happen in
 * background collectors, never from this UI. */
.header-health-modal {
  width: min(97vw, 1320px);
}

.header-health-modal__status {
  padding: 2px 2px 8px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.45;
}

.header-health-modal__checks {
  gap: 12px;
  margin-top: 0;
}

.header-health-modal__group {
  overflow: hidden;
  border: 1px solid #dfe7ef;
  border-radius: 14px;
  background: #ffffff;
}

.header-health-modal__group-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  background: #f8fafc;
}

.header-health-modal__group-heading strong,
.header-health-modal__group-heading span {
  display: block;
}

.header-health-modal__group-heading strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 850;
}

.header-health-modal__group-heading div > span {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 8.5px;
  line-height: 1.35;
}

.header-health-modal__group-count {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.header-health-modal__group-rows {
  display: grid;
}

.header-health-modal__group-rows .header-health-modal__check {
  border: 0;
  border-left: 4px solid #94a3b8;
  border-radius: 0;
  box-shadow: inset 0 -1px #edf2f7;
}

.header-health-modal__group-rows .header-health-modal__check:last-child {
  box-shadow: none;
}

.header-health-modal__group-rows .header-health-modal__check--healthy { border-left-color: #16a34a; }
.header-health-modal__group-rows .header-health-modal__check--warning { border-left-color: #f59e0b; }
.header-health-modal__group-rows .header-health-modal__check--error { border-left-color: #e11d48; }

.header-health-modal__check {
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, .85fr);
  gap: 16px;
  padding: 12px 14px;
}

.header-health-modal__check-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.header-health-modal__check-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.header-health-modal__check-heading strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-health-modal__badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.header-health-modal__badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 7.5px;
  font-weight: 850;
  letter-spacing: .035em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-health-modal__badge--status-healthy {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.header-health-modal__badge--status-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.header-health-modal__badge--status-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.header-health-modal__badge--mode-live {
  border-color: #a5f3fc;
  background: #ecfeff;
  color: #0e7490;
}

.header-health-modal__badge--mode-daily {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.header-health-modal__badge--mode-periodic {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.header-health-modal__badge--mode-scheduler,
.header-health-modal__badge--mode-storage,
.header-health-modal__badge--mode-derived {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.header-health-modal__badge--optional {
  border-style: dashed;
  color: #64748b;
}

.header-health-modal__source-line {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  margin: 5px 0 0 16px;
}

.header-health-modal__source-line > span {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 8.5px;
  font-weight: 750;
}

.header-health-modal__source-line code {
  min-width: 0;
  overflow: hidden;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-health-modal__check-main p {
  margin: 5px 0 0 16px;
}

.header-health-modal__check-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.header-health-modal__check-meta dd {
  line-height: 1.35;
}

.header-health-modal__empty {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 980px) {
  .header-health-modal__check {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-health-modal__group-heading,
  .header-health-modal__check-top,
  .header-health-modal__source-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-health-modal__badges {
    justify-content: flex-start;
  }

  .header-health-modal__source-line {
    gap: 3px;
    margin-left: 16px;
  }

  .header-health-modal__source-line code {
    max-width: 100%;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .header-health-modal__check-meta {
    grid-template-columns: 1fr;
  }
}

