:root {
  --background: #071018;
  --background-secondary: #0b1620;
  --panel: #101e2a;
  --panel-hover: #142736;

  --border: #243746;
  --border-light: #315064;

  --text-primary: #f3f7fa;
  --text-secondary: #a9bac6;
  --text-muted: #78909f;

  --accent: #42bff5;
  --accent-dark: #128bc0;
  --accent-soft: rgba(66, 191, 245, 0.12);

  --positive: #38d996;
  --negative: #ff6678;
  --warning: #f2c94c;

  --container-width: 1200px;
  --border-radius: 14px;
  --transition: 0.2s ease;
}


/* =========================
   GLOBAL RESET
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin-top: 0;
}

.container {
  width: min(
    calc(100% - 40px),
    var(--container-width)
  );
  margin: 0 auto;
}


/* =========================
   HEADER
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(7, 16, 24, 0.94);
  border-bottom: 1px solid var(--border);

  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-name {
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand-tagline {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.main-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;

  transition:
    color var(--transition),
    transform var(--transition);
}

.main-nav a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}


/* =========================
   HERO
========================= */

.hero {
  position: relative;
  overflow: hidden;

  padding: 105px 0 90px;

  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(66, 191, 245, 0.17),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      #09141e 0%,
      var(--background) 100%
    );
}

.hero::before {
  content: "";

  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      rgba(66, 191, 245, 0.04) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(66, 191, 245, 0.04) 1px,
      transparent 1px
    );

  background-size: 45px 45px;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-label,
.section-kicker {
  margin-bottom: 10px;

  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero h1 {
  max-width: 850px;
  margin: 0 0 22px;

  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -2px;
}

.hero-description {
  max-width: 760px;
  margin-bottom: 28px;

  color: var(--text-secondary);
  font-size: 19px;
}

.update-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 15px;

  background: var(--accent-soft);
  border: 1px solid rgba(66, 191, 245, 0.25);
  border-radius: 999px;

  color: var(--text-secondary);
  font-size: 14px;
}

.status-dot {
  width: 9px;
  height: 9px;

  background: var(--positive);
  border-radius: 50%;

  box-shadow:
    0 0 0 5px rgba(56, 217, 150, 0.12),
    0 0 12px rgba(56, 217, 150, 0.6);
}


/* =========================
   SECTIONS
========================= */

.dashboard-section {
  padding: 78px 0;
}

