:root {
  --oracle-red: #ff3b2f;
  --oracle-red-deep: #c74634;
  --navy: #043242;
  --navy-2: #062f3d;
  --teal: #0d6674;
  --teal-soft: #4c9a93;
  --green: #4f9c7c;
  --gold: #efaa25;
  --blue: #1479b8;
  --ink: #092c3f;
  --muted: #5f7180;
  --line: #e6ecef;
  --panel: #ffffff;
  --page: #f5f7f8;
  --shadow: 0 14px 34px rgba(2, 34, 48, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Poppins, "Oracle Sans", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

.side-nav {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  width: 224px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #042f3f 0%, #00283a 100%);
  box-shadow: 12px 0 28px rgba(0, 23, 35, 0.22);
}

.side-nav::before {
  content: "";
  position: absolute;
  inset: 46% -40% auto -32%;
  height: 170px;
  border-top: 2px dotted rgba(255, 103, 43, 0.92);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.side-nav::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 424px;
  background: url("assets/rail-bubbles.png") left bottom / 225px 424px no-repeat;
  pointer-events: none;
}

.side-nav nav {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 30px 14px 56px;
}

.oracle-logo-img {
  display: block;
  object-fit: contain;
}

.rail-logo {
  position: relative;
  z-index: 1;
  width: 150px;
  height: auto;
  margin: 0 0 10px;
}

.brand-logo {
  width: 158px;
  height: auto;
}

.rail-brand {
  position: relative;
  z-index: 1;
  padding: 54px 28px 28px;
}

.rail-brand strong {
  display: block;
  color: #fff;
  font-size: 1.22rem;
  font-weight: 500;
}

.rail-brand::after {
  content: "";
  display: block;
  width: calc(100% + 28px);
  margin-top: 24px;
  border-top: 2px solid var(--oracle-red);
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
}

.side-nav a.active,
.side-nav a:hover {
  background: rgba(16, 124, 145, 0.52);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  font-size: 1.35rem;
}

.app-shell {
  min-height: 100vh;
  margin-left: 224px;
  padding: 0 24px 40px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 234px;
  margin: 0 -24px;
  overflow: hidden;
  color: #fff;
  background:
    url("assets/hero-bubbles.png") right bottom / auto 234px no-repeat,
    linear-gradient(100deg, #042e3d 0%, #053344 54%, #062b39 100%);
  box-shadow: 0 14px 34px rgba(2, 34, 48, 0.18);
}

.hero::before {
  content: "";
  position: absolute;
  top: -72px;
  right: 20%;
  width: 340px;
  height: 150px;
  border-bottom: 2px dotted rgba(255, 103, 43, 0.88);
  border-radius: 50%;
  transform: rotate(-14deg);
}

.hero::after {
  content: "";
  position: absolute;
  right: 18%;
  bottom: 50px;
  width: 210px;
  height: 85px;
  border-bottom: 24px solid rgba(130, 22, 34, 0.34);
  border-radius: 0 0 180px 180px;
  transform: rotate(-10deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 58px 50px 48px;
}

.hero-kicker {
  margin: 0 0 18px;
  color: #e14335;
  font-size: 1.25rem;
  font-weight: 500;
}

.hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.55rem, 4.6vw, 4.8rem);
  line-height: 0.98;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.hero-brand {
  position: relative;
  z-index: 1;
  width: 288px;
  padding: 76px 32px 0;
  background: rgba(0, 35, 50, 0.42);
}

.hero-brand strong {
  display: block;
  margin-top: 8px;
  font-size: 1.38rem;
  font-weight: 500;
}

.hero-brand::after {
  content: "";
  display: block;
  width: calc(100% + 32px);
  margin-top: 28px;
  border-top: 2px solid var(--oracle-red);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--oracle-red-deep);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1rem;
}

.control-strip,
.registration-panel,
.panel,
.metric,
.footer-actions {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.control-strip {
  display: flex;
  align-items: end;
  gap: 26px;
  min-height: 96px;
  margin-top: 14px;
  padding: 18px 26px;
}

.control-strip p {
  margin: 0 0 13px;
  color: var(--ink);
  font-weight: 500;
}

.field,
.filter {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
}

input,
select {
  min-height: 46px;
  min-width: 212px;
  border: 1px solid #d9e2e6;
  border-radius: 6px;
  padding: 0 38px 0 14px;
  color: var(--ink);
  background: #fff;
}

button {
  min-height: 46px;
  border: 1px solid #9ec4c5;
  border-radius: 6px;
  padding: 0 18px;
  cursor: pointer;
  color: var(--ink);
  background: #fff;
}

button:hover,
input:hover,
input:focus,
select:hover {
  border-color: var(--teal);
}

input:focus,
select:focus {
  outline: 2px solid rgba(13, 102, 116, 0.16);
  outline-offset: 2px;
}

.registration-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) repeat(3, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
  margin-top: 14px;
  padding: 18px 26px;
}

.primary {
  color: #fff;
  border-color: var(--oracle-red-deep);
  background: var(--oracle-red-deep);
}

.ghost {
  background: #fff;
}

.summary-grid,
.dashboard-grid,
.trends-grid {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  padding: 20px 22px;
}

.metric span,
.metric small {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--ink);
}

.metric small {
  color: var(--muted);
}

.metric strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 12px 0 5px;
  color: var(--ink);
  font-size: 2.15rem;
  line-height: 1;
}

