/* The Noble Growth Index: shared panel styles. Used by /index/ and every /index/<panel>/ page. */
/* Panel Card */
.panel-card {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--border);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.panel-wide {
  grid-column: 1 / -1;
}

.dao-method {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.dao-method-card {
  padding: 14px 16px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.dao-method-value {
  font-family: var(--font-h);
  font-size: 21px;
  color: var(--dark);
  margin-bottom: 4px;
}

.dao-method-label {
  font-family: var(--font-b);
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.dao-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dao-table {
  min-width: 1040px;
}

.dao-table td,
.dao-table th {
  white-space: nowrap;
}

.dao-company {
  min-width: 148px;
}

.dao-ticker {
  display: block;
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.dao-score-cell {
  min-width: 112px;
}

.dao-score-line {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 7px;
}

.dao-score-number {
  font-family: var(--font-m);
  font-weight: 600;
  color: var(--dark);
}

.dao-score-track {
  height: 7px;
  background: var(--off-white);
  border-radius: 100px;
  overflow: hidden;
}

.dao-score-fill {
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

.panel-label {
  font-family: var(--font-m);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
}

.panel-title {
  font-family: var(--font-h);
  font-size: 24px;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 24px;
}

.panel-source {
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
}

.panel-insight {
  font-family: var(--font-b);
  font-size: 13px;
  line-height: 1.5;
  color: var(--dark2);
  background: #f8f7f6;
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
  margin: 16px 0 12px;
  border-radius: 0 8px 8px 0;
}

/* Export Button */
.export-wrapper {
  position: absolute;
  bottom: 16px;
  right: 16px;
}

.export-btn {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-m);
  font-size: 11px;
}

.export-btn:hover {
  color: var(--dark);
  border-color: var(--dark2);
}

.export-btn svg {
  width: 14px;
  height: 14px;
}

.export-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  z-index: 100;
}

.export-dropdown.open {
  display: block;
}

.export-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-family: var(--font-m);
  font-size: 12px;
  color: var(--dark2);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.export-option:hover {
  background: var(--off-white);
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 104px minmax(72px, 1fr) 56px 48px;
  align-items: center;
  gap: 12px;
}

.bar-name {
  font-size: 13px;
  color: var(--dark2);
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--off-white);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.bar-value {
  font-family: var(--font-m);
  font-size: 12px;
  color: var(--dark);
  min-width: 56px;
  text-align: right;
  flex-shrink: 0;
}

.bar-change {
  font-family: var(--font-m);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
}

.bar-change.up {
  color: #1a7a3a;
  background: #e8f5ec;
}

.bar-change.down {
  color: #b91c1c;
  background: #fde8e8;
}

.bar-change.flat {
  color: var(--muted);
  background: var(--off-white);
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.data-table thead th {
  font-family: var(--font-m);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 12px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  font-size: 13px;
  color: var(--dark2);
  padding: 10px 12px;
  border-bottom: 1px solid var(--off-white);
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.trend-up { color: #1a7a3a; }
.trend-down { color: #b91c1c; }
.trend-flat { color: var(--muted); }

.rank-badge {
  font-family: var(--font-m);
  font-size: 12px;
  color: var(--muted);
  width: 24px;
  display: inline-block;
  text-align: center;
}

/* AI SEO Grid */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--off-white);
  border-radius: 12px;
  padding: 20px;
}

.stat-number {
  font-family: var(--font-h);
  font-size: 36px;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--dark2);
  margin-bottom: 6px;
}

.stat-change {
  font-family: var(--font-m);
  font-size: 11px;
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.stat-change.up {
  color: #1a7a3a;
  background: #e8f5ec;
}

.stat-change.down {
  color: #b91c1c;
  background: #fde8e8;
}

.stat-context {
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Trend Pulse */
.trend-section {
  margin-bottom: 20px;
}

.trend-section:last-child {
  margin-bottom: 0;
}

.trend-section-title {
  font-family: var(--font-m);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.trend-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--dark2);
  background: var(--off-white);
  padding: 6px 12px;
  border-radius: 100px;
  white-space: nowrap;
}

.trend-pill .heat {
  color: #d97706;
  font-size: 12px;
}

/* Spend Outlook */
.spend-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 24px;
}

.spend-stat-big {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 400;
  color: var(--dark);
}

.spend-stat-label {
  font-size: 13px;
  color: var(--muted);
}

.stacked-bar-container {
  margin-bottom: 16px;
}

.stacked-bar {
  display: flex;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
}

.stacked-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-m);
  font-size: 11px;
  color: var(--white);
  transition: flex 0.4s ease;
  min-width: 0;
}

.stacked-segment span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--dark2);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Bitcoin & Macro */
.btc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.btc-metric {
  padding: 16px;
  background: var(--off-white);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.btc-value {
  font-family: var(--font-h);
  font-size: 28px;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 4px;
}

.btc-label {
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.btc-change {
  font-family: var(--font-m);
  font-size: 12px;
}

.btc-change.up { color: #0ea158; }
.btc-change.down { color: #b83535; }
.btc-change.flat { color: var(--muted); }

.btc-period {
  color: var(--muted);
  font-size: 11px;
}

/* Time-series panels */
.trend-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.trend-chart-card {
  padding: 14px;
  background: #fbfaf9;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.trend-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.trend-chart-title {
  font-family: var(--font-b);
  font-size: 12px;
  color: var(--dark2);
}

.trend-chart-range {
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.trend-svg {
  display: block;
  width: 100%;
  height: 78px;
  overflow: visible;
}

.trend-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--font-m);
  font-size: 9px;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 0;
  font-family: var(--font-m);
  font-size: 10px;
  color: var(--muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend-line {
  width: 16px;
  height: 2px;
  border-radius: 100px;
}

.rate-strip,
.housing-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.rate-stat,
.housing-stat {
  padding: 12px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.rate-value,
.housing-value {
  font-family: var(--font-h);
  font-size: 22px;
  color: var(--dark);
  line-height: 1.15;
}

.rate-label,
.housing-label {
  margin-top: 4px;
  font-family: var(--font-b);
  font-size: 11px;
  line-height: 1.25;
  color: var(--muted);
}

.market-balance {
  padding: 16px;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
}

.market-balance-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.market-balance-value {
  font-family: var(--font-h);
  font-size: 34px;
  color: var(--dark);
  line-height: 1;
}

.market-balance-status {
  font-family: var(--font-m);
  font-size: 11px;
  color: #8a641e;
  background: #fff4d9;
  padding: 4px 8px;
  border-radius: 100px;
}

.market-balance-status.buyer {
  color: #17663a;
  background: #e4f3e9;
}

.market-split-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--font-b);
  font-size: 11px;
  color: var(--dark2);
}

.market-split-note strong {
  font-family: var(--font-m);
  font-size: 11px;
  color: #17663a;
}

.balance-scale {
  position: relative;
  display: grid;
  grid-template-columns: 4fr 2fr 4fr;
  height: 9px;
  border-radius: 100px;
  overflow: visible;
  margin: 4px 0 7px;
}

.balance-scale span:first-child { background: #dbeee2; border-radius: 100px 0 0 100px; }
.balance-scale span:nth-child(2) { background: #f5e6bd; }
.balance-scale span:nth-child(3) { background: #eadada; border-radius: 0 100px 100px 0; }

.balance-marker {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 17px;
  background: var(--dark);
  border-radius: 3px;
  transform: translateX(-50%);
}

.balance-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-m);
  font-size: 9px;
  color: var(--muted);
}


/* Responsive */
@media (max-width: 1024px) {
  .panel-card {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel-card {
    padding: 24px;
  }

  .tool-hero {
    padding: 100px 20px 36px;
  }

  .bar-name {
    font-size: 12px;
  }

  .bar-row {
    grid-template-columns: 78px minmax(56px, 1fr) 44px 40px;
    gap: 8px;
  }

  .bar-value {
    min-width: 44px;
    font-size: 11px;
  }

  .bar-change {
    font-size: 10px;
    min-width: 40px;
  }

  .spend-stats {
    flex-direction: column;
    gap: 16px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .dao-method {
    grid-template-columns: 1fr;
  }

  .btc-grid { grid-template-columns: 1fr; }

  .trend-chart-grid,
  .rate-strip,
  .housing-stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .data-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .export-dropdown {
    right: auto;
    left: -80px;
  }
}

@media (max-width: 600px) {
  .dashboard-grid {
    padding: 0 16px;
  }

  .last-updated {
    padding: 0 16px;
  }

  .alert-banner {
    padding: 0 16px;
  }

  .faq-section,
  .cta-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .panel-title {
    font-size: 20px;
  }

  .trend-chart-grid {
    grid-template-columns: 1fr;
  }

  .ai-table th:nth-child(3),
  .ai-table td:nth-child(3) {
    display: none;
  }

  .ai-table thead th,
  .ai-table tbody td {
    padding-left: 7px;
    padding-right: 7px;
  }

  .stat-number {
    font-size: 28px;
  }
}
