:root {
  --bg: #0b1220;
  --bg-elev: #121b2d;
  --bg-elev-2: #182338;
  --surface: #101827;
  --surface-2: #162133;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e5edf7;
  --text-soft: #9fb0c8;
  --text-muted: #7d90ac;
  --accent: #4ea1ff;
  --accent-2: #63d2ff;
  --positive: #35c48b;
  --negative: #ff6b81;
  --warning: #f6c177;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --content-width: 1440px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top right, rgba(78, 161, 255, 0.08), transparent 24%),
    radial-gradient(circle at top left, rgba(99, 210, 255, 0.05), transparent 20%),
    linear-gradient(180deg, #0b1220 0%, #0a111d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
  line-height: 1.45;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-header,
.app-nav,
.app-main {
  width: min(var(--content-width), calc(100% - 40px));
  margin: 0 auto;
}

.app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 18px;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-title {
  margin: 0;
  font-size: clamp(1.8rem, 2.3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.app-subtitle {
  margin: 0;
  max-width: 760px;
  font-size: 0.98rem;
  color: var(--text-soft);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(78, 161, 255, 0.16), rgba(78, 161, 255, 0.08));
  border: 1px solid rgba(78, 161, 255, 0.28);
  color: #cfe6ff;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--border);
}

.nav-link,
.nav-placeholder {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.93rem;
  transition: 0.18s ease;
}

.nav-link:hover {
  border-color: rgba(78, 161, 255, 0.35);
  color: var(--text);
  background: rgba(78, 161, 255, 0.08);
}

.app-main {
  padding: 28px 0 46px;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-header-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 860px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.9vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.page-description {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.page-header-note,
.header-note-card {
  min-width: 170px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.note-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.note-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--accent-2);
  font-size: 0.92rem;
  font-weight: 600;
}

.back-link:hover {
  color: #8edcff;
}

.section-card,
.ticker-card,
.kpi-card {
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.96), rgba(13, 20, 33, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.section-card {
  padding: 20px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-description {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.screener-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.summary-value {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 600;
}

.ticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.ticker-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ticker-card:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 161, 255, 0.3);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.ticker-card-header,
.ticker-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticker-card-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ticker-symbol {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ticker-name {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.ticker-card-price-wrap {
  text-align: right;
}

.spot-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.ticker-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.35s ease;
  margin-top: 0;
}

.metric-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
}

.metric-value.positive,
.kpi-card.positive .kpi-value,
.positive {
  color: var(--positive);
}

.metric-value.negative,
.kpi-card.negative .kpi-value,
.negative {
  color: var(--negative);
}

.price-change-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 650;
}

.price-change-pill.positive {
  background: rgba(53, 196, 139, 0.14);
  color: var(--positive);
}

.price-change-pill.negative {
  background: rgba(255, 107, 129, 0.14);
  color: var(--negative);
}

.ticker-card-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-button,
.table-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(78, 161, 255, 0.24), rgba(78, 161, 255, 0.14));
  border: 1px solid rgba(78, 161, 255, 0.3);
  color: #d8ecff;
  font-size: 0.9rem;
  font-weight: 600;
  transition: 0.18s ease;
  white-space: nowrap;
}

.card-button:hover,
.table-button:hover {
  background: linear-gradient(180deg, rgba(78, 161, 255, 0.32), rgba(78, 161, 255, 0.2));
  border-color: rgba(78, 161, 255, 0.42);
}

.dashboard-header {
  align-items: stretch;
}

.dashboard-header-right {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.header-control-block,
.control-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.dashboard-dropdown {
  min-width: 240px;
}

.dashboard-dropdown .Select-control,
.dashboard-dropdown .Select__control {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  min-height: 42px !important;
  box-shadow: none !important;
}

.dashboard-dropdown .Select-menu-outer,
.dashboard-dropdown .Select__menu {
  background: #162133 !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 12px !important;
}

.dashboard-dropdown .Select-placeholder,
.dashboard-dropdown .Select-value-label,
.dashboard-dropdown .Select-input > input,
.dashboard-dropdown .VirtualizedSelectOption,
.dashboard-dropdown .Select-option,
.dashboard-dropdown .Select-arrow-zone,
.dashboard-dropdown .is-open > .Select-control,
.dashboard-dropdown .Select__single-value,
.dashboard-dropdown .Select__placeholder,
.dashboard-dropdown .Select__input-container,
.dashboard-dropdown .Select__indicator {
  color: var(--text) !important;
}

.dashboard-dropdown .Select-option.is-focused,
.dashboard-dropdown .VirtualizedSelectFocusedOption,
.dashboard-dropdown .Select__option--is-focused {
  background: rgba(78, 161, 255, 0.14) !important;
}

.dashboard-dropdown .Select-option.is-selected,
.dashboard-dropdown .Select__option--is-selected {
  background: rgba(78, 161, 255, 0.22) !important;
}

.kpi-grid,
.greeks-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

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

.kpi-card {
  padding: 18px;
}

.kpi-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.kpi-value {
  font-size: 1.26rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.kpi-subtext {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.chart-grid {
  display: grid;
  gap: 18px;
}

.chart-grid-top {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}

.chart-grid-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-grid-bottom .chart-card-wide {
  grid-column: 1 / -1;
}

.chart-card,
.details-card {
  overflow: hidden;
}

.chart-card .js-plotly-plot,
.chart-card .plot-container {
  border-radius: 14px;
}

.chain-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chain-summary-text {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.chain-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.dashboard-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  align-items: center;
}

.dashboard-radio-label {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  cursor: pointer;
  transition: 0.18s ease;
  font-size: 0.9rem;
  font-weight: 600;
}

.dashboard-radio-label:hover {
  border-color: rgba(78, 161, 255, 0.26);
  color: var(--text);
  background: rgba(78, 161, 255, 0.06);
}

/* Hide the radio dot — pill acts as the toggle */
.dashboard-radio-input {
  display: none;
}

/* Selected pill state */
.dashboard-radio-input:checked + .dashboard-radio-label {
  background: rgba(78, 161, 255, 0.16);
  border-color: rgba(78, 161, 255, 0.4);
  color: var(--text);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.chain-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  background: rgba(255, 255, 255, 0.02);
}

.chain-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 14px 14px;
  background: #132034;
  color: #c7d6ea;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.chain-table tbody td {
  padding: 14px;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.chain-table tbody tr:hover {
  background: rgba(78, 161, 255, 0.05);
}

.empty-state {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  text-align: center;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.02);
}

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

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.detail-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.detail-value {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  word-break: break-word;
}

.methodology-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.methodology-block {
  min-height: 100%;
}

.methodology-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.methodology-body .section-description {
  margin: 0;
}

.methodology-note-card {
  padding-top: 18px;
}

/* =========================================================================
   Page loading overlay (in-content spinner)
   ========================================================================= */

.page-loading-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  padding: 60px 20px;
  transition: opacity 0.45s ease;
}

.page-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(78, 161, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 20px;
  color: var(--text-soft);
  font-size: 0.95rem;
  animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* =========================================================================
   Staggered card fade-in animation
   ========================================================================= */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-card {
  opacity: 0;
  animation: fadeSlideUp 0.4s ease forwards;
}

/* Stagger each card — JS will set --card-index via inline style */
.fade-in-card {
  animation-delay: calc(var(--card-index, 0) * 0.08s);
}

/* =========================================================================
   Ticker card hover-reveal metrics
   ========================================================================= */

.ticker-card:hover .ticker-card-metrics {
  max-height: 300px;
  opacity: 1;
  margin-top: 18px;
}

.ticker-card {
  cursor: pointer;
}

/* =========================================================================
   Market status badge
   ========================================================================= */

.market-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}

.market-status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.market-status-badge.market-open {
  background: rgba(53, 196, 139, 0.12);
  border: 1px solid rgba(53, 196, 139, 0.3);
  color: var(--positive);
}

.market-status-badge.market-open .status-dot {
  background: var(--positive);
  animation: pulse-dot 2s ease-in-out infinite;
}

.market-status-badge.market-closed {
  background: rgba(246, 193, 119, 0.12);
  border: 1px solid rgba(246, 193, 119, 0.3);
  color: var(--warning);
}

.market-status-badge.market-closed .status-dot {
  background: var(--warning);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* =========================================================================
   Breadcrumbs
   ========================================================================= */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.breadcrumbs a {
  color: var(--accent-2);
  transition: color 0.15s ease;
}

.breadcrumbs a:hover {
  color: #8edcff;
}

.breadcrumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
}

/* =========================================================================
   Tabbed chart layout
   ========================================================================= */

.chart-tabs-container .tab-content {
  padding-top: 18px;
}

/* Override Dash default tab styles */
.chart-tabs-container .tab {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  color: var(--text-soft) !important;
  padding: 8px 18px !important;
  margin-right: 8px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  transition: all 0.18s ease !important;
}

.chart-tabs-container .tab:hover {
  border-color: rgba(78, 161, 255, 0.35) !important;
  color: var(--text) !important;
  background: rgba(78, 161, 255, 0.08) !important;
}

.chart-tabs-container .tab--selected {
  background: rgba(78, 161, 255, 0.16) !important;
  border-color: rgba(78, 161, 255, 0.4) !important;
  color: var(--text) !important;
}

/* =========================================================================
   Methodology collapsible sections
   ========================================================================= */

.method-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-section {
  background: linear-gradient(180deg, rgba(18, 27, 45, 0.96), rgba(13, 20, 33, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.method-section:hover {
  border-color: rgba(78, 161, 255, 0.2);
}

.method-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}

.method-section-header:hover {
  background: rgba(78, 161, 255, 0.04);
}

.method-section-header h2 {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.method-chevron {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.method-section.open .method-chevron {
  transform: rotate(180deg);
}

.method-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 20px;
}

.method-section.open .method-section-body {
  max-height: 2000px;
  padding: 0 20px 20px;
}

.method-section-body p {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 0.94rem;
  line-height: 1.6;
}

.method-section-body p:last-child {
  margin-bottom: 0;
}

.method-formula {
  display: block;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(78, 161, 255, 0.12);
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.88rem;
  color: var(--accent-2);
  white-space: pre-wrap;
  line-height: 1.7;
  margin: 12px 0;
}

.method-param-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.method-param-table th,
.method-param-table td {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.method-param-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.method-param-table td {
  color: var(--text-soft);
}

.method-param-table td:first-child {
  color: var(--accent-2);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
}

/* =========================================================================
   Footer
   ========================================================================= */

.app-footer {
  width: min(var(--content-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================================
   Greek plain-English subtitle
   ========================================================================= */

.greek-explanation {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

/* =========================================================================
   Clickable table rows
   ========================================================================= */

.chain-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.chain-table tbody tr:hover {
  background: rgba(78, 161, 255, 0.08);
}

.chain-table tbody tr:active {
  background: rgba(78, 161, 255, 0.12);
}

/* =========================================================================
   Section reveal on scroll animation
   ========================================================================= */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chain-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .app-header,
  .page-header,
  .section-header {
    flex-direction: column;
  }

  .dashboard-header-right {
    width: 100%;
  }

  .chart-grid-top,
  .chart-grid-bottom,
  .methodology-grid {
    grid-template-columns: 1fr;
  }

  .chart-grid-bottom .chart-card-wide {
    grid-column: auto;
  }

  .screener-summary-card {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .greeks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .app-header,
  .app-nav,
  .app-main {
    width: min(var(--content-width), calc(100% - 24px));
  }

  .app-header {
    padding-top: 22px;
  }

  .page {
    gap: 18px;
  }

  .ticker-grid,
  .ticker-card-metrics,
  .chain-control-grid,
  .details-grid,
  .kpi-grid,
  .greeks-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-dropdown {
    min-width: 100%;
  }

  .ticker-card-header,
  .ticker-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .ticker-card-price-wrap {
    text-align: left;
  }

  .chain-summary-text {
    white-space: normal;
  }

  .card-button,
  .table-button {
    width: 100%;
  }
}