:root {
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 14px;
  --gold: #8c6d1f;
  --gold-soft: #c7a95f;
  --navy: #1f2a6d;
  --navy-deep: #16325c;
  --state-blue: #2a4b8d;
  --link: #0b5cab;
}

body[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #edf1f8;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --line: #d7deea;
  --line-soft: #e6ebf3;
  --text: #1d2736;
  --muted: #5a6677;
  --accent: #2f5597;
  --accent-2: #446db3;
  --tab: #eef2f8;
  --tab-active: #ffffff;
  --input: #ffffff;
  --table-head: #eff3f9;
  --card-shadow: 0 10px 28px rgba(21, 37, 77, .08);
  --highlight-color: #8c6d1f;
}

body[data-theme="dark"] {
  --bg: #0d1320;
  --bg-2: #131d30;
  --panel: #162031;
  --panel-2: #1b273c;
  --line: #2b3a52;
  --line-soft: #33445f;
  --text: #e8edf7;
  --muted: #a7b6ca;
  --accent: #7db4ff;
  --accent-2: #9fc7ff;
  --tab: #152034;
  --tab-active: #203252;
  --input: #0f1828;
  --table-head: #152138;
  --card-shadow: 0 18px 52px rgba(0, 0, 0, .35);
  --highlight-color: #c7a95f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Google Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text)
}

body {
  min-height: 100vh;
  transition: background-color .2s ease, color .2s ease
}

a {
  color: var(--link)
}

.container,
.page-shell {
  max-width: 1400px;
  margin: 0 auto
}

.top-banner {
  background: linear-gradient(180deg, var(--gold) 0%, #7a5d15 100%);
  color: #fff;
  border-bottom: 4px solid #5a440e;
}

.top-banner.is-hidden {
  display: none
}

.top-banner-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 20px;
}

.top-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
}

.top-banner-copy strong {
  font-weight: 800
}

.top-banner-copy a {
  color: #dce8ff;
  text-decoration: underline;
  font-weight: 700
}

.banner-close {
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}

.page-shell {
  padding: 32px 12px
}

.site-header {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  box-shadow: var(--card-shadow);
  margin-bottom: 10px;
}

.site-brand-kicker {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #c7d5f3;
  margin-bottom: 10px;
}

.site-brand-row {
  display: flex;
  gap: 16px;
  align-items: center
}

.brand-mark {
  width: 66px;
  height: 66px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #d7e0f7 0%, #f7f9ff 100%);
  position: relative;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 13px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold) 0%, #a98632 100%);
}

.brand-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.05
}

.brand-subtitle {
  margin-top: 8px;
  color: #d7e0f7;
  font-size: 16px
}

.header-actions {
  display: flex;
  align-items: flex-start
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  width: fit-content;
}

.advanced-options-wrap {
  margin-bottom: 16px
}

.advanced-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--card-shadow);
}

.advanced-toggle-plus {
  font-size: 18px;
  line-height: 1
}

.controls-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px;
  margin-top: 12px;
}

.controls-card.is-hidden {
  display: none
}

.control label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700
}

.control select,
.control input,
.assumptions-grid input {
  width: 100%;
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 10px 0 12px;
  border-bottom: 2px solid var(--line);
  margin: 0 0 18px;
  overflow-x: auto;
}

.tab-btn {
  border: 1px solid var(--line);
  border-bottom: none;
  background: var(--tab);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 700;
  font-family: 'Google Sans' !important;
}

.tab-btn.active {
  background: var(--tab-active);
  color: var(--accent);
  box-shadow: inset 0 -3px 0 var(--gold);
}

.tab-panel {
  display: none
}

.tab-panel.active {
  display: block
}

.grid {
  display: grid;
  gap: 16px
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px
}

.panel,
.controls-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}

.stat-card,
.mini-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.stat-card .label,
.mini-stat .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800
}

.stat-card .value,
.mini-stat .value {
  font-size: 30px;
  font-weight: 800;
  margin-top: 10px
}

.stat-card .sub,
.mini-stat .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45
}

.two-col {
  grid-template-columns: 1.15fr .85fr
}

.panel {
  padding: 18px 18px 16px
}

.panel-header {
  margin-bottom: 16px
}

.panel-header h2 {
  margin: 0;
  font-size: 24px;
  color: var(--accent)
}

.panel-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5
}

.assumptions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px
}

.assumptions-grid label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700
}

.button {
  border: none;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--state-blue), var(--navy-deep));
  color: white;
  font: inherit;
  font-weight: 800;
  padding: 12px 14px;
  width: 100%;
  cursor: pointer;
}

.mini-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--panel)
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left
}

th {
  position: sticky;
  top: 0;
  background: var(--table-head);
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer
}

tbody tr:hover {
  background: var(--bg-2)
}

.muted {
  color: var(--muted)
}

canvas {
  width: 100% !important;
  max-height: 350px !important
}

@media (max-width:1200px) {

  .stats-grid,
  .two-col,
  .controls-card,
  .assumptions-grid,
  .mini-stats {
    grid-template-columns: 1fr
  }

  .site-header {
    display: grid
  }

  .brand-title {
    font-size: 36px
  }
}

