:root {
  --live-navy: #262262;
  --live-navy-deep: #181542;
  --live-navy-soft: #504b83;
  --live-yellow: #f8cf2a;
  --live-yellow-deep: #dcae00;
  --live-yellow-soft: #fff6c8;
  --live-canvas: #f5f5fa;
  --live-card: rgba(255, 255, 255, 0.92);
  --live-ink: #171629;
  --live-muted: #747187;
  --live-line: #e8e7f0;
  --live-success: #16875a;
  --live-success-soft: #e8f8f0;
  --live-danger: #ce4050;
  --live-danger-soft: #fff0f2;
  --live-shadow: 0 24px 70px rgba(24, 21, 66, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--live-canvas);
  color: var(--live-ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body::selection {
  background: var(--live-yellow);
  color: var(--live-navy-deep);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select {
  font: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.live-background {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.live-grid {
  background-image:
    linear-gradient(rgba(38, 34, 98, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 34, 98, 0.028) 1px, transparent 1px);
  background-size: 46px 46px;
  inset: 0;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  position: absolute;
}

.live-orb {
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.7;
  position: absolute;
}

.live-orb-one {
  background: rgba(248, 207, 42, 0.2);
  height: 430px;
  right: -170px;
  top: 80px;
  width: 430px;
}

.live-orb-two {
  background: rgba(38, 34, 98, 0.1);
  height: 520px;
  left: -260px;
  top: 620px;
  width: 520px;
}

.public-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1460px;
  padding: 24px 30px;
  position: relative;
  z-index: 10;
}

.public-brand {
  align-items: center;
  display: flex;
  gap: 14px;
}

.public-logo {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(38, 34, 98, 0.08);
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(24, 21, 66, 0.09);
  display: flex;
  height: 56px;
  justify-content: center;
  padding: 8px 11px;
}

.public-logo img {
  display: block;
  height: auto;
  max-width: 138px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy strong {
  color: var(--live-navy-deep);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  color: var(--live-muted);
  font-size: 10px;
}

.public-header-actions {
  align-items: center;
  display: flex;
  gap: 11px;
}

.public-live-pill {
  align-items: center;
  background: var(--live-success-soft);
  border: 1px solid rgba(22, 135, 90, 0.1);
  border-radius: 999px;
  color: var(--live-success);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 8px;
  letter-spacing: 0.08em;
  padding: 10px 13px;
  text-transform: uppercase;
}

.public-live-pill i {
  animation: livePulse 1.8s ease-out infinite;
  background: var(--live-success);
  border-radius: 50%;
  height: 7px;
  width: 7px;
}

.admin-access {
  border: 1px solid var(--live-line);
  border-radius: 999px;
  color: var(--live-navy-soft);
  font-size: 11px;
  font-weight: 800;
  padding: 10px 16px;
  transition: 180ms ease;
}

.admin-access:hover {
  background: var(--live-navy);
  border-color: var(--live-navy);
  color: #fff;
  transform: translateY(-1px);
}

.public-main {
  margin: 0 auto;
  max-width: 1460px;
  padding: 0 30px 80px;
}

.public-hero {
  align-items: end;
  background:
    radial-gradient(circle at 84% 12%, rgba(248, 207, 42, 0.28), transparent 25%),
    linear-gradient(135deg, var(--live-navy) 0%, var(--live-navy-deep) 72%);
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(24, 21, 66, 0.24);
  color: #fff;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 350px);
  min-height: 410px;
  overflow: hidden;
  padding: clamp(38px, 6vw, 74px);
  position: relative;
}

.public-hero::before,
.public-hero::after {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.public-hero::before {
  height: 420px;
  right: -150px;
  top: -210px;
  width: 420px;
}

.public-hero::after {
  bottom: -320px;
  height: 550px;
  left: 35%;
  width: 550px;
}

.hero-copy,
.year-selector {
  position: relative;
  z-index: 1;
}

.public-eyebrow {
  color: var(--live-navy-soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.17em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero-copy .public-eyebrow {
  color: var(--live-yellow);
}

.hero-copy h1 {
  font-size: clamp(46px, 6vw, 82px);
  letter-spacing: -0.06em;
  line-height: 0.96;
  margin: 0;
  max-width: 790px;
}

.hero-copy h1 span {
  color: var(--live-yellow);
}

.hero-copy > p:last-child {
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(13px, 1.5vw, 16px);
  line-height: 1.75;
  margin: 25px 0 0;
  max-width: 590px;
}

.year-selector {
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 23px;
  box-shadow: 0 25px 55px rgba(4, 3, 26, 0.18);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.year-selector label {
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 9px;
  text-transform: uppercase;
}

.year-select-wrap {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  display: flex;
  height: 56px;
  overflow: hidden;
  position: relative;
}

.year-select-wrap svg {
  color: var(--live-navy);
  height: 19px;
  margin-left: 17px;
  pointer-events: none;
  position: absolute;
  width: 19px;
  z-index: 1;
}

.year-select-wrap::after {
  border-bottom: 2px solid var(--live-navy);
  border-right: 2px solid var(--live-navy);
  content: "";
  height: 8px;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 46%;
  transform: rotate(45deg);
  width: 8px;
}

.year-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: var(--live-navy-deep);
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
  height: 100%;
  outline: 0;
  padding: 0 50px 0 51px;
  width: 100%;
}

.year-select-wrap select option {
  background: #fff;
  color: var(--live-navy-deep);
}

.year-selector button {
  background: var(--live-yellow);
  border: 0;
  border-radius: 12px;
  color: var(--live-navy-deep);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  margin-top: 10px;
  min-height: 45px;
  transition: 170ms ease;
}

.year-selector button:hover {
  background: #ffe15d;
  box-shadow: 0 12px 30px rgba(248, 207, 42, 0.22);
  transform: translateY(-2px);
}

.year-selector > p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 8px;
  line-height: 1.5;
  margin: 13px 2px 0;
  text-align: center;
}

.public-alert {
  background: var(--live-danger-soft);
  border: 1px solid rgba(206, 64, 80, 0.14);
  border-radius: 14px;
  color: var(--live-danger);
  font-size: 12px;
  font-weight: 700;
  margin-top: 20px;
  padding: 15px 18px;
}

.public-summary {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 20px;
}

.public-stat {
  background: var(--live-card);
  border: 1px solid rgba(38, 34, 98, 0.07);
  border-radius: 21px;
  box-shadow: 0 18px 45px rgba(24, 21, 66, 0.06);
  min-height: 190px;
  overflow: hidden;
  padding: 24px;
  position: relative;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.public-stat:hover {
  box-shadow: 0 25px 55px rgba(24, 21, 66, 0.1);
  transform: translateY(-4px);
}

.public-stat.stat-primary {
  background:
    radial-gradient(circle at 100% 0, rgba(248, 207, 42, 0.18), transparent 40%),
    var(--live-navy-deep);
  border-color: transparent;
  color: #fff;
}

.stat-icon {
  align-items: center;
  background: rgba(248, 207, 42, 0.15);
  border-radius: 12px;
  color: var(--live-yellow);
  display: flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.stat-icon.yellow {
  background: var(--live-yellow-soft);
  color: var(--live-yellow-deep);
}

.stat-icon.soft {
  background: #f0eff8;
  color: var(--live-navy);
}

.stat-icon svg {
  height: 19px;
  width: 19px;
}

.public-stat > p {
  color: var(--live-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 21px 0 6px;
  text-transform: uppercase;
}

.public-stat.stat-primary > p {
  color: rgba(255, 255, 255, 0.53);
}

.public-stat h2 {
  color: var(--live-navy-deep);
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.05em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-stat.stat-primary h2 {
  color: #fff;
}

.public-stat h2.stat-text {
  font-size: clamp(22px, 2.5vw, 30px);
}

.public-stat small {
  color: #a09dad;
  display: block;
  font-size: 9px;
  line-height: 1.5;
  margin-top: 8px;
}

.public-stat.stat-primary small {
  color: rgba(255, 255, 255, 0.38);
}

.stat-split {
  align-items: center;
  display: flex;
  gap: 15px;
}

.stat-split span {
  align-items: baseline;
  color: var(--live-muted);
  display: flex;
  font-size: 11px;
  gap: 4px;
  letter-spacing: 0;
}

.stat-split span:first-child b {
  color: var(--live-success);
}

.stat-split span:last-child b {
  color: var(--live-danger);
}

.stat-split b {
  font-size: 30px;
}

.public-chart-panel,
.comparison-section {
  background: var(--live-card);
  border: 1px solid rgba(38, 34, 98, 0.07);
  border-radius: 26px;
  box-shadow: var(--live-shadow);
  margin-top: 20px;
  padding: clamp(23px, 4vw, 38px);
}

.public-section-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.public-section-heading h2 {
  color: var(--live-navy-deep);
  font-size: clamp(22px, 3vw, 31px);
  letter-spacing: -0.045em;
  margin: 0;
}

.public-legend {
  align-items: center;
  display: flex;
  gap: 17px;
  padding-top: 12px;
}

.public-legend span {
  align-items: center;
  color: var(--live-muted);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 7px;
}

.public-legend i {
  display: block;
}

.legend-line {
  background: var(--live-navy);
  border-radius: 4px;
  height: 3px;
  position: relative;
  width: 18px;
}

.legend-line::after {
  background: #fff;
  border: 2px solid var(--live-navy);
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 5px;
  position: absolute;
  top: -3px;
  width: 5px;
}

.legend-bar {
  background: var(--live-yellow);
  border-radius: 3px 3px 1px 1px;
  height: 13px;
  width: 9px;
}

.public-chart-shell {
  height: 430px;
  margin-top: 25px;
  position: relative;
  width: 100%;
}

.public-chart-shell canvas {
  height: 100% !important;
  width: 100% !important;
}

.public-chart-shell.chart-error {
  align-items: center;
  background: #f8f7fb;
  border-radius: 16px;
  color: var(--live-muted);
  display: flex;
  font-size: 12px;
  justify-content: center;
}

.chart-note {
  border-top: 1px solid var(--live-line);
  color: #9693a4;
  font-size: 9px;
  line-height: 1.6;
  margin: 18px 0 0;
  padding-top: 14px;
}

.public-empty-state {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 350px;
  text-align: center;
}

.public-empty-state > span {
  align-items: center;
  background: var(--live-yellow-soft);
  border-radius: 17px;
  color: var(--live-navy);
  display: flex;
  height: 62px;
  justify-content: center;
  width: 62px;
}

.public-empty-state svg {
  height: 26px;
  width: 26px;
}

.public-empty-state h3 {
  color: var(--live-navy-deep);
  font-size: 18px;
  margin: 17px 0 6px;
}

.public-empty-state p {
  color: var(--live-muted);
  font-size: 11px;
  margin: 0;
}

.comparison-section {
  box-shadow: 0 18px 50px rgba(24, 21, 66, 0.07);
}

.latest-note {
  background: #f2f1f8;
  border-radius: 999px;
  color: var(--live-navy-soft);
  font-size: 9px;
  font-weight: 800;
  margin: 7px 0 0;
  padding: 9px 12px;
}

.month-comparison-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
}

.month-comparison-card {
  background: #fff;
  border: 1px solid var(--live-line);
  border-radius: 17px;
  min-width: 0;
  padding: 17px;
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.month-comparison-card:hover {
  border-color: rgba(38, 34, 98, 0.22);
  box-shadow: 0 16px 35px rgba(24, 21, 66, 0.08);
  transform: translateY(-3px);
}

.month-comparison-card.no-data {
  background: #faf9fc;
  opacity: 0.72;
}

.month-card-heading {
  align-items: center;
  display: flex;
  gap: 11px;
  margin-bottom: 16px;
}

.month-card-heading > span {
  align-items: center;
  background: var(--live-navy-deep);
  border-radius: 10px;
  color: var(--live-yellow);
  display: flex;
  font-size: 10px;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.month-card-heading p {
  color: var(--live-navy-deep);
  font-size: 13px;
  font-weight: 850;
  margin: 0;
}

.month-card-heading small {
  color: #aaa7b6;
  display: block;
  font-size: 9px;
  margin-top: 2px;
}

.month-metric {
  align-items: center;
  border-top: 1px solid #f0eff4;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 56px;
}

.month-metric > div {
  min-width: 0;
}

.month-metric > div > span {
  color: #9c99a9;
  display: block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.month-metric strong {
  color: var(--live-navy-deep);
  display: block;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.change-tag {
  border-radius: 999px;
  flex: none;
  font-size: 8px;
  font-weight: 900;
  padding: 6px 8px;
  white-space: nowrap;
}

.change-tag.increase {
  background: var(--live-success-soft);
  color: var(--live-success);
}

.change-tag.decrease {
  background: var(--live-danger-soft);
  color: var(--live-danger);
}

.change-tag.stable {
  background: #efeff5;
  color: var(--live-navy-soft);
}

.change-tag.neutral,
.change-tag.missing {
  background: #f4f3f7;
  color: #9b98a7;
}

.public-footer {
  align-items: center;
  border-top: 1px solid rgba(38, 34, 98, 0.08);
  color: var(--live-muted);
  display: grid;
  font-size: 9px;
  gap: 20px;
  grid-template-columns: 1fr auto 1fr;
  margin: 0 auto;
  max-width: 1400px;
  padding: 28px 0 36px;
}

.public-footer img {
  height: auto;
  max-width: 100px;
}

.public-footer p {
  margin: 0;
  text-align: center;
}

.public-footer > span {
  text-align: right;
}

.live-reveal {
  animation: liveRise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes liveRise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 135, 90, 0.4);
  }

  75%,
  100% {
    box-shadow: 0 0 0 8px rgba(22, 135, 90, 0);
  }
}

@media (max-width: 1100px) {
  .public-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .public-header,
  .public-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .public-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .year-selector {
    max-width: 420px;
  }

  .month-comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-chart-shell {
    height: 370px;
  }

  .public-footer {
    margin-left: 18px;
    margin-right: 18px;
  }
}

@media (max-width: 560px) {
  .public-header {
    padding-bottom: 16px;
    padding-top: 16px;
  }

  .public-logo {
    height: 48px;
    padding: 7px 9px;
  }

  .public-logo img {
    max-width: 112px;
  }

  .brand-copy {
    display: none;
  }

  .public-live-pill {
    font-size: 8px;
    padding: 9px 10px;
  }

  .admin-access {
    font-size: 9px;
    padding: 9px 12px;
  }

  .public-main {
    padding-bottom: 50px;
  }

  .public-hero {
    border-radius: 23px;
    gap: 30px;
    min-height: auto;
    padding: 34px 22px 24px;
  }

  .hero-copy h1 {
    font-size: clamp(39px, 13vw, 56px);
  }

  .hero-copy > p:last-child {
    font-size: 12px;
    line-height: 1.65;
    margin-top: 18px;
  }

  .year-selector {
    padding: 18px;
  }

  .year-select-wrap select {
    font-size: 18px;
  }

  .public-summary {
    grid-template-columns: 1fr;
  }

  .public-stat {
    min-height: 170px;
  }

  .public-chart-panel,
  .comparison-section {
    border-radius: 20px;
    padding: 21px 16px;
  }

  .public-section-heading {
    gap: 15px;
  }

  .public-section-heading h2 {
    font-size: 22px;
  }

  .public-legend {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
  }

  .public-chart-shell {
    height: 330px;
    margin-left: -4px;
    width: calc(100% + 8px);
  }

  .latest-note {
    display: none;
  }

  .month-comparison-grid {
    grid-template-columns: 1fr;
  }

  .month-comparison-card {
    padding: 16px;
  }

  .public-footer {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 25px 0 30px;
    text-align: center;
  }

  .public-footer > span {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
