:root {
  color-scheme: dark;
  --bg: #111827;
  --panel: #1f2937;
  --panel-soft: #18212f;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #60a5fa;
  --accent-strong: #3b82f6;
  --danger: #f87171;
  --success: #34d399;
  --border: #374151;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(circle at top, #172554 0%, #111827 40%, #0b1120 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.app-root {
  min-height: calc(100vh - 48px);
}

.panel {
  background: rgba(31, 41, 55, 0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  gap: 18px;
  align-items: start;
}

.hero-card {
  max-width: 520px;
  margin: 7vh auto 0;
}

.hero-title,
.section-title {
  margin: 0 0 10px;
  line-height: 1.2;
}

.hero-title {
  font-size: 2rem;
}

.hero-subtitle,
.muted {
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.95rem;
  font-weight: 600;
}

.field input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.field input:focus {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
}

.button-secondary {
  background: #0f172a;
  color: var(--text);
  border: 1px solid var(--border);
}

.alert {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
}

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


.app-header-tight {
  flex-wrap: nowrap;
  align-items: start;
}

.titlebar-left {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.titlebar-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.titlebar-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.titlebar-meta {
  margin-top: 2px;
}

.titlebar-actions {
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  padding: 10px;
  width: 42px;
  height: 42px;
}

.icon-button svg {
  display: block;
}

.status-pill-tight {
  padding: 5px 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .app-header-tight {
    flex-wrap: wrap;
  }

  .titlebar-actions {
    flex-wrap: wrap;
  }
}


.brand-title {
  margin: 0;
  font-size: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  color: var(--success);
  background: rgba(6, 95, 70, 0.18);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
}

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

.grid-two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard-primary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: stretch;
}

.dashboard-primary-row #dashboard-my-status-slot,
.dashboard-primary-row #dashboard-xp-slot {
  flex: 1 1 280px;
}

.dashboard-primary-row #dashboard-audit-slot {
  flex: 1.6 1 360px;
}

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

.kv-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.kv-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.card-title {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #0f172a;
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 8px;
  word-break: break-all;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.footer-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .profile-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding: 16px;
  }

  .hero-card {
    margin-top: 3vh;
  }

  .hero-title {
    font-size: 1.65rem;
  }

  .welcome-panel {
    align-items: start;
    flex-direction: column;
  }

  .profile-facts-grid {
    grid-template-columns: 1fr;
  }
}


.compact-list .kv-item {
  padding-bottom: 8px;
}

.sub-title {
  margin: 16px 0 10px;
  font-size: 0.95rem;
}

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(55, 65, 81, 0.6);
}

.row-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.small {
  font-size: 0.84rem;
}

.badge-neutral {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(51, 65, 85, 0.35);
}

.badge-success {
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.24);
  background: rgba(6, 95, 70, 0.18);
}

.badge-danger {
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.2);
}


.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.panel-subtitle {
  margin: 6px 0 0;
  font-size: 0.95rem;
}

.profile-top-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.25fr);
  align-items: stretch;
}

.welcome-panel {
  display: flex;
  gap: 18px;
  align-items: center;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.92));
}

.welcome-badge {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.22);
  flex: 0 0 auto;
}

.welcome-copy {
  display: grid;
  gap: 10px;
}

.eyebrow {
  margin: 0;
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.welcome-title {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.05;
}

.welcome-subtitle {
  margin: 0;
  max-width: 44ch;
}

.welcome-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: #dbeafe;
  font-size: 0.9rem;
}

.personal-info-panel {
  min-height: 100%;
}

.profile-facts-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-fact {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(55, 65, 81, 0.85);
  background: rgba(15, 23, 42, 0.6);
}

.profile-fact-emphasis {
  border-color: rgba(96, 165, 250, 0.35);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.88));
}

.profile-fact-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-fact-value {
  font-size: 1rem;
  line-height: 1.35;
  word-break: break-word;
}


.profile-top-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
}

.welcome-panel {
  display: flex;
  gap: 16px;
  align-items: center;
}