.metric.accent {
  color: #fff;
  border-color: #063344;
  background:
    radial-gradient(circle at 91% 80%, rgba(11, 119, 147, 0.96) 0 22%, transparent 23%),
    radial-gradient(circle at 68% 116%, rgba(7, 93, 118, 0.9) 0 32%, transparent 33%),
    linear-gradient(135deg, #042f3f, #002d3f);
}

.metric.accent span,
.metric.accent small,
.metric.accent strong {
  color: #fff;
}

.metric-gauge {
  position: absolute;
  right: 28px;
  top: 50px;
  width: 54px;
  height: 28px;
  border: 6px solid currentColor;
  border-bottom: 0;
  border-radius: 54px 54px 0 0;
  opacity: 0.95;
}

.gauge-orange {
  color: #f46a2a;
}

.gauge-green {
  color: #5da588;
}

.gauge-blue {
  color: var(--blue);
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(390px, 0.95fr);
  align-items: start;
}

.chart-panel {
  align-self: start;
}

.dashboard-grid > .panel:nth-child(2) {
  max-height: 574px;
  overflow-y: auto;
}

.trends-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 22px 26px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.chart-panel canvas {
  display: block;
  width: 100%;
  height: 460px;
  max-height: 460px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border-radius: 999px;
}

.dot.your {
  background: var(--oracle-red);
}

.dot.lad {
  background: var(--teal);
}

.dot.best {
  background: var(--gold);
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.signal-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.12);
}

.category-card:nth-child(3n + 1) .signal-icon {
  background: var(--oracle-red);
}

.category-card:nth-child(3n + 2) .signal-icon {
  background: var(--teal);
}

.category-card:nth-child(3n + 3) .signal-icon {
  background: var(--green);
}

.category-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-weight: 800;
}

.bar {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #eceeef;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--oracle-red), var(--gold));
}

.category-card p,
.recommendation p,
.source-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.recommendation {
  margin-top: 16px;
  border-left: 4px solid var(--oracle-red);
  padding: 12px 0 12px 14px;
}

.source-note {
  margin-top: 10px;
  font-size: 0.86rem;
}

.filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #e7edf0;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fff;
  background: var(--navy);
  font-size: 0.84rem;
}

td {
  line-height: 1.38;
}

td:first-child {
  width: 210px;
  color: var(--ink);
  font-weight: 800;
}

td:nth-child(3) {
  width: 210px;
}

.level-help {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: pre-line;
}

.trends-grid ul,
.source-panel ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.trends-grid li + li,
.source-panel li + li {
  margin-top: 10px;
}

.source-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 24px;
  margin-top: 18px;
}

.source-panel a {
  display: inline-block;
  margin-left: 8px;
  color: var(--oracle-red-deep);
  font-weight: 700;
  text-decoration: none;
}

.source-panel a:hover {
  text-decoration: underline;
}

.footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 22px;
}

.submit-status {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.submit-status.error {
  color: var(--oracle-red-deep);
}

.submit-status.success {
  color: var(--teal);
}

.powered {
  display: flex;
  gap: 6px;
  color: var(--ink);
}

.powered span {
  color: var(--muted);
}

.footer-buttons {
  display: flex;
  gap: 10px;
}

@media (max-width: 1120px) {
  .side-nav {
    position: relative;
    width: 100%;
    min-height: auto;
  }

  .side-nav nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 12px;
  }

  .rail-logo {
    margin: 0 0 8px;
  }

  .rail-brand {
    padding: 18px;
  }

  .app-shell {
    margin-left: 0;
  }
}

@media (max-width: 980px) {
  .hero,
  .panel-header,
  .source-panel,
  .control-strip,
  .registration-panel,
  .footer-actions {
    display: block;
  }

  .hero {
    min-height: 280px;
  }

  .hero-brand,
  .filter,
  .footer-buttons {
    margin-top: 16px;
  }

  .hero-brand {
    width: auto;
    padding: 0 50px 30px;
    background: transparent;
  }

  .summary-grid,
  .dashboard-grid,
  .trends-grid {
    grid-template-columns: 1fr;
  }

  .side-nav nav {
    grid-template-columns: 1fr;
  }

  .footer-buttons button {
    flex: 1;
  }

  .registration-panel .field + .field,
  .registration-panel .field,
  .registration-panel > div + .field {
    margin-top: 12px;
  }
}
