/*
 * 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 dark;
  --viz-bg: #fff7d6;
  --viz-bg-warm: #ffe5a8;
  --viz-bg-bloom: rgba(255, 128, 130, 0.28);
  --viz-bg-sky: rgba(114, 203, 191, 0.32);
  --viz-surface: rgba(255, 252, 226, 0.88);
  --viz-surface-strong: rgba(255, 249, 210, 0.96);
  --viz-surface-muted: rgba(246, 224, 151, 0.42);
  --viz-border: rgba(98, 124, 67, 0.22);
  --viz-border-strong: rgba(55, 126, 78, 0.35);
  --viz-text: #26351f;
  --viz-text-strong: #17351f;
  --viz-text-muted: #6d6f3d;
  --viz-text-faint: #8c8151;
  --viz-cactus: #2f8f4e;
  --viz-cactus-light: #7fc96a;
  --viz-cactus-dark: #15572e;
  --viz-flower: #ee6f8c;
  --viz-flower-soft: rgba(238, 111, 140, 0.15);
  --viz-marigold: #d89224;
  --viz-sun: #f9c84a;
  --viz-danger: #bf3f52;
  --viz-shadow: rgba(92, 72, 25, 0.18);
  --viz-cactus-doodle: rgba(47, 143, 78, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--viz-bg);
  color: var(--viz-text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --viz-bg: #102218;
    --viz-bg-warm: #263b22;
    --viz-bg-bloom: rgba(238, 111, 140, 0.18);
    --viz-bg-sky: rgba(127, 201, 106, 0.16);
    --viz-surface: rgba(20, 43, 29, 0.86);
    --viz-surface-strong: rgba(28, 55, 35, 0.96);
    --viz-surface-muted: rgba(71, 93, 41, 0.42);
    --viz-border: rgba(193, 214, 143, 0.18);
    --viz-border-strong: rgba(127, 201, 106, 0.34);
    --viz-text: #edf3d0;
    --viz-text-strong: #fff8cf;
    --viz-text-muted: #b7c28e;
    --viz-text-faint: #8d986f;
    --viz-cactus: #7fc96a;
    --viz-cactus-light: #d5e878;
    --viz-cactus-dark: #3a8f50;
    --viz-flower: #ff8ca2;
    --viz-flower-soft: rgba(255, 140, 162, 0.14);
    --viz-marigold: #f3b34c;
    --viz-sun: #ffe275;
    --viz-danger: #ff9aaa;
    --viz-shadow: rgba(0, 0, 0, 0.34);
    --viz-cactus-doodle: rgba(127, 201, 106, 0.16);
  }
}

body {
  margin: 0;
}

.viz-page {
  position: relative;
  min-height: 100vh;
  padding: 64px 24px;
  box-sizing: border-box;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 8%, var(--viz-bg-bloom), transparent 30%),
    radial-gradient(circle at 88% 10%, var(--viz-bg-sky), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(249, 200, 74, 0.22), transparent 36%),
    linear-gradient(145deg, var(--viz-bg), var(--viz-bg-warm));
}

.viz-page::before,
.viz-page::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.viz-page::before {
  right: clamp(18px, 7vw, 120px);
  bottom: 48px;
  width: 82px;
  height: 138px;
  border-radius: 42px 42px 18px 18px;
  background:
    radial-gradient(circle at 50% 18%, var(--viz-flower) 0 7px, transparent 8px),
    linear-gradient(90deg, transparent 0 45%, rgba(255, 255, 255, 0.18) 46% 48%, transparent 49%),
    var(--viz-cactus-doodle);
  box-shadow:
    -42px 42px 0 -18px var(--viz-cactus-doodle),
    42px 24px 0 -18px var(--viz-cactus-doodle);
}

.viz-page::after {
  top: 24px;
  right: 28px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--viz-sun), transparent 68%);
  opacity: 0.42;
}

.viz-shell {
  position: relative;
  z-index: 1;
  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: var(--viz-cactus-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.viz-nav-link:hover {
  color: var(--viz-flower);
}

.viz-nav-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--viz-cactus);
  outline-offset: 4px;
}

.viz-eyebrow,
.viz-card-kicker {
  margin: 0 0 10px;
  color: var(--viz-cactus);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.viz-header h1 {
  margin: 0;
  color: var(--viz-text-strong);
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 2px 0 rgba(249, 200, 74, 0.2);
}

.viz-subtitle {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--viz-text-muted);
  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 var(--viz-border);
  border-radius: 18px;
  background: var(--viz-surface);
  box-shadow: 0 14px 40px var(--viz-shadow);
}

.viz-filter label {
  display: block;
  margin-bottom: 3px;
  color: var(--viz-text-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.viz-filter p {
  margin: 0;
  color: var(--viz-text-faint);
  font-size: 0.78rem;
}

.viz-filter select {
  min-width: 220px;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--viz-border-strong);
  border-radius: 999px;
  background: var(--viz-surface-strong);
  color: var(--viz-text-strong);
  font: inherit;
  cursor: pointer;
}

.viz-filter select:focus-visible {
  outline: 2px solid var(--viz-cactus);
  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 var(--viz-border);
  border-radius: 999px;
  background: var(--viz-surface-muted);
  color: var(--viz-text-muted);
  font-size: 0.8rem;
}

.viz-meta strong {
  color: var(--viz-text-strong);
  font-weight: 650;
}

.viz-card {
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--viz-border);
  border-radius: 28px;
  background: var(--viz-surface);
  box-shadow: 0 28px 80px var(--viz-shadow);
  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: var(--viz-text-strong);
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: -0.025em;
}

.viz-card-heading > p,
.viz-error > p:last-child {
  margin: 0;
  color: var(--viz-text-faint);
  font-size: 0.85rem;
}

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

.viz-alert {
  margin: 20px 0 0;
  color: var(--viz-danger);
}

.viz-error {
  max-width: 680px;
  border-color: color-mix(in srgb, var(--viz-danger), transparent 65%);
}

.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 var(--viz-border);
  text-align: left;
}

.viz-table th {
  color: var(--viz-text-faint);
  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: var(--viz-flower-soft);
}

.viz-table td {
  color: var(--viz-text);
  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: var(--viz-text-strong);
  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: var(--viz-flower);
}

.viz-contract-link:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--viz-cactus);
  outline-offset: 4px;
}

.viz-cell-secondary {
  margin-top: 5px;
  color: var(--viz-text-faint);
  font-size: 0.75rem;
}

.viz-empty {
  margin: 0;
  color: var(--viz-text-muted);
  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;
  }
}