.welcome-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(96,165,250,0.22), rgba(59,130,246,0.35));
  border: 1px solid rgba(96,165,250,0.4);
  font-size: 1.5rem;
  font-weight: 800;
}

.welcome-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
}

.eyebrow,
.panel-subtitle,
.small {
  margin: 0;
  color: var(--muted);
}

.welcome-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.welcome-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  font-size: 0.9rem;
}

.status-pill-active {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.panel-heading,
.my-status-heading,
.stats-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-facts-grid,
.status-metrics-grid,
.stats-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.profile-fact,
.status-metric-card,
.mini-stat,
.status-subpanel {
  border: 1px solid rgba(55, 65, 81, 0.7);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  padding: 14px;
}

.profile-fact-label,
.status-metric-label,
.status-hero-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-fact-value,
.status-metric-value {
  font-size: 1.05rem;
}

.profile-fact-emphasis,
.status-hero-card {
  border-color: rgba(96,165,250,0.35);
  background: linear-gradient(180deg, rgba(15,23,42,0.92), rgba(15,23,42,0.78));
}

.my-status-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.2fr);
  margin-bottom: 16px;
}

.status-hero-card {
  padding: 18px;
  border-radius: 16px;
}

.status-hero-value {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 10px;
}

.status-metric-detail,
.status-hero-detail {
  margin: 8px 0 0;
}

.my-status-lists {
  align-items: start;
}

.list-plain {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.list-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.row-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: end;
}

.sub-title {
  margin: 0 0 12px;
  font-size: 0.98rem;
}

.badge-neutral {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.75);
}

.badge-success {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.24);
  background: rgba(6, 95, 70, 0.18);
}

.badge-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.2);
}

.compact-list .kv-item {
  padding-bottom: 8px;
}

@media (max-width: 860px) {
  .my-status-layout,
  .profile-top-grid {
    grid-template-columns: 1fr;
  }
}


.skills-overview-panel {
  display: grid;
  gap: 16px;
}

.skills-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.skills-groups-grid {
  align-items: start;
}

.skills-pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-pill-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.7);
  background: rgba(15, 23, 42, 0.7);
}

.skill-pill-row-empty {
  opacity: 0.72;
}

.skill-pill-name {
  font-weight: 600;
  text-transform: none;
}


.audit-ratio-panel strong {
  font-size: 1.05rem;
}


.dashboard-shell {
  align-items: start;
}

/* Keep the title bar visible while the dashboard scrolls. */
#dashboard-title-bar-slot {
  position: sticky;
  top: 0;
  z-index: 40;
}

#dashboard-title-bar-slot .app-header {
  margin-bottom: 0;
}

/* When a single dashboard slot renders multiple containers, keep spacing consistent. */
.dashboard-slot > .panel + .panel {
  margin-top: 16px;
}

.dashboard-slot {
  min-width: 0;
  min-height: 0;
}

#dashboard-error-slot:empty {
  display: none;
}


/* === Charts / SVG theme === */
.chart-block {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.chart-copy {
  max-width: 520px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-surface {
  fill: rgba(15, 23, 42, 0.55);
  stroke: rgba(148, 163, 184, 0.14);
}

.chart-axis {
  stroke: rgba(148, 163, 184, 0.32);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart-grid {
  stroke: rgba(148, 163, 184, 0.14);
  stroke-width: 1;
  shape-rendering: crispEdges;
}

.chart-axis-text {
  fill: var(--muted);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.chart-value-text {
  fill: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.chart-line {
  stroke: var(--accent);
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: #0f172a;
  stroke: var(--accent);
  stroke-width: 2;
}

.chart-bar {
  stroke: rgba(0, 0, 0, 0.18);
  stroke-width: 1;
}

.chart-bar-primary {
  fill: var(--accent);
}

.chart-bar-secondary {
  fill: rgba(52, 211, 153, 0.92);
}

.chart-line-area {
  stroke-width: 3.5;
}

.chart-pie-slice {
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.22));
}

.chart-radar-grid {
  fill: none;
  stroke: rgba(148, 163, 184, 0.18);
  stroke-width: 1;
}

.chart-radar-axis {
  stroke: rgba(148, 163, 184, 0.22);
  stroke-width: 1;
}

.chart-radar-shape {
  stroke: var(--accent);
  stroke-width: 2.75;
  stroke-linejoin: round;
  filter: drop-shadow(0 10px 18px rgba(59, 130, 246, 0.18));
}

.chart-radar-point {
  fill: #0f172a;
  stroke: rgba(96, 165, 250, 0.95);
  stroke-width: 2;
}

.chart-placeholder {
  border: 1px dashed rgba(148, 163, 184, 0.32);
  border-radius: 14px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.4);
}

.chart-placeholder-title {
  font-weight: 700;
  margin-bottom: 6px;
}


.stats-panel {
  display: grid;
  gap: 18px;
}

.stats-chart-grid {
  align-items: stretch;
}

.chart-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(55, 65, 81, 0.72);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.68));
}