.dashboard-section.alternate {
  background: var(--background-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.section-heading {
  margin-bottom: 28px;

  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.section-heading h2 {
  margin: 0;

  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
}

.section-description {
  max-width: 440px;
  margin: 0;

  color: var(--text-secondary);
  text-align: right;
}


/* =========================
   METRIC CARDS
========================= */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.metric-card {
  min-height: 175px;
  padding: 24px;

  background: linear-gradient(
    145deg,
    var(--panel),
    #0d1923
  );

  border: 1px solid var(--border);
  border-radius: var(--border-radius);

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
  background: var(--panel-hover);
}

.featured-card {
  border-color: rgba(66, 191, 245, 0.45);

  box-shadow:
    inset 0 0 35px rgba(66, 191, 245, 0.05);
}

.metric-label {
  margin-bottom: 18px;

  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-value {
  margin-bottom: 4px;

  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.metric-change {
  margin: 10px 0 0;

  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
}

.metric-note {
  margin: 12px 0 0;

  color: var(--text-muted);
  font-size: 13px;
}


/* =========================
   PANELS
========================= */

.content-grid {
  display: grid;
  gap: 20px;
}

.two-column {
  grid-template-columns: repeat(2, 1fr);
}

.three-column {
  grid-template-columns: repeat(3, 1fr);
}

.panel {
  overflow: hidden;

  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

.panel-header {
  padding: 18px 22px;

  background: rgba(255, 255, 255, 0.018);
  border-bottom: 1px solid var(--border);
}

.panel-header h3 {
  margin: 0;
  font-size: 16px;
}

.panel-body {
  padding: 24px 22px;
  color: var(--text-secondary);
}

.panel-body p:last-child {
  margin-bottom: 0;
}

.signal-value,
.large-result {
  margin-bottom: 12px;

  color: var(--text-primary);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.25;
}

.signal-description {
  margin: 0;
  color: var(--text-secondary);
}


/* =========================
   TABLES
========================= */

.table-wrapper {
  overflow-x: auto;

  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
}

table {
  width: 100%;
  min-width: 820px;

  border-collapse: collapse;
}

thead {
  background: rgba(255, 255, 255, 0.025);
}

th,
td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

td {
  color: var(--text-secondary);
  font-size: 14px;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: rgba(66, 191, 245, 0.045);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.loading-cell {
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
}

.positive {
  color: var(--positive) !important;
}

.negative {
  color: var(--negative) !important;
}

.neutral {
  color: var(--warning) !important;
}


/* =========================
   DAILY COMMENTARY
========================= */

.daily-commentary {
  padding: 85px 0;

  background:
    linear-gradient(
      135deg,
      rgba(66, 191, 245, 0.08),
      transparent 45%
    ),
    var(--background);
}

.commentary-card {
  padding: 42px;

  background: linear-gradient(
    145deg,
    #102331,
    #0d1923
  );

  border: 1px solid rgba(66, 191, 245, 0.3);
  border-radius: 18px;

  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.25);
}

.commentary-card h2 {
  margin: 0 0 20px;

  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.2;
}

#daily-commentary-text {
  max-width: 900px;

  color: var(--text-secondary);
  font-size: 17px;
}


/* =========================
   FOOTER
========================= */

.site-footer {
  padding: 35px 0;

  background: #050b10;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner strong {
  color: var(--accent);
  font-size: 21px;
}

.footer-inner p {
  margin: 2px 0 0;

  color: var(--text-muted);
  font-size: 13px;
}

.footer-disclaimer {
  max-width: 500px;

  color: var(--text-muted);
  font-size: 12px;
  text-align: right;
}


/* =========================
   RESPONSIVE TABLET
========================= */

@media (max-width: 980px) {

  .header-inner {
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    padding-bottom: 4px;

    overflow-x: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .three-column {
    grid-template-columns: 1fr;
  }

}


/* =========================
   RESPONSIVE MOBILE
========================= */

@media (max-width: 700px) {

  .container {
    width: min(
      calc(100% - 28px),
      var(--container-width)
    );
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .brand-tagline {
    font-size: 10px;
  }

  .main-nav {
    gap: 18px;
  }

  .main-nav a {
    white-space: nowrap;
  }

  .hero {
    padding: 75px 0 65px;
  }

  .hero h1 {
    font-size: 42px;
    letter-spacing: -1px;
  }

  .hero-description {
    font-size: 17px;
  }

  .dashboard-section {
    padding: 58px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-description {
    text-align: left;
  }

  .metric-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 150px;
  }

  .commentary-card {
    padding: 28px 22px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-disclaimer {
    text-align: left;
  }

}

/* =========================
   DAILY REPORT ARCHIVE
========================= */

.archive-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 20px;
}


.archive-card {
  display: flex;
  flex-direction: column;

  min-height: 280px;

  padding: 28px;

  background:
    linear-gradient(
      145deg,
      var(--panel),
      #0d1923
    );

  border:
    1px solid var(--border);

  border-radius:
    var(--border-radius);

  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}


.archive-card:hover {
  transform:
    translateY(-4px);

  border-color:
    rgba(66, 191, 245, 0.5);

  background:
    var(--panel-hover);
}


.archive-card-date {
  margin-bottom: 12px;

  color:
    var(--accent);

  font-size:
    12px;

  font-weight:
    800;

  text-transform:
    uppercase;

  letter-spacing:
    1.3px;
}


.archive-card h3 {
  margin:
    0 0 16px;

  font-size:
    24px;

  line-height:
    1.25;
}


.archive-card-summary {
  flex-grow: 1;

  color:
    var(--text-secondary);

  font-size:
    15px;
}


.archive-card-meta {
  margin-top:
    20px;

  padding-top:
    16px;

  border-top:
    1px solid var(--border);

  color:
    var(--text-muted);

  font-size:
    12px;
}


.archive-card-link {
  display:
    inline-block;

  margin-top:
    18px;

  color:
    var(--accent);

  font-size:
    14px;

  font-weight:
    800;
}


.archive-card-link:hover {
  text-decoration:
    underline;
}


.archive-back-link {
  display:
    inline-block;

  margin-bottom:
    28px;

  color:
    var(--accent);

  font-size:
    14px;

  font-weight:
    700;
}


.archive-back-link:hover {
  text-decoration:
    underline;
}


@media (max-width: 800px) {

  .archive-grid {
    grid-template-columns:
      1fr;
  }

}