@media (max-width:760px) {
  .top-banner-inner {
    flex-direction: row;
    align-items: flex-start
  }

  .site-brand-row {
    align-items: flex-start
  }

  .brand-mark {
    width: 54px;
    height: 54px
  }

  .brand-title {
    font-size: 30px
  }

  .header-actions {
    margin-top: 6px
  }
}



.impact-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  margin-bottom: 16px;
}

.impact-copy,
.impact-note {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--card-shadow);
}

.impact-copy {
  border-left: 6px solid var(--gold);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 22px 22px 20px;
}

.impact-note {
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.impact-kicker {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.impact-kicker p {
  margin: 0 0 0 10px;
}

.impact-kicker i {
  rotate: calc(45deg)
}

.impact-hero h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.05;
  color: var(--text);
}

.impact-hero p,
.impact-note span {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.impact-note strong {
  font-size: 15px;
  color: var(--accent);
}

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

.impact-card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border-top: 4px solid var(--gold);
  border-radius: 0px 0px 10px 10px;
  padding: 16px;
  box-shadow: var(--card-shadow);
}

.impact-card-modified {
  outline: 1px solid var(--accent-2);
}

.impact-card .label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

.impact-card .value {
  font-size: 34px;
  font-weight: 800;
  margin-top: 10px;
  line-height: 1.05;
}

.impact-card .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.45;
}

.insight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.insight-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.insight-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--accent);
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width:1200px) {

  .impact-hero,
  .impact-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .impact-hero h2 {
    font-size: 30px;
  }
}


.live-now-panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 18px;
  margin-bottom: 16px;
}

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

.live-now-header h3 {
  margin: 0;
  font-size: 24px;
  color: var(--accent);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.live-now-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width:1200px) {
  .live-now-grid {
    grid-template-columns: 1fr;
  }

  .live-now-header {
    flex-direction: column;
  }

  .split-metrics {
    justify-content: flex-start !important;
  }

  .two-col,
  .two-col-modified {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .split-metrics {
    justify-content: center !important;
  }

  .site-header {
    gap: 8px;
    padding: 24px;
  }

  .header-actions {
    display: none;
  }
}

.data-source-link {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.data-source-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.other-link {
  color: var(--accent);
}

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

.data-source-link p {
  margin: 0;
  padding: 0;
}

.impact-card-split .split-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 10px;
}

.impact-card-split .split-metric {
  text-align: center;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.impact-card-split .split-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}

.impact-card-split .split-label {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.impact-card-split .split-plus {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.split-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-icon {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0;
  margin: 0;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.tooltip-icon:hover,
.tooltip-wrap:hover .tooltip-icon {
  color: var(--accent);
  opacity: 1;
}

.tooltip-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 20;
}

.tooltip-wrap:hover .tooltip-bubble,
.tooltip-wrap:focus-within .tooltip-bubble {
  opacity: 1;
  visibility: visible;
}

.tooltip-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--panel) transparent transparent transparent;
}

@media (max-width: 1600px) {
  .tooltip-bubble {
    left: auto;
    right: 0;
    transform: none;
    width: min(240px, calc(100vw - 32px));
  }

  .tooltip-bubble::after {
    left: auto;
    right: 10px;
    transform: none;
  }
}

input {
  margin-top: 6px;
}

.all-time-section {
  border: 2px dashed #2a4b8d;
  padding: 18px 18px 18px 18px;
  border-radius: 10px;
  margin-bottom: 14px;
  transition: 1s;
}

/* horizontal scrollbar for tabs only, WIP */
.tabs {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  border-bottom: none;
  box-shadow: none;
  padding-left: 4px;
  padding-right: 4px;
  font-family: 'Google Sans' !important;
}

.tabs::-webkit-scrollbar {
  height: 8px;
}

.tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: transparent;
}

.tabs::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.tabs::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.tabs:hover::-webkit-scrollbar-thumb {
  background: var(--accent);
}

.tabs {
  scrollbar-color: rgba(100, 149, 237, 0.3) transparent;
}

.tabs:hover {
  scrollbar-color: rgba(100, 149, 237, 1) transparent;
}

.featured {
  transition: 0.3s;
  position: relative;
  outline: 2px solid var(--gold);
}

.featured .value {
  color: var(--highlight-color);
}

.featured:hover {
  filter: brightness(1.05);
  transition: 0.3s;
  transform: translateY(-3px);
}

@media (max-width: 1100px) {
  #estimations-container {
    display: none;
  }
}

.method-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
}

.method-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 8px;
}

.method-formula {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
}

.method-note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.two-col-modified {
  grid-template-columns: 1fr 1fr;
}

.gold-text {
  color: var(--highlight-color);
}

#workforce-mix-graph {
  max-height: 800px !important;
}

.toast {
  position: fixed;
  top: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(20, 28, 45, 0.95);
  color: #d9e6ff;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.reset-link {
  font-size: 16px;
  color: var(--accent);
  cursor: pointer;
  opacity: 0.8;
  width: 100%;
  justify-content: center;
  align-items: center;
  display: flex;
  text-decoration: none;
  margin-bottom: 16px;
  margin-top: 6px;
}

.reset-link:hover {
  text-decoration: underline;
}

.reset-link:hover {
  opacity: 1;
}

#recalcBenefits:hover {
  opacity: 0.8;
}

caption {
  padding-left: 10px !important;
}