.chart-card .sub-title {
  margin-top: 0;
}

.chart-footer-note {
  margin-top: 0;
}

.chart-loading-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.34);
  padding: 18px;
  text-align: center;
}

.chart-area {
  opacity: 1;
}

.chart-surface {
  fill: rgba(15, 23, 42, 0.72);
  stroke: rgba(148, 163, 184, 0.16);
}

.chart-grid {
  stroke: rgba(148, 163, 184, 0.12);
}

.chart-axis-text {
  font-size: 11.5px;
}

.chart-value-text {
  font-size: 11.5px;
}

.chart-line {
  filter: drop-shadow(0 8px 18px rgba(59, 130, 246, 0.2));
}

.chart-bar-primary {
  fill: var(--accent);
}

.chart-bar-secondary {
  fill: rgba(52, 211, 153, 0.92);
}

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

  .chart-card {
    padding: 14px;
  }
}


.my-status-panel-compact {
  display: grid;
  gap: 14px;
  align-content: start;
}

.my-status-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.my-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.my-status-meta {
  display: flex;
  justify-content: flex-end;
}

.my-status-level-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background: rgba(15, 23, 42, 0.9);
  color: #dbeafe;
  font-weight: 700;
}

.my-status-view-more {
  border: 0;
  background: transparent;
  color: #93c5fd;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.my-status-view-more:hover {
  color: #dbeafe;
  text-decoration: underline;
}

.my-status-circle-wrap {
  display: grid;
  place-items: center;
  padding: 10px 0 4px;
}

.my-status-level-svg {
  width: min(220px, 62vw);
  height: auto;
  display: block;
  overflow: visible;
}

