/* Pagina statistici — izolată de stilurile globale main.css / button.css */

main.stats-page {
  max-width: 52em;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  text-align: left;
  flex: 1;
}

main.stats-page > h1 {
  text-align: center;
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: -0.15rem;
  margin: 0.2rem 0;
}

main.stats-page > .tagline {
  text-align: center;
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  font-size: 1.5rem !important;
  line-height: 1.6 !important;
  letter-spacing: -0.05rem !important;
  color: var(--tagline-text-color, #5cf9fd);
}

main.stats-page p,
main.stats-page li {
  margin-top: 0 !important;
  font-size: 1.05em !important;
  line-height: 1.75 !important;
  letter-spacing: normal !important;
  font-weight: 400 !important;
  color: var(--secondary-text-color, #c8c4cc);
}

main.stats-page h2,
main.stats-page h3,
main.stats-page h4 {
  letter-spacing: normal;
  font-weight: 600;
  color: var(--primary-text-color);
}

main.stats-page a {
  font-size: inherit !important;
  letter-spacing: normal !important;
  color: var(--link-accent-color, var(--theme-green));
  font-weight: 600;
}

main.stats-page a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.stats-prose {
  margin: 1.2em 0 1.6em;
}

.stats-prose p + p {
  margin-top: 0.85em !important;
}

.stats-disclaimer {
  margin-bottom: 1.2em;
  padding: 1em 1.1em;
  border-radius: 0.6em;
  background: var(--surface-muted);
  border-left: 3px solid var(--theme-green, #5cf9fd);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75em 0 1em;
  font-size: 0.95em;
}

.legal-table th,
.legal-table td {
  padding: 0.55em 0.6em;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.15));
}

.legal-table th {
  font-weight: 600;
  background: var(--surface-muted, rgba(255, 255, 255, 0.06));
}

main.stats-page code {
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 0.25em;
  background: var(--surface-muted, rgba(255, 255, 255, 0.08));
}

.stats-panel-highlight {
  border: 1px solid var(--border-accent);
  background: var(--surface-accent);
}

.stats-panel {
  margin: 2em 0;
  padding: 1.4em 1.3em 1.6em;
  border-radius: 1em;
  background: var(--surface-panel);
}

.stats-panel h2 {
  margin: 0 0 0.6em;
  font-size: 1.35em;
  color: var(--link-accent-color, var(--theme-green));
}

.stats-panel h3 {
  margin: 1.4em 0 0.4em;
  font-size: 1.05em;
  color: var(--primary-text-color, #fff);
  opacity: 0.95;
}

.stats-panel h4 {
  margin: 0 0 0.35em;
  font-size: 0.95em;
  opacity: 0.9;
}

/* Tab-uri an — reset complet față de button.css */
.year-tabs-wrap {
  margin: 1.5em 0 0;
}

.year-tabs-wrap > p {
  margin-bottom: 0.6em !important;
  font-size: 0.95em !important;
  opacity: 0.85;
}

.year-tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 0;
  padding-bottom: 0;
  scrollbar-width: thin;
}

.year-tabs button {
  /* reset button.css */
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: auto !important;
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0.55em 1em !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: "Inter", sans-serif;
  font-size: 1.05rem !important;
  font-weight: 600;
  color: var(--secondary-text-color);
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent !important;
  background: transparent !important;
  transition: color 0.15s, border-color 0.15s;
}

.year-tabs button:hover {
  color: var(--primary-text-color);
  background: var(--header-hover-bg) !important;
  transform: none !important;
  background-position: unset !important;
}

.year-tabs button.active {
  color: var(--theme-green, #5cf9fd);
  border-bottom-color: var(--theme-green, #5cf9fd) !important;
  background: var(--surface-accent) !important;
}

.year-tabs button:focus-visible {
  outline: 2px solid var(--theme-green, #5cf9fd);
  outline-offset: -2px;
}

#year-panel {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: 0;
}

#year-intro {
  margin-bottom: 1.2em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--border-subtle);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88em;
}

.stats-table th,
.stats-table td {
  padding: 0.45em 0.55em;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--primary-text-color);
}

.stats-table th:first-child,
.stats-table td:first-child {
  text-align: left;
}

.stats-table .mob { color: var(--mob-col); }
.stats-table .fix { color: var(--fix-col); }
.stats-table .na { opacity: 0.35; }

.table-scroll { overflow-x: auto; }

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
  gap: 1em;
}

.bar-chart { margin: 0.4em 0 0.8em; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0.35em 0;
  font-size: 0.85em;
}

.bar-row .label {
  flex: 0 0 7em;
  text-align: right;
}

.bar-row .track {
  flex: 1;
  height: 1.4em;
  background: var(--surface-track);
  border-radius: 0.3em;
  overflow: hidden;
}

.bar-row .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--chart-fill-start), var(--chart-fill-end));
  border-radius: 0.3em;
}

.bar-row .pct {
  flex: 0 0 3em;
  text-align: right;
  opacity: 0.85;
}

.stats-updated {
  text-align: center;
  font-size: 0.78em !important;
  opacity: 0.55;
  margin-top: 2em;
}

.stats-faq dt {
  font-weight: 700;
  color: var(--primary-text-color, #fff);
  margin-top: 1em;
}

.stats-faq dd {
  margin: 0.35em 0 0 0;
  padding-left: 0;
}

.stats-report-note {
  margin-top: 0.8em;
  font-size: 0.88em !important;
  opacity: 0.7;
  line-height: 1.5 !important;
}

@media (min-width: 1100px) {
  main.stats-page {
    max-width: 56rem;
  }

  main.stats-page > h1 {
    font-size: 3.2rem;
  }

  main.stats-page p,
  main.stats-page li,
  main.stats-page td,
  main.stats-page dd {
    font-size: 1.125rem !important;
    line-height: 1.85 !important;
  }

  main.stats-page > .tagline {
    font-size: 1.65rem !important;
  }

  .stats-table {
    font-size: 0.95em;
  }

  .bar-row {
    font-size: 0.95em;
  }
}

@media (max-width: 600px) {
  main.stats-page {
    padding: 0 1.2rem 3rem;
  }
  .year-tabs button {
    padding: 0.5em 0.75em !important;
    font-size: 0.95rem !important;
  }
}
