/* Mobile-first demo summaries — desktop layout hidden below 768px */

.thoth-desktop-only {
  display: block;
}

.thoth-mobile-only {
  display: none;
}

.thoth-mobile-screen {
  padding: 0;
}

.thoth-mobile-card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14);
  padding: 12px;
}

.thoth-mobile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.thoth-mobile-head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
}

.thoth-mobile-head .muted {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.4;
}

.thoth-mobile-refresh {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(63, 81, 181, 0.45);
  border-radius: 4px;
  background: #fff;
  color: #3f51b5;
  cursor: pointer;
}

.thoth-mobile-refresh .material-icons {
  font-size: 22px;
}

.thoth-mobile-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.thoth-mobile-kpi {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  min-width: 0;
}

.thoth-mobile-kpi--warn {
  border-left: 3px solid #c62828;
  grid-column: 1 / -1;
}

.thoth-mobile-kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 4px;
}

.thoth-mobile-kpi-value {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.thoth-mobile-more-kpis {
  margin: 0 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fafbfc;
}

.thoth-mobile-more-kpis summary {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #3f51b5;
  cursor: pointer;
  list-style: none;
}

.thoth-mobile-more-kpis summary::-webkit-details-marker {
  display: none;
}

.thoth-mobile-more-kpis[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

.thoth-mobile-more-kpis .thoth-mobile-kpi-grid {
  padding: 10px;
  margin-bottom: 0;
}

.thoth-mobile-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.thoth-mobile-section-title {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.thoth-mobile-bar-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 10px;
}

.thoth-mobile-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
}

.thoth-mobile-bar-track {
  height: 8px;
  background: #eceff1;
  border-radius: 999px;
  overflow: hidden;
}

.thoth-mobile-bar-fill {
  height: 100%;
  background: #1565c0;
  border-radius: 999px;
}

.thoth-mobile-trend-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #e8f4fc;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.45;
}

.thoth-mobile-alerts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.thoth-mobile-alert {
  padding: 10px;
  border-radius: 8px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  text-align: center;
}

.thoth-mobile-alert:last-child {
  background: #fffbeb;
  border-color: #fde68a;
}

.thoth-mobile-alert-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.thoth-mobile-alert-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.thoth-mobile-account-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thoth-mobile-account-card {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.thoth-mobile-account-card--focus {
  border-color: #3f51b5;
  background: rgba(63, 81, 181, 0.06);
}

.thoth-mobile-account-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.thoth-mobile-account-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
}

.thoth-mobile-account-rank {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #3f51b5;
}

.thoth-mobile-account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: #475569;
}

.thoth-mobile-full-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 12px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.thoth-mobile-full-btn:hover {
  border-color: #3f51b5;
  color: #3f51b5;
  background: #eef2ff;
}

.thoth-demo-scroll-hint {
  display: none;
}

@media (max-width: 767px) {
  .thoth-desktop-only {
    display: none !important;
  }

  .thoth-mobile-only {
    display: block;
  }

  .thoth-product-frame {
    overflow-x: auto;
    overflow-y: visible;
    max-width: 100%;
  }

  .thoth-demo .thoth-content {
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px;
  }

  .thoth-demo.thoth-show-desktop-mobile .thoth-mobile-only {
    display: none !important;
  }

  .thoth-demo.thoth-show-desktop-mobile .thoth-desktop-only {
    display: block !important;
  }

  .thoth-demo.thoth-show-desktop-mobile .thoth-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .thoth-product-frame:has(.thoth-demo.thoth-show-desktop-mobile) + .thoth-demo-scroll-hint {
    display: block;
  }
}