.my-status-level-svg-halo {
  fill: rgba(37, 99, 235, 0.14);
  filter: url(#myStatusLevelGlow);
}

.my-status-level-svg-outer {
  fill: url(#myStatusLevelRing);
}

.my-status-level-svg-inner {
  fill: rgba(8, 15, 32, 0.88);
  stroke: url(#myStatusLevelInnerRing);
  stroke-width: 3;
}

.my-status-level-svg-core {
  fill: url(#myStatusLevelBg);
  stroke: rgba(224, 242, 254, 0.16);
  stroke-width: 1.5;
}

.my-status-level-svg-sheen {
  fill: rgba(255, 255, 255, 0.16);
}

.my-status-level-svg-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.32em;
  fill: #bfdbfe;
}

.my-status-level-svg-number {
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -0.06em;
  fill: #f8fbff;
}

.xp-summary-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.xp-summary-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.xp-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.xp-summary-view-more {
  border: 0;
  background: transparent;
  color: rgba(52, 211, 153, 0.92);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.xp-summary-view-more:hover {
  color: #dcfce7;
  text-decoration: underline;
}

.xp-summary-circle-wrap {
  display: grid;
  place-items: center;
  padding: 10px 0 4px;
}

/* === Skills radar cards === */
.skills-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.skills-view-details {
  border: 0;
  background: transparent;
  color: rgba(96, 165, 250, 0.92);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.skills-view-details:hover {
  color: #dbeafe;
  text-decoration: underline;
}

.skills-radar-wrap {
  margin-top: 10px;
}

.xp-summary-svg {
  width: min(220px, 62vw);
  height: auto;
  display: block;
  overflow: visible;
}

.xp-summary-svg-halo {
  fill: rgba(16, 185, 129, 0.14);
  filter: url(#xpSummaryGlow);
}

.xp-summary-svg-outer {
  fill: url(#xpSummaryRing);
}

.xp-summary-svg-inner {
  fill: rgba(8, 15, 32, 0.88);
  stroke: url(#xpSummaryInnerRing);
  stroke-width: 3;
}

.xp-summary-svg-core {
  fill: url(#xpSummaryBg);
  stroke: rgba(220, 252, 231, 0.14);
  stroke-width: 1.5;
}

.xp-summary-svg-sheen {
  fill: rgba(255, 255, 255, 0.15);
}

.xp-summary-svg-label {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.28em;
  fill: rgba(167, 243, 208, 0.95);
}

.xp-summary-svg-number {
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -0.06em;
  fill: #f8fbff;
}

.xp-summary-svg-unit {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.16em;
  fill: rgba(220, 252, 231, 0.92);
}

.overlay-tab-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.overlay-tab-button {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

.overlay-tab-button.is-active {
  border-color: rgba(96, 165, 250, 0.35);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.88));
  color: #eff6ff;
}

.overlay-tab-panel {
  display: grid;
  gap: 16px;
}


.overlay-root {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.overlay-root:not(:empty) {
  pointer-events: auto;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.overlay-panel {
  position: relative;
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.65);
}

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  margin-bottom: 12px;
}

.overlay-body {
  overflow: auto;
  padding-right: 6px;
  display: grid;
  gap: 16px;
}

.overlay-panel.is-xp-more .overlay-body {
  overflow: hidden;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.xp-more-top {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.xp-more-circle-wrap {
  display: grid;
  place-items: center;
  padding: 6px 0 0;
}

.xp-more-subline {
  text-align: center;
}

.xp-more-entries-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.overlay-panel.is-xp-more .xp-more-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding-right: 6px;
}



.overlay-panel.is-audit-more .overlay-body {
  overflow: hidden;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.audit-more-top {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.audit-more-circle-wrap {
  display: grid;
  place-items: center;
  padding: 6px 0 0;
}

.audit-more-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.audit-more-metric {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.55);
  min-width: 160px;
  text-align: center;
}

.audit-more-metric.is-up strong {
  color: rgba(52, 211, 153, 0.95);
}

.audit-more-metric.is-down strong {
  color: rgba(56, 189, 248, 0.95);
}

.audit-more-entries-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.overlay-panel.is-audit-more .audit-more-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding-right: 6px;
}

.audit-entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.audit-entry-badge.is-up {
  color: rgba(52, 211, 153, 0.95);
  border-color: rgba(52, 211, 153, 0.18);
}

.audit-entry-badge.is-down {
  color: rgba(56, 189, 248, 0.95);
  border-color: rgba(56, 189, 248, 0.18);
}

.audit-entry-arrow {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}

.audit-entry-arrow svg {
  width: 16px;
  height: 16px;
}


/* === Skills details overlay === */
.overlay-panel.is-skills-more .overlay-body {
  overflow: hidden;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.skills-more-top {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.skills-more-entries-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.overlay-panel.is-skills-more .skills-more-scroll {
  overflow: auto;
  min-height: 0;
  flex: 1;
  padding-right: 6px;
}

.audit-more-level-svg-halo {
  fill: rgba(56, 189, 248, 0.14);
  filter: url(#auditMoreGlow);
}

.audit-more-level-svg-outer {
  fill: url(#auditMoreRing);
}

.audit-more-level-svg-inner {
  fill: rgba(8, 15, 32, 0.88);
  stroke: url(#auditMoreInnerRing);
  stroke-width: 3;
}

.audit-more-level-svg-core {
  fill: url(#auditMoreBg);
  stroke: rgba(224, 242, 254, 0.16);
  stroke-width: 1.5;
}

.audit-more-level-svg-sheen {
  fill: rgba(255, 255, 255, 0.12);
}

.audit-more-level-svg-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.32em;
  fill: rgba(207, 250, 254, 0.92);
}

.audit-more-level-svg-number {
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -0.06em;
  fill: #f8fbff;
}

.config-section {
  display: grid;
  gap: 12px;
}

.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.58);
}

.config-row-wide {
  align-items: flex-start;
}

.config-row-head {
  border-style: dashed;
  background: rgba(15, 23, 42, 0.38);
}

.config-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.config-controls .select {
  min-width: 140px;
}

.config-copy {
  display: grid;
  gap: 6px;
}

.config-title {
  font-weight: 600;
}

.select {
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text);
}

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

.toggle input {
  width: 44px;
  height: 26px;
  appearance: none;
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.22);
  cursor: pointer;
}

.toggle input::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.9);
  transition: transform 160ms ease;
}

.toggle input:checked {
  background: rgba(59, 130, 246, 0.55);
  border-color: rgba(59, 130, 246, 0.55);
}

.toggle input:checked::after {
  transform: translate(18px, -50%);
}

.toggle input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.code-block {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow: auto;
  font-size: 0.88rem;
  line-height: 1.35;
}


.config-control-group {
  display: grid;
  gap: 8px;
  min-width: 110px;
}

.config-control-group-select {
  min-width: 180px;
}

.config-control-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.dashboard-chart-panel {
  display: grid;
  gap: 16px;
}

.dashboard-chart-heading {
  align-items: start;
}

.dashboard-chart-summary-grid {
  margin-top: -2px;
}

.dashboard-chart-frame {
  display: grid;
  gap: 12px;
}


.ranks-panel-timeline {
  display: grid;
  gap: 18px;
}

.ranks-hero-grid-timeline {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

.rank-hero-card,
.rank-metric-card,
.ranks-timeline-card,
.rank-ladder-item {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.84));
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.24);
}

.rank-hero-card {
  padding: 20px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.rank-hero-label,
.rank-metric-label {
  color: rgba(191, 219, 254, 0.86);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rank-hero-value {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.05;
}

.rank-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rank-metric-card {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.rank-metric-value {
  font-size: 1.2rem;
  line-height: 1.1;
}

.rank-metric-detail {
  font-size: 0.92rem;
}

.ranks-timeline-card {
  padding: 14px;
  overflow: hidden;
}

.ranks-timeline-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.timeline-shell {
  fill: rgba(2, 6, 23, 0.58);
  stroke: rgba(148, 163, 184, 0.14);
}

.timeline-caption {
  fill: rgba(191, 219, 254, 0.82);
  font-size: 15px;
  font-weight: 600;
}

.timeline-caption-strong {
  fill: #eff6ff;
}

.timeline-track-base {
  stroke: rgba(148, 163, 184, 0.2);
  stroke-width: 16;
  stroke-linecap: round;
}

.timeline-track-progress-shadow {
  stroke: rgba(56, 189, 248, 0.2);
  stroke-width: 22;
  stroke-linecap: round;
}

.timeline-track-progress,
.timeline-segment.reached,
.timeline-segment.partial {
  stroke: url(#rankTimelineProgress);
  stroke-linecap: round;
}

.timeline-track-progress {
  stroke-width: 14;
}

.timeline-segment {
  stroke: rgba(148, 163, 184, 0.2);
  stroke-width: 8;
}

.timeline-segment.reached,
.timeline-segment.partial {
  stroke-width: 8;
}

.timeline-stop-label {
  fill: #f8fbff;
  font-size: 14px;
  font-weight: 700;
}

.timeline-stop-level {
  fill: rgba(191, 219, 254, 0.8);
  font-size: 14px;
  font-weight: 600;
}

.timeline-stop-ring {
  fill: rgba(15, 23, 42, 0.96);
  stroke: rgba(148, 163, 184, 0.44);
  stroke-width: 4;
}

.timeline-stop-dot {
  fill: rgba(148, 163, 184, 0.72);
}

.timeline-stop.is-reached .timeline-stop-ring {
  stroke: rgba(56, 189, 248, 0.72);
}

.timeline-stop.is-reached .timeline-stop-dot {
  fill: #38bdf8;
}

.timeline-stop.is-current .timeline-stop-ring {
  stroke: #60a5fa;
}

.timeline-stop.is-current .timeline-stop-dot {
  fill: #eff6ff;
}

.timeline-stop.is-next .timeline-stop-ring {
  stroke: rgba(250, 204, 21, 0.76);
}

.timeline-current-outer {
  fill: rgba(96, 165, 250, 0.18);
  stroke: rgba(125, 211, 252, 0.52);
  stroke-width: 3;
}

.timeline-current-inner {
  fill: url(#rankTimelineProgress);
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2.5;
}

.timeline-current-text {
  fill: #06121f;
  font-size: 20px;
  font-weight: 800;
}

.timeline-current-title {
  fill: #eff6ff;
  font-size: 15px;
  font-weight: 700;
}

.timeline-current-subtitle {
  fill: rgba(191, 219, 254, 0.82);
  font-size: 14px;
  font-weight: 600;
}

.rank-ladder-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.rank-ladder-item {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rank-ladder-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 700;
}

.rank-ladder-item.is-reached .rank-ladder-badge {
  background: rgba(14, 165, 233, 0.18);
  color: #dbeafe;
}

.rank-ladder-item.is-current .rank-ladder-badge {
  background: rgba(59, 130, 246, 0.22);
  color: #eff6ff;
}

.rank-ladder-item.is-next .rank-ladder-badge {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

@media (max-width: 980px) {
  .ranks-hero-grid-timeline {
    grid-template-columns: 1fr;
  }

  .rank-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.audit-ratio-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.audit-ratio-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}



.audit-ratio-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.audit-ratio-view-more {
  border: 0;
  background: transparent;
  color: rgba(56, 189, 248, 0.92);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.audit-ratio-view-more:hover {
  color: #cffafe;
  text-decoration: underline;
}

.audit-ratio-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 18px;
  align-items: center;
}

@media (max-width: 720px) {
  .audit-ratio-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

.audit-ratio-circle-wrap {
  display: grid;
  place-items: center;
  padding: 10px 0 4px;
}

.audit-ratio-level-svg {
  width: min(220px, 62vw);
  height: auto;
  display: block;
  overflow: visible;
}

.audit-ratio-level-svg-halo {
  fill: rgba(167, 139, 250, 0.14);
  filter: url(#auditRatioGlow);
}

.audit-ratio-level-svg-outer {
  fill: url(#auditRatioRing);
}

.audit-ratio-level-svg-inner {
  fill: rgba(8, 15, 32, 0.88);
  stroke: url(#auditRatioInnerRing);
  stroke-width: 3;
}

.audit-ratio-level-svg-core {
  fill: url(#auditRatioBg);
  stroke: rgba(243, 232, 255, 0.16);
  stroke-width: 1.5;
}

.audit-ratio-level-svg-sheen {
  fill: rgba(255, 255, 255, 0.14);
}

.audit-ratio-level-svg-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.32em;
  fill: rgba(233, 213, 255, 0.92);
}

.audit-ratio-level-svg-number {
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -0.06em;
  fill: #f8fbff;
}

.audit-ratio-metrics {
  display: grid;
  gap: 14px;
  align-content: center;
}

.audit-ratio-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.58);
}

.audit-ratio-arrow {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.42);
}

.audit-ratio-arrow svg {
  width: 20px;
  height: 20px;
}

.audit-ratio-arrow.is-up {
  color: rgba(52, 211, 153, 0.95);
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.12);
}

.audit-ratio-arrow.is-down {
  color: rgba(248, 113, 113, 0.92);
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(239, 68, 68, 0.1);
}

.audit-ratio-metric-body {
  display: grid;
  gap: 2px;
}

.audit-ratio-metric-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.audit-ratio-metric-value {
  font-size: 1.12rem;
  font-weight: 800;
}
