/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  color-scheme: light;
  --gside-bg: #f7f9fb;
  --gside-surface: #ffffff;
  --gside-surface-subtle: #f2f5f8;
  --gside-text: #102031;
  --gside-muted: #667587;
  --gside-faint: #94a1af;
  --gside-border: #dce3e9;
  --gside-border-strong: #c8d3dc;
  --gside-accent: #1195b6;
  --gside-accent-dark: #0d7f9a;
  --gside-focus: rgba(17, 149, 182, 0.16);
  --gside-danger: #b42318;
  --gside-danger-soft: #fff1f0;
  --gside-success: #287a53;
  --gside-success-soft: #edf8f2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--gside-bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--gside-text);
  background:
    radial-gradient(circle at top left, rgba(17, 149, 182, 0.06), transparent 28rem),
    var(--gside-bg);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

a {
  color: var(--gside-accent);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(16, 32, 49, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 32, 49, 0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.auth-panel {
  width: min(100%, 430px);
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.gside-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gside-text);
  text-decoration: none;
}

.gside-logo__mark {
  width: 72px;
  height: 72px;
  flex: none;
  color: var(--gside-accent);
}

.gside-logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.gside-logo__name {
  color: var(--gside-text);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

.gside-logo__capital {
  margin-top: 7px;
  color: var(--gside-muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.28em;
}

.auth-card {
  padding: 30px;
  background: var(--gside-surface);
  border: 1px solid var(--gside-border);
  border-radius: 16px;
  box-shadow:
    0 1px 2px rgba(16, 32, 49, 0.04),
    0 18px 40px rgba(16, 32, 49, 0.06);
}

.auth-header {
  margin-bottom: 26px;
}

.auth-eyebrow {
  margin: 0 0 8px;
  color: var(--gside-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.auth-subtitle {
  margin: 8px 0 0;
  color: var(--gside-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-flash {
  margin: 0 0 20px;
  padding: 11px 12px;
  border: 1px solid var(--gside-border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.auth-flash--alert {
  color: var(--gside-danger);
  background: var(--gside-danger-soft);
  border-color: #f0c7c2;
}

.auth-flash--notice {
  color: var(--gside-success);
  background: var(--gside-success-soft);
  border-color: #cce8d9;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-label {
  color: var(--gside-text);
  font-size: 12px;
  font-weight: 650;
}

.auth-input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--gside-text);
  background: var(--gside-surface);
  border: 1px solid var(--gside-border-strong);
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.auth-input::placeholder {
  color: var(--gside-faint);
}

.auth-input:hover {
  border-color: #aebcc7;
}

.auth-input:focus {
  border-color: var(--gside-accent);
  box-shadow: 0 0 0 3px var(--gside-focus);
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 2px;
  border: 1px solid var(--gside-accent);
  border-radius: 8px;
  color: #ffffff;
  background: var(--gside-accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    transform 80ms ease;
}

.auth-submit:hover {
  background: var(--gside-accent-dark);
  border-color: var(--gside-accent-dark);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-meta {
  margin: 18px 0 0;
  color: var(--gside-faint);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.app-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 4px 20px;
  border-bottom: 1px solid var(--gside-border);
}

.app-topbar .gside-logo__mark {
  width: 58px;
  height: 58px;
}

.app-account {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-account__email {
  color: var(--gside-muted);
  font-size: 12px;
}

.app-sign-out {
  padding: 8px 11px;
  border: 1px solid var(--gside-border);
  border-radius: 7px;
  color: var(--gside-text);
  background: var(--gside-surface);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.app-sign-out:hover {
  border-color: var(--gside-border-strong);
  background: var(--gside-surface-subtle);
}

.app-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px 4px;
}

.app-kicker {
  margin: 0 0 10px;
  color: var(--gside-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-title {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 680;
  letter-spacing: -0.04em;
}

.app-copy {
  max-width: 620px;
  margin: 14px 0 0;
  color: var(--gside-muted);
  font-size: 15px;
  line-height: 1.65;
}




@media (max-width: 640px) {
  .auth-shell {
    padding: 24px 16px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .gside-logo__mark {
    width: 64px;
    height: 64px;
  }

  .gside-logo__name {
    letter-spacing: 0.06em;
  }

  .gside-logo__capital {
    letter-spacing: 0.24em;
  }

  .app-shell {
    padding: 16px;
  }

  .app-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-account {
    width: 100%;
    justify-content: space-between;
  }
}

/* Compact global market pulse. All component rules are scoped to its layout wrapper. */
.application-market-pulse {
  padding-inline: 24px;
  border-bottom: 1px solid var(--gside-border);
  background: var(--gside-surface);
  color: var(--gside-text);
  font-family: inherit;
}

.application-market-pulse .market-pulse {
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  margin-inline: auto;
  padding: 3px 4px;
  font-family: inherit;
  font-size: 0.6875rem;
  line-height: 1.45;
}

.application-market-pulse .market-pulse__row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.application-market-pulse .market-pulse__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  color: var(--gside-muted);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.application-market-pulse .market-pulse__sigma-label {
  font-size: 0.8125rem;
  line-height: 1;
  text-transform: none;
}

.application-market-pulse .market-pulse__viewport {
  min-width: 0;
  overflow-x: auto;
  border-radius: 4px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gside-border-strong) transparent;
  -webkit-overflow-scrolling: touch;
}

.application-market-pulse .market-pulse__track {
  display: flex;
  align-items: center;
  gap: 2px;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.application-market-pulse .market-pulse__entry {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
}

.application-market-pulse .market-pulse__entry--split {
  margin-left: 4px;
  padding-left: 7px;
  border-left: 1px solid var(--gside-border);
}

.application-market-pulse .market-pulse__item,
.application-market-pulse .market-pulse__item:visited {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding-inline: 2px;
  border-radius: 4px;
  background: transparent;
  color: var(--gside-text);
  font: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease;
}

.application-market-pulse .market-pulse__symbol {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--gside-border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.application-market-pulse .market-pulse__item:hover {
  background: var(--gside-surface-subtle);
}

.application-market-pulse .market-pulse__item:hover .market-pulse__symbol,
.application-market-pulse .market-pulse__item:focus-visible .market-pulse__symbol {
  color: var(--gside-accent-dark);
  text-decoration-color: currentColor;
}

.application-market-pulse .market-pulse__item:focus-visible,
.application-market-pulse .market-pulse__viewport:focus-visible {
  outline: 2px solid var(--gside-accent-dark);
  outline-offset: -2px;
}

.application-market-pulse .market-pulse__value {
  display: inline-block;
  padding: 1px 1px;
  border-radius: 3px;
  font-size: inherit;
  font-weight: 650;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
  line-height: 1.4;
  white-space: nowrap;
}

.application-market-pulse .market-pulse__value--negative {
  color: var(--gside-danger);
}

.application-market-pulse .market-pulse__value--positive {
  color: var(--gside-success);
}

.application-market-pulse .market-pulse__value--neutral {
  color: var(--gside-muted);
}

/* Preserve the existing >=97% threshold, with a quiet badge instead of a glow. */
.application-market-pulse .market-pulse__value--glow {
  background: var(--gside-success-soft);
  color: var(--gside-success);
  text-shadow: none;
  animation: none;
}

.application-market-pulse .market-pulse__empty {
  display: flex;
  align-items: center;
  min-height: 48px;
  color: var(--gside-muted);
  font-size: inherit;
}

.application-market-pulse .market-pulse__empty--row {
  min-height: 24px;
}

.application-market-pulse .market-pulse__status {
  margin-top: 3px;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--gside-danger-soft);
  color: var(--gside-danger);
  font-size: inherit;
}

.application-market-pulse [hidden] {
  display: none !important;
}

@media (min-width: 900px) {
  .application-market-pulse {
    padding-inline: 12px;
  }

  .application-market-pulse .market-pulse {
    max-width: none;
    padding: 2px 0;
    font-size: clamp(0.5rem, 0.8vw, 0.625rem);
    line-height: 1.3;
  }

  .application-market-pulse .market-pulse__row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 4px;
  }

  .application-market-pulse .market-pulse__label {
    min-height: 20px;
    gap: 3px;
    font-size: clamp(0.48rem, 0.72vw, 0.5625rem);
    letter-spacing: 0.025em;
  }

  .application-market-pulse .market-pulse__sigma-label {
    font-size: 0.6875rem;
  }

  .application-market-pulse .market-pulse__viewport {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .application-market-pulse .market-pulse__viewport::-webkit-scrollbar {
    display: none;
  }

  .application-market-pulse .market-pulse__track {
    width: 100%;
    min-width: 0;
    gap: 0;
    justify-content: space-between;
  }

  .application-market-pulse .market-pulse__entry--split {
    margin-left: 2px;
    padding-left: 4px;
  }

  .application-market-pulse .market-pulse__item,
  .application-market-pulse .market-pulse__item:visited {
    min-height: 20px;
    gap: 2px;
    padding-inline: 1px;
  }
}

@media (max-width: 640px) {
  .application-market-pulse {
    padding-inline: 16px;
  }

  .application-market-pulse .market-pulse {
    font-size: 0.75rem;
  }

  .application-market-pulse .market-pulse__item,
  .application-market-pulse .market-pulse__label {
    min-height: 28px;
  }

  .application-market-pulse .market-pulse__empty {
    min-height: 56px;
  }

  .application-market-pulse .market-pulse__empty--row {
    min-height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .application-market-pulse .market-pulse__item {
    transition: none;
  }
}

/* System-wide trading controls and live header beacons. */
.market-topbar__operations {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.market-system-status__content {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.market-system-status__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--gside-border);
  border-radius: 999px;
  background: var(--gside-surface);
  color: var(--gside-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.market-system-status__beacon {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gside-faint);
}

.market-system-status__item.is-on {
  border-color: #cce8d9;
  background: var(--gside-success-soft);
  color: var(--gside-success);
}

.market-system-status__item.is-on .market-system-status__beacon {
  background: #16a36a;
  box-shadow: 0 0 0 3px rgba(22, 163, 106, 0.12), 0 0 10px rgba(22, 163, 106, 0.34);
  animation: market-system-beacon 1.8s ease-in-out infinite;
}

.market-settings-button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--gside-border-strong);
  border-radius: 7px;
  background: var(--gside-surface);
  color: var(--gside-text);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.market-settings-button:hover {
  background: var(--gside-surface-subtle);
}

.market-settings-button:focus-visible {
  outline: 3px solid var(--gside-focus);
  outline-offset: 2px;
}

.system-settings-dialog {
  width: min(94vw, 680px);
  max-height: min(90vh, 820px);
  max-height: min(90dvh, 820px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--gside-border-strong);
  border-radius: 16px;
  background: var(--gside-surface);
  color: var(--gside-text);
  box-shadow: 0 30px 90px rgba(16, 32, 49, 0.24);
}

.system-settings-dialog::backdrop {
  background: rgba(16, 32, 49, 0.46);
  backdrop-filter: blur(2px);
}

.system-settings-dialog__form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: min(90vh, 820px);
  height: min(90dvh, 820px);
  max-height: min(90vh, 820px);
  max-height: min(90dvh, 820px);
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.system-settings-dialog__header,
.system-settings-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--gside-surface);
}

.system-settings-dialog__header {
  border-bottom: 1px solid var(--gside-border);
}

.system-settings-dialog__header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: -0.025em;
}

.system-settings-dialog__header p {
  margin: 5px 0 0;
  color: var(--gside-muted);
  font-size: 11px;
  line-height: 1.45;
}

.system-settings-dialog__close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--gside-muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.system-settings-dialog__close:hover {
  border-color: var(--gside-border);
  background: var(--gside-surface-subtle);
  color: var(--gside-text);
}

.system-settings-dialog__body {
  display: grid;
  gap: 18px;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.system-settings-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--gside-border);
  border-radius: 12px;
  background: #fbfcfd;
}

.system-settings-section__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.system-settings-section__heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.system-settings-section__heading p {
  margin: 4px 0 0;
  color: var(--gside-muted);
  font-size: 11px;
  line-height: 1.5;
}

.system-settings-permissions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.system-settings-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--gside-border);
  border-radius: 10px;
  background: var(--gside-surface);
  cursor: pointer;
}

.system-settings-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.system-settings-toggle__track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d5dde4;
  transition: background-color 120ms ease;
}

.system-settings-toggle__track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 32, 49, 0.24);
  content: "";
  transition: transform 120ms ease;
}

.system-settings-toggle__input:checked + .system-settings-toggle__track {
  background: var(--gside-success);
}

.system-settings-toggle__input:checked + .system-settings-toggle__track::after {
  transform: translateX(16px);
}

.system-settings-toggle__input:focus-visible + .system-settings-toggle__track {
  outline: 3px solid var(--gside-focus);
  outline-offset: 2px;
}

.system-settings-toggle__copy strong,
.system-settings-toggle__copy small {
  display: block;
}

.system-settings-toggle__copy strong {
  font-size: 12px;
}

.system-settings-toggle__copy small {
  margin-top: 4px;
  color: var(--gside-muted);
  font-size: 10px;
  line-height: 1.4;
}

.system-settings-position-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.system-settings-position-input {
  position: relative;
}

.system-settings-position-input::before {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--gside-muted);
  content: "$";
  transform: translateY(-50%);
}

.system-settings-position-input .market-input {
  padding-left: 27px;
  font-variant-numeric: tabular-nums;
}

.system-settings-quick-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.system-settings-quick-button {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #b9e2ed;
  border-radius: 7px;
  background: #eef9fc;
  color: #17556a;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.system-settings-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.system-settings-time-field {
  display: grid;
  gap: 6px;
}

.system-settings-time-field__selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.system-settings-time-field select {
  min-width: 0;
}

.system-settings-dialog__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--gside-border);
}

@keyframes market-system-beacon {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

@media (max-width: 900px) {
  .market-topbar__operations {
    order: 3;
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .market-topbar__operations {
    align-items: flex-start;
    flex-direction: column;
  }

  .market-system-status__content {
    width: 100%;
  }

  .system-settings-permissions,
  .system-settings-time-grid,
  .system-settings-position-field {
    grid-template-columns: 1fr;
  }

  .system-settings-dialog__header,
  .system-settings-dialog__footer,
  .system-settings-dialog__body {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-system-status__item.is-on .market-system-status__beacon {
    animation: none;
  }

  .system-settings-toggle__track,
  .system-settings-toggle__track::after {
    transition: none;
  }
}

/* Global market context header. Data hydrates after first paint from local saved data. */
.application-market-overview {
  padding: 0 18px;
  background: #fbfcfd;
}

.application-market-overview .market-overview {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 8px 0;
}

.market-overview__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.market-overview__toolbar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.market-overview__lookup {
  flex: 0 0 178px;
  align-self: flex-start;
  margin: 0;
}

.market-overview__lookup-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  overflow: hidden;
  border: 1px solid var(--gside-border-strong);
  border-radius: 8px;
  background: var(--gside-surface);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.market-overview__lookup-field:focus-within {
  border-color: var(--gside-accent);
  box-shadow: 0 0 0 3px var(--gside-focus);
}

.market-overview__lookup-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gside-text);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.market-overview__lookup-input::placeholder {
  color: var(--gside-faint);
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

.market-overview__lookup-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--gside-border);
  background: var(--gside-surface-subtle);
  color: var(--gside-muted);
  cursor: pointer;
}

.market-overview__lookup-button:hover {
  background: #eaf6f9;
  color: var(--gside-accent-dark);
}

.market-overview__lookup-button:focus-visible {
  outline: 2px solid var(--gside-accent-dark);
  outline-offset: -3px;
}

.market-overview__lookup-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.market-overview__lookup-status {
  display: block;
  min-height: 13px;
  padding: 3px 2px 0;
  color: var(--gside-danger);
  font-size: 9px;
  line-height: 1.25;
}

.market-overview__content {
  flex: 1 1 auto;
  min-width: 0;
}

.market-overview__content--loading {
  display: flex;
  align-items: center;
  min-height: 47px;
  gap: 10px;
  color: var(--gside-muted);
  font-size: 10px;
}

.market-overview__skeleton {
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  min-width: 0;
}

.market-overview__skeleton span {
  display: block;
  height: 34px;
  flex: 1 1 100px;
  border: 1px solid #e8edf1;
  border-radius: 7px;
  background: linear-gradient(90deg, #f5f7f9, #fbfcfd, #f5f7f9);
}

.market-overview__skeleton span:nth-child(2) { flex-grow: 2.4; }
.market-overview__skeleton span:nth-child(5) { flex-grow: 1.4; }
.market-overview__loading-copy { flex: 0 0 auto; white-space: nowrap; }

.market-overview__primary {
  display: grid;
  grid-template-columns: 190px minmax(220px, 1fr) minmax(430px, auto);
  align-items: stretch;
  min-width: 0;
  border: 1px solid var(--gside-border);
  border-radius: 9px;
  background: var(--gside-surface);
}

.market-overview__benchmark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-right: 1px solid var(--gside-border);
}

.market-overview__benchmark-quote {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 1px 7px;
  min-width: 0;
}

.market-overview__benchmark-symbol {
  grid-row: span 2;
  align-self: center;
  color: var(--gside-text);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.market-overview__benchmark-symbol:hover { color: var(--gside-accent-dark); }
.market-overview__benchmark-quote > strong {
  color: var(--gside-text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.market-overview__change {
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-overview__change--positive { color: var(--gside-success); }
.market-overview__change--negative { color: var(--gside-danger); }
.market-overview__change--neutral { color: var(--gside-muted); }

.market-overview__ranges {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.market-overview__range {
  min-width: 25px;
  min-height: 25px;
  padding: 3px 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--gside-faint);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 750;
}

.market-overview__range:hover { background: var(--gside-surface-subtle); color: var(--gside-text); }
.market-overview__range.is-active { background: #eaf6f9; color: #0c647b; }
.market-overview__range:focus-visible { outline: 2px solid var(--gside-accent-dark); outline-offset: 1px; }

.market-overview__chart {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 4px 10px 3px;
  overflow: hidden;
  border-right: 1px solid var(--gside-border);
}

.market-overview__chart svg {
  display: block;
  width: 100%;
  height: 36px;
  overflow: visible;
}

.market-overview__chart-line {
  fill: none;
  stroke: var(--gside-accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.market-overview__chart-line--positive { stroke: var(--gside-success); }
.market-overview__chart-line--negative { stroke: var(--gside-danger); }
.market-overview__chart-area { fill: rgba(17, 149, 182, 0.06); stroke: none; }
.market-overview__chart-area--positive { fill: rgba(40, 122, 83, 0.06); }
.market-overview__chart-area--negative { fill: rgba(180, 35, 24, 0.055); }

.market-overview__chart-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 1px;
  color: var(--gside-faint);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-overview__chart-meta span:nth-child(2) { color: var(--gside-muted); }
.market-overview__chart-empty {
  align-self: center;
  color: var(--gside-faint);
  font-size: 10px;
  text-align: center;
}

.market-overview__conditions {
  display: grid;
  grid-template-columns: repeat(5, minmax(68px, 1fr));
  min-width: 0;
}

.market-overview__metric {
  min-width: 0;
  padding: 6px 8px;
  border-right: 1px solid #edf1f4;
}

.market-overview__metric:last-child { border-right: 0; }
.market-overview__metric span,
.market-overview__metric strong,
.market-overview__metric small { display: block; }
.market-overview__metric span {
  overflow: hidden;
  color: var(--gside-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.market-overview__metric strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--gside-text);
  font-size: 10px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-overview__metric small {
  margin-top: 1px;
  overflow: hidden;
  color: var(--gside-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-overview__metric--positive strong,
.market-overview__metric--positive small { color: var(--gside-success); }
.market-overview__metric--negative strong,
.market-overview__metric--negative small { color: var(--gside-danger); }

.market-overview__sectors {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  min-width: 0;
}

.market-overview__section-label {
  color: var(--gside-muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.market-overview__sector-track {
  display: grid;
  grid-template-columns: repeat(11, minmax(66px, 1fr));
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--gside-border);
  border-radius: 7px;
  background: var(--gside-surface);
  scrollbar-width: none;
}
.market-overview__sector-track::-webkit-scrollbar { display: none; }

.market-overview__sector,
.market-overview__sector:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 66px;
  min-height: 25px;
  padding: 4px 5px;
  border-right: 1px solid #edf1f4;
  color: var(--gside-text);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.market-overview__sector:last-child { border-right: 0; }
.market-overview__sector:hover { background: var(--gside-surface-subtle); }
.market-overview__sector:focus-visible { outline: 2px solid var(--gside-accent-dark); outline-offset: -2px; }

.market-overview__scanner {
  margin: 5px 0 0 53px;
  overflow: hidden;
  border: 1px solid var(--gside-border);
  border-radius: 7px;
  background: var(--gside-surface);
}

.market-overview__scanner > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 25px;
  padding: 4px 8px;
  color: var(--gside-muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  list-style: none;
}
.market-overview__scanner > summary::-webkit-details-marker { display: none; }
.market-overview__scanner > summary span { color: var(--gside-faint); font-weight: 550; }
.market-overview__scanner[open] > summary { border-bottom: 1px solid var(--gside-border); }
.market-overview__scanner-content > span {
  display: block;
  padding: 7px 9px;
  color: var(--gside-faint);
  font-size: 9px;
}
.market-overview__scanner .market-pulse { max-width: none; padding: 3px 7px 5px; }

.market-overview__unavailable {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 47px;
  padding: 8px 10px;
  border: 1px solid var(--gside-border);
  border-radius: 8px;
  background: var(--gside-surface);
}
.market-overview__unavailable strong { font-size: 11px; }
.market-overview__unavailable span { color: var(--gside-muted); font-size: 10px; }

.market-overview__status {
  margin-top: 4px;
  color: var(--gside-danger);
  font-size: 9px;
}
.market-overview__status[hidden] { display: none !important; }

@media (max-width: 1280px) {
  .market-overview__primary {
    grid-template-columns: 190px minmax(220px, 1fr);
  }
  .market-overview__conditions {
    grid-column: 1 / -1;
    border-top: 1px solid var(--gside-border);
  }
  .market-overview__metric { padding-top: 5px; padding-bottom: 5px; }
}

@media (max-width: 900px) {
  .application-market-overview { padding-inline: 12px; }
  .market-overview__toolbar { display: grid; grid-template-columns: 170px minmax(0, 1fr); }
  .market-overview__lookup { width: 170px; }
  .market-overview__primary { grid-template-columns: 1fr; }
  .market-overview__benchmark,
  .market-overview__chart { border-right: 0; border-bottom: 1px solid var(--gside-border); }
  .market-overview__benchmark { padding: 6px 8px; }
  .market-overview__chart svg { height: 44px; }
  .market-overview__conditions {
    grid-column: auto;
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    overflow-x: auto;
    border-top: 0;
  }
  .market-overview__sectors { grid-template-columns: 1fr; }
  .market-overview__section-label { display: none; }
  .market-overview__scanner { margin-left: 0; }
}

@media (max-width: 640px) {
  .application-market-overview { padding-inline: 10px; }
  .application-market-overview .market-overview { padding: 7px 0; }
  .market-overview__toolbar { grid-template-columns: 1fr; gap: 5px; }
  .market-overview__lookup { width: 100%; flex-basis: auto; }
  .market-overview__lookup-status { min-height: 0; }
  .market-overview__primary { border-radius: 8px; }
  .market-overview__chart { padding-right: 7px; padding-left: 7px; }
  .market-overview__chart-meta span:nth-child(2) { display: none; }
  .market-overview__conditions { grid-template-columns: repeat(5, minmax(90px, 1fr)); }
  .market-overview__sector-track { grid-template-columns: repeat(11, 72px); }
  .market-overview__sector { min-width: 72px; min-height: 28px; }
  .market-overview__scanner > summary { min-height: 28px; }
  .market-overview__loading-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .market-overview__lookup-field { transition: none; }
}


/* Market-header polish: keep the global strip data-only and move ticker navigation
 * into the application header beneath the live system controls. */
.market-topbar {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.market-topbar__identity {
  display: flex;
  align-items: center;
  gap: 30px;
  min-width: 0;
}

.market-topbar__identity .market-nav {
  margin: 0;
}

.market-topbar__workspace {
  display: grid;
  gap: 10px;
  justify-items: end;
  min-width: 0;
  margin-left: auto;
}

.market-topbar__workspace .market-topbar__operations {
  width: auto;
  margin-left: 0;
  justify-content: flex-end;
}

.market-topbar__utility {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.market-topbar__utility .app-account {
  gap: 9px;
}

.market-topbar__utility .app-account__email {
  max-width: 210px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-topbar__utility .app-sign-out {
  min-height: 36px;
  padding: 7px 10px;
}

.market-header-lookup {
  position: relative;
  width: 224px;
  margin: 0;
}

.market-header-lookup__field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  overflow: hidden;
  border: 1px solid var(--gside-border-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 2px rgba(16, 32, 49, 0.025);
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.market-header-lookup__field:hover {
  border-color: #aebcc7;
  background: #ffffff;
}

.market-header-lookup__field:focus-within {
  border-color: #00b8d9;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 184, 217, 0.12), 0 5px 16px rgba(0, 102, 255, 0.06);
}

.market-header-lookup__input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gside-text);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.market-header-lookup__input::placeholder {
  color: var(--gside-faint);
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

.market-header-lookup__button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--gside-border);
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08), rgba(0, 102, 255, 0.055));
  color: #087f9d;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.market-header-lookup__button:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.16), rgba(0, 102, 255, 0.11));
  color: #0066ff;
}

.market-header-lookup__button:focus-visible {
  outline: 2px solid #0066ff;
  outline-offset: -3px;
}

.market-header-lookup__button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.market-header-lookup__status {
  position: absolute;
  z-index: 3;
  top: calc(100% + 3px);
  right: 1px;
  max-width: 280px;
  color: #e11d48;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.25;
  text-align: right;
}

.market-header-lookup__menu {
  position: absolute;
  z-index: 50;
  top: calc(100% + 7px);
  right: 0;
  width: min(300px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid var(--gside-border-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow:
    0 18px 44px rgba(16, 32, 49, 0.14),
    0 2px 8px rgba(16, 32, 49, 0.06);
}

.market-header-lookup__menu[hidden] {
  display: none !important;
}

.market-header-lookup__menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px 8px;
  border-bottom: 1px solid #edf1f4;
  background: #fbfcfd;
}

.market-header-lookup__menu-heading > div {
  min-width: 0;
}

.market-header-lookup__menu-heading strong,
.market-header-lookup__menu-heading span {
  display: block;
}

.market-header-lookup__menu-heading strong {
  overflow: hidden;
  color: var(--gside-text);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.market-header-lookup__menu-heading span,
.market-header-lookup__menu-heading small {
  color: var(--gside-faint);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.35;
}

.market-header-lookup__menu-heading span {
  margin-top: 2px;
}

.market-header-lookup__menu-heading small {
  flex: 0 0 auto;
  white-space: nowrap;
}

.market-header-lookup__option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 49px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  background: #ffffff;
  color: var(--gside-text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  text-decoration: none;
  transition: background-color 100ms ease, color 100ms ease;
}

.market-header-lookup__option:last-child {
  border-bottom: 0;
}

.market-header-lookup__option:hover,
.market-header-lookup__option.is-active,
.market-header-lookup__option:focus-visible {
  background: #eef9fc;
}

.market-header-lookup__option:focus-visible {
  outline: 2px solid var(--gside-accent);
  outline-offset: -2px;
}

.market-header-lookup__option-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d8e7ec;
  border-radius: 7px;
  background: #f7fbfc;
  color: #0d7089;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.market-header-lookup__option.is-active .market-header-lookup__option-mark,
.market-header-lookup__option:hover .market-header-lookup__option-mark,
.market-header-lookup__option:focus-visible .market-header-lookup__option-mark {
  border-color: #b9e2ed;
  background: #ffffff;
  color: #006b86;
}

.market-header-lookup__option-copy {
  min-width: 0;
}

.market-header-lookup__option-copy strong,
.market-header-lookup__option-copy small {
  display: block;
}

.market-header-lookup__option-copy strong {
  color: var(--gside-text);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.market-header-lookup__option-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--gside-muted);
  font-size: 8.5px;
  font-weight: 550;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-header-lookup__option-arrow {
  color: var(--gside-faint);
  font-size: 14px;
  line-height: 1;
  transition: transform 100ms ease, color 100ms ease;
}

.market-header-lookup__option:hover .market-header-lookup__option-arrow,
.market-header-lookup__option.is-active .market-header-lookup__option-arrow,
.market-header-lookup__option:focus-visible .market-header-lookup__option-arrow {
  color: var(--gside-accent-dark);
  transform: translateX(1px);
}

/* The top strip now spends all available width on market context. */
.application-market-overview .market-overview__content {
  width: 100%;
}

/* Use the brighter analytical palette already used by the stock charts. */
.market-overview__change--positive {
  color: #00a86b;
}

.market-overview__change--negative {
  color: #e11d48;
}

.market-overview__range.is-active {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.14), rgba(0, 102, 255, 0.09));
  color: #0066ff;
}

.market-overview__chart-line {
  stroke: url(#market-overview-line-neutral);
  stroke-width: 2.15;
  filter: drop-shadow(0 0 2.5px rgba(0, 102, 255, 0.38));
}

.market-overview__chart-line--positive {
  stroke: url(#market-overview-line-positive);
  filter: drop-shadow(0 0 2.8px rgba(0, 230, 118, 0.46));
}

.market-overview__chart-line--negative {
  stroke: url(#market-overview-line-negative);
  filter: drop-shadow(0 0 2.6px rgba(255, 61, 0, 0.38));
}

.market-overview__chart-area {
  fill: url(#market-overview-area-neutral);
}

.market-overview__chart-area--positive {
  fill: url(#market-overview-area-positive);
}

.market-overview__chart-area--negative {
  fill: url(#market-overview-area-negative);
}

.market-overview__metric--positive strong,
.market-overview__metric--positive small {
  color: #00a86b;
}

.market-overview__metric--negative strong,
.market-overview__metric--negative small {
  color: #e11d48;
}

@media (max-width: 900px) {
  .market-topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .market-topbar__identity,
  .market-topbar__workspace,
  .market-topbar__utility {
    width: 100%;
  }

  .market-topbar__identity {
    justify-content: space-between;
  }

  .market-topbar__workspace {
    justify-items: stretch;
    margin-left: 0;
  }

  .market-topbar__workspace .market-topbar__operations {
    width: 100%;
    justify-content: flex-start;
  }

  .market-topbar__utility {
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .market-topbar__identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .market-topbar__identity .market-nav {
    gap: 14px;
  }

  .market-topbar__workspace .market-topbar__operations,
  .market-topbar__utility {
    align-items: stretch;
    flex-direction: column;
  }

  .market-topbar__utility .app-account,
  .market-header-lookup {
    width: 100%;
  }

  .market-topbar__utility .app-account {
    justify-content: space-between;
  }

  .market-topbar__utility .app-account__email {
    max-width: min(62vw, 260px);
  }

  .market-header-lookup__menu {
    right: auto;
    left: 0;
    width: 100%;
  }

  .market-header-lookup__status {
    position: static;
    display: block;
    padding-top: 3px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .market-header-lookup__field,
  .market-header-lookup__button,
  .market-header-lookup__option,
  .market-header-lookup__option-arrow {
    transition: none;
  }
}

/* SPY selected-period performance and raw intraday polynomial coefficient monitor. */
.market-overview__benchmark-quote {
  grid-template-rows: repeat(3, auto);
}

.market-overview__benchmark-symbol {
  grid-row: span 3;
}

.market-overview__change-context {
  grid-column: 2;
  color: var(--gside-faint);
  font-size: 7px;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}

.market-overview__polynomial {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-top: 3px;
  overflow-x: auto;
  color: var(--gside-muted);
  scrollbar-width: none;
  white-space: nowrap;
}

.market-overview__polynomial::-webkit-scrollbar {
  display: none;
}

.market-overview__path-change {
  flex: 0 0 auto;
  font-size: 7px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.market-overview__path-change--positive {
  color: #008f4c;
}

.market-overview__path-change--negative {
  color: #d90429;
}

.market-overview__path-change--neutral {
  color: var(--gside-faint);
}

.market-overview__polynomial-label {
  flex: 0 0 auto;
  color: var(--gside-faint);
  cursor: help;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.market-overview__polynomial-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 17px;
  padding: 1px 4px;
  border: 1px solid var(--gside-border);
  border-radius: 5px;
  background: #fbfcfd;
  cursor: help;
  line-height: 1;
}

.market-overview__polynomial-item b {
  color: var(--gside-muted);
  font-size: 7px;
  font-weight: 800;
}

.market-overview__polynomial-item strong {
  color: var(--gside-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 8px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.market-overview__polynomial-item--positive strong {
  color: #008f4c;
}

.market-overview__polynomial-item--negative strong {
  color: #d90429;
}

.market-overview__polynomial-item--flat strong {
  color: var(--gside-muted);
}

.market-overview__polynomial-momentum {
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.market-overview__polynomial-momentum--strengthening {
  color: #0c647b;
}

.market-overview__polynomial-momentum--weakening {
  color: #b45309;
}

.market-overview__polynomial-momentum--sign-flip {
  color: #7c3aed;
}

.market-overview__polynomial-momentum--steady,
.market-overview__polynomial-momentum--building {
  color: var(--gside-faint);
}

@media (max-width: 640px) {
  .market-overview__change-context {
    font-size: 8px;
  }

  .market-overview__path-change,
  .market-overview__polynomial-label,
  .market-overview__polynomial-item b {
    font-size: 8px;
  }

  .market-overview__polynomial-item strong {
    font-size: 9px;
  }
}


/* Rolling SPY polynomial magnitude history: show direction, multi-bar decay/growth, and exponent shifts. */
.market-overview__polynomial-item {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "value spark"
    "horizons horizons"
    "shift shift";
  align-items: center;
  column-gap: 4px;
  row-gap: 2px;
  min-height: 28px;
  padding: 2px 5px;
}

.market-overview__polynomial-value {
  grid-area: value;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.market-overview__polynomial-sparkline {
  grid-area: spark;
  display: block;
  width: 36px;
  height: 11px;
  overflow: visible;
}

.market-overview__polynomial-sparkline path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.market-overview__polynomial-sparkline circle {
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.market-overview__polynomial-sparkline--weakening {
  color: #b45309;
}

.market-overview__polynomial-sparkline--strengthening {
  color: #0c647b;
}

.market-overview__polynomial-sparkline--sign-flip {
  color: #7c3aed;
}

.market-overview__polynomial-sparkline--steady,
.market-overview__polynomial-sparkline--building {
  color: var(--gside-faint);
}

.market-overview__polynomial-horizons {
  grid-area: horizons;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 6.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.market-overview__polynomial-horizon {
  color: var(--gside-faint);
  white-space: nowrap;
}

.market-overview__polynomial-horizon--weakening {
  color: #b45309;
}

.market-overview__polynomial-horizon--strengthening {
  color: #0c647b;
}

.market-overview__polynomial-order-shift {
  grid-area: shift;
  justify-self: start;
  padding: 1px 3px;
  border-radius: 3px;
  background: #f8fafc;
  color: var(--gside-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 6.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.market-overview__polynomial-order-shift--toward-zero {
  background: #fff7ed;
  color: #b45309;
}

.market-overview__polynomial-order-shift--away-zero {
  background: #ecfeff;
  color: #0e7490;
}

@media (max-width: 640px) {
  .market-overview__polynomial-item {
    min-height: 31px;
  }

  .market-overview__polynomial-sparkline {
    width: 40px;
    height: 12px;
  }

  .market-overview__polynomial-horizons,
  .market-overview__polynomial-order-shift {
    font-size: 7px;
  }
}


/* Compact SPY coefficient monitor: keep price/technical row short, then use one dense full-width signal row. */
.market-overview__polynomial {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 2.2fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 0;
  padding: 5px 8px;
  overflow: hidden;
  border-top: 1px solid var(--gside-border);
  background: #fbfcfd;
  white-space: normal;
}

.market-overview__polynomial-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.market-overview__polynomial-key {
  min-width: 0;
  overflow: hidden;
  color: var(--gside-faint);
  cursor: help;
  font-size: 6.5px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-overview__polynomial-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
}

.market-overview__polynomial-item {
  display: grid;
  grid-template-columns: auto 36px minmax(0, 1fr) auto;
  grid-template-areas:
    "value spark meaning meaning"
    "horizons horizons horizons shift";
  align-items: center;
  gap: 2px 4px;
  min-width: 0;
  min-height: 0;
  padding: 3px 5px;
}

.market-overview__polynomial-meaning {
  grid-area: meaning;
  min-width: 0;
  overflow: hidden;
  color: var(--gside-muted);
  font-size: 6.5px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-overview__polynomial-sparkline {
  width: 36px;
  height: 10px;
}

.market-overview__polynomial-horizons {
  gap: 4px;
  font-size: 6.5px;
}

.market-overview__polynomial-order-shift {
  justify-self: end;
  font-size: 6.5px;
}

@media (max-width: 1280px) {
  .market-overview__polynomial {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 2.3fr);
  }
}

@media (max-width: 900px) {
  .market-overview__polynomial {
    grid-template-columns: 1fr;
  }

  .market-overview__polynomial-track {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    overflow-x: auto;
    scrollbar-width: none;
  }

  .market-overview__polynomial-track::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 640px) {
  .market-overview__polynomial {
    padding: 6px 7px;
  }

  .market-overview__polynomial-key,
  .market-overview__polynomial-meaning {
    font-size: 7px;
  }

  .market-overview__polynomial-item {
    min-height: 0;
  }
}


/* Pack the SPY coefficient monitor beside the price chart on desktop.
 * The technical-condition strip remains a full-width second row. */
@media (min-width: 901px) {
  .market-overview__primary {
    grid-template-columns: 190px minmax(260px, 0.85fr) minmax(420px, 1.15fr);
  }

  .market-overview__benchmark {
    grid-column: 1;
    grid-row: 1;
  }

  .market-overview__chart {
    grid-column: 2;
    grid-row: 1;
  }

  .market-overview__polynomial {
    grid-column: 3;
    grid-row: 1;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 3px;
    padding: 4px 6px;
    border-top: 0;
    background: #fbfcfd;
  }

  .market-overview__polynomial-summary {
    gap: 4px;
    overflow: hidden;
  }

  .market-overview__polynomial-key {
    display: none;
  }

  .market-overview__polynomial-track {
    gap: 4px;
  }

  .market-overview__polynomial-item {
    grid-template-columns: minmax(0, 1fr) 32px;
    grid-template-areas:
      "value spark"
      "meaning meaning"
      "horizons horizons"
      "shift shift";
    gap: 2px 3px;
    padding: 3px 4px;
  }

  .market-overview__polynomial-value {
    min-width: 0;
    overflow: hidden;
  }

  .market-overview__polynomial-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .market-overview__polynomial-sparkline {
    width: 32px;
    height: 10px;
    justify-self: end;
  }

  .market-overview__polynomial-meaning,
  .market-overview__polynomial-horizons,
  .market-overview__polynomial-order-shift {
    font-size: 6px;
  }

  .market-overview__polynomial-order-shift {
    justify-self: start;
  }

  .market-overview__conditions {
    grid-column: 1 / -1;
    grid-row: 2;
    border-top: 1px solid var(--gside-border);
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .market-overview__primary {
    grid-template-columns: 175px minmax(230px, 0.75fr) minmax(390px, 1.25fr);
  }

  .market-overview__benchmark {
    padding-right: 7px;
    padding-left: 7px;
  }
}


/* Intraday adaptive-band paper trading controls and live monitor. */
.intraday-band-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.intraday-band-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--gside-border);
  border-radius: 12px;
  background: var(--gside-surface);
}

.intraday-band-control__copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.intraday-band-control__copy > div {
  min-width: 0;
}

.intraday-band-control__copy strong,
.intraday-band-control__copy small {
  display: block;
}

.intraday-band-control__copy strong {
  font-size: 13px;
  font-weight: 700;
}

.intraday-band-control__copy small {
  margin-top: 4px;
  color: var(--gside-muted);
  font-size: 11px;
  line-height: 1.45;
}

.intraday-band-control__actions,
.intraday-band-monitor-heading__actions,
.intraday-band-actions-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.intraday-band-control__actions form,
.intraday-band-monitor-heading__actions form,
.intraday-band-actions-cell form {
  margin: 0;
}

.intraday-band-monitor-heading {
  align-items: flex-end;
}

.intraday-band-monitor-heading .market-caption {
  max-width: 760px;
  margin: 8px 0 0;
}

.intraday-band-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.intraday-band-kpis .market-kpi {
  margin: 0;
}

.intraday-band-table {
  min-width: 1180px;
}

.intraday-band-table td {
  vertical-align: top;
}

.intraday-band-actions-cell {
  min-width: 160px;
}

.intraday-band-transaction-log > summary {
  padding: 16px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.intraday-band-transaction-log[open] > summary {
  border-bottom: 1px solid var(--gside-border);
}

.intraday-band-transaction-log code {
  color: var(--gside-muted);
  font-size: 10px;
}

@media (max-width: 1000px) {
  .intraday-band-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .intraday-band-control,
  .intraday-band-control__copy,
  .intraday-band-monitor-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .intraday-band-control__actions,
  .intraday-band-monitor-heading__actions {
    width: 100%;
  }

  .intraday-band-control__actions .market-button,
  .intraday-band-control__actions form,
  .intraday-band-control__actions form .market-button,
  .intraday-band-monitor-heading__actions form,
  .intraday-band-monitor-heading__actions .market-button {
    width: 100%;
  }

  .intraday-band-kpis {
    grid-template-columns: 1fr;
  }
}


/* Massive Economy regime strip: compact math-first macro context beneath SPY technicals. */
.market-overview__macro {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  min-width: 0;
  padding: 5px 7px 6px;
  border-top: 1px solid var(--gside-border);
  background: linear-gradient(90deg, #fbfcfd 0%, #ffffff 52%, #fbfcfd 100%);
}

.market-overview__macro-heading {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 2px 3px;
}

.market-overview__macro-heading span,
.market-overview__macro-heading strong,
.market-overview__macro-heading small {
  display: block;
}

.market-overview__macro-heading span {
  color: var(--gside-muted);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.market-overview__macro-heading strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--gside-text);
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-overview__macro-heading small {
  margin-top: 2px;
  color: var(--gside-faint);
  font-size: 6.5px;
  line-height: 1.2;
}

.market-overview__macro-track {
  display: grid;
  grid-template-columns: repeat(8, minmax(108px, 1fr));
  gap: 4px;
  min-width: 0;
}

.market-overview__macro-card {
  --macro-tone: #64748b;
  --macro-tone-soft: rgba(100, 116, 139, 0.06);
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 4px 5px 5px;
  border: 1px solid #e3e9ee;
  border-top: 2px solid var(--macro-tone);
  border-radius: 6px;
  background: linear-gradient(145deg, #ffffff 0%, var(--macro-tone-soft) 100%);
}

.market-overview__macro-card--risk {
  --macro-tone: #e11d48;
  --macro-tone-soft: rgba(225, 29, 72, 0.07);
}

.market-overview__macro-card--watch {
  --macro-tone: #d97706;
  --macro-tone-soft: rgba(217, 119, 6, 0.075);
}

.market-overview__macro-card--cool {
  --macro-tone: #059669;
  --macro-tone-soft: rgba(5, 150, 105, 0.07);
}

.market-overview__macro-card--info {
  --macro-tone: #0284c7;
  --macro-tone-soft: rgba(2, 132, 199, 0.065);
}

.market-overview__macro-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.market-overview__macro-topline > span {
  overflow: hidden;
  color: var(--gside-muted);
  font-size: 6.5px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.market-overview__macro-card > strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--macro-tone);
  font-size: 10px;
  font-weight: 850;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-overview__macro-state,
.market-overview__macro-card > small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-overview__macro-state {
  margin-top: 2px;
  color: var(--gside-text);
  font-size: 6.5px;
  font-weight: 750;
  line-height: 1.15;
}

.market-overview__macro-card > small {
  margin-top: 2px;
  color: var(--gside-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 6px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.market-overview__macro-sparkline {
  display: block;
  width: 42px;
  height: 10px;
  flex: 0 0 auto;
  overflow: visible;
  color: var(--macro-tone);
}

.market-overview__macro-sparkline path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.market-overview__macro-sparkline circle {
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.market-overview__macro-source-link,
.market-overview__macro-source-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--macro-tone) 34%, #e2e8f0);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--macro-tone);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.market-overview__macro-source-link:hover {
  background: #ffffff;
}

.market-overview__macro-probability {
  display: flex;
  width: 100%;
  height: 4px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.market-overview__macro-probability-segment {
  display: block;
  min-width: 1px;
  height: 100%;
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.54);
}

.market-overview__macro-probability-segment--cut_50_plus { background: #047857; }
.market-overview__macro-probability-segment--cut_25 { background: #10b981; }
.market-overview__macro-probability-segment--hold { background: #64748b; }
.market-overview__macro-probability-segment--hike_25 { background: #f59e0b; }
.market-overview__macro-probability-segment--hike_50_plus { background: #e11d48; }

.market-overview__macro-card--probability > small {
  margin-top: 3px;
}

.market-overview__macro-method {
  grid-column: 2;
  margin: 0;
  padding: 1px 2px 0;
  overflow: hidden;
  color: var(--gside-faint);
  font-size: 6px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-overview__macro-empty {
  align-self: center;
  min-width: 0;
  padding: 5px 7px;
  border: 1px dashed var(--gside-border-strong);
  border-radius: 6px;
  background: #ffffff;
}

.market-overview__macro-empty strong,
.market-overview__macro-empty span {
  display: block;
}

.market-overview__macro-empty strong {
  color: var(--gside-text);
  font-size: 8px;
}

.market-overview__macro-empty span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--gside-muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .market-overview__macro-track {
    grid-template-columns: repeat(8, 126px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .market-overview__macro-track::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 900px) {
  .market-overview__macro {
    grid-template-columns: 1fr;
  }

  .market-overview__macro-heading {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .market-overview__macro-heading > div {
    display: flex;
    align-items: baseline;
    gap: 5px;
  }

  .market-overview__macro-method {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .market-overview__macro {
    padding: 6px 7px 7px;
  }

  .market-overview__macro-heading span,
  .market-overview__macro-heading strong,
  .market-overview__macro-heading small,
  .market-overview__macro-topline > span,
  .market-overview__macro-state,
  .market-overview__macro-card > small,
  .market-overview__macro-method {
    font-size: 7px;
  }

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

  .market-overview__macro-card > strong {
    font-size: 11px;
  }
}

