/*
 * 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: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070b14;
  color: #e2e8f0;
}

body {
  margin: 0;
}

.viz-page {
  min-height: 100vh;
  padding: 64px 24px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 212, 191, 0.12), transparent 32%),
    radial-gradient(circle at 90% 12%, rgba(99, 102, 241, 0.14), transparent 30%),
    #070b14;
}

.viz-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.viz-header {
  max-width: 760px;
  margin-bottom: 28px;
}

.viz-header-wide {
  max-width: none;
}

.viz-header-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.viz-nav-link {
  color: #99f6e4;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.viz-nav-link:hover {
  color: #f0fdfa;
}

.viz-nav-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid #5eead4;
  outline-offset: 4px;
}

.viz-eyebrow,
.viz-card-kicker {
  margin: 0 0 10px;
  color: #5eead4;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.viz-header h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.viz-subtitle {
  max-width: 680px;
  margin: 20px 0 0;
  color: #94a3b8;
  font-size: 1.05rem;
  line-height: 1.65;
}

.viz-controls {
  margin-bottom: 16px;
}

.viz-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
}

.viz-filter label {
  display: block;
  margin-bottom: 3px;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 700;
}

.viz-filter p {
  margin: 0;
  color: #64748b;
  font-size: 0.78rem;
}

.viz-filter select {
  min-width: 220px;
  padding: 10px 36px 10px 12px;
  border: 1px solid rgba(94, 234, 212, 0.3);
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font: inherit;
  cursor: pointer;
}

.viz-filter select:focus-visible {
  outline: 2px solid #5eead4;
  outline-offset: 2px;
}

.viz-filter[aria-busy="true"] {
  opacity: 0.7;
}

.viz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.viz-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #94a3b8;
  font-size: 0.8rem;
}

.viz-meta strong {
  color: #e2e8f0;
  font-weight: 650;
}

.viz-card {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.viz-card-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.viz-card-heading h2,
.viz-error h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.025em;
}

.viz-card-heading > p,
.viz-error > p:last-child {
  margin: 0;
  color: #64748b;
  font-size: 0.85rem;
}

.viz-chart-frame {
  position: relative;
  height: 440px;
}

.viz-alert {
  margin: 20px 0 0;
  color: #fda4af;
}

.viz-error {
  max-width: 680px;
  border-color: rgba(251, 113, 133, 0.25);
}

.viz-error > p:last-child {
  margin-top: 12px;
  line-height: 1.6;
}

.viz-table-card {
  padding-right: 0;
  padding-left: 0;
  overflow: hidden;
}

.viz-table-card > .viz-card-heading,
.viz-table-card > .viz-empty {
  padding-right: clamp(20px, 4vw, 36px);
  padding-left: clamp(20px, 4vw, 36px);
}

.viz-table-scroll {
  overflow-x: auto;
}

.viz-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

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

.viz-table th,
.viz-table td {
  padding: 16px clamp(20px, 4vw, 36px);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
}

.viz-table th {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.viz-table tbody tr {
  transition: background-color 120ms ease;
}

.viz-table tbody tr:hover {
  background: rgba(45, 212, 191, 0.045);
}

.viz-table td {
  color: #e2e8f0;
  font-size: 0.9rem;
}

.viz-table .viz-cell-numeric {
  text-align: right;
}

.viz-contract-symbol,
.viz-cell-primary,
.viz-cell-secondary {
  display: block;
}

.viz-contract-symbol {
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
}

.viz-contract-link {
  display: inline-block;
  text-decoration: none;
}

.viz-contract-link:hover .viz-contract-symbol {
  color: #99f6e4;
}

.viz-contract-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid #5eead4;
  outline-offset: 4px;
}

.viz-cell-secondary {
  margin-top: 5px;
  color: #64748b;
  font-size: 0.75rem;
}

.viz-empty {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .viz-page {
    padding: 40px 16px;
  }

  .viz-card-heading {
    align-items: start;
    flex-direction: column;
    margin-bottom: 20px;
  }

  .viz-header-topline {
    align-items: flex-start;
  }

  .viz-filter {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .viz-filter select {
    width: 100%;
    min-width: 0;
  }

  .viz-chart-frame {
    height: 340px;
  }
}
