@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --primary: #154360;
  --accent: #1abc9c;
  --muted: #6c7a89;
  --border: #e1e6ef;
  --shadow: 0 15px 35px rgba(21, 67, 96, 0.08);
}



*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: #202b32;
  line-height: 1.6;
  min-height: 100vh;
  padding-top: 7.5rem;
}

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

.site-header {
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  padding: 0.75rem 0;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.5rem;
  gap: 1rem;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
}

.brand-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  /* Removed border-radius and shadow to let the logo stand as provided if it has its own styling */
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--primary);
}

.language-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--primary);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.language-toggle:hover,
.language-switcher.is-open .language-toggle {
  box-shadow: 0 10px 20px rgba(21, 67, 96, 0.15);
  transform: translateY(-1px);
}

.language-icon {
  font-size: 1rem;
}

.language-current {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.language-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 32px rgba(21, 67, 96, 0.18);
  display: none;
  z-index: 40;
}

.language-switcher.is-open .language-menu {
  display: block;
}

.language-menu button {
  width: 100%;
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.language-menu button:hover,
.language-menu button:focus {
  background: rgba(15, 61, 92, 0.08);
  color: var(--primary);
}

.language-menu button.is-active {
  color: var(--primary);
  font-weight: 600;
}

main {
  padding: 2.5rem 0 4rem;
}

.hero {
  background: linear-gradient(120deg, #e3f9ff, #f1f4ff);
  border-radius: 28px;
  padding: 3rem;
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
  color: var(--primary);
}

.hero p {
  margin: 0;
  max-width: 700px;
  color: #415160;
}

.hero-brave {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #0f3d5c, #1c6d96, #a7d3ff);
  color: #fff;
}

.hero-brave .hero-content {
  position: relative;
  max-width: 640px;
  z-index: 1;
}

.hero-brave .hero-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  font-size: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.hero-brave h1 {
  color: #fff;
  font-size: 2.4rem;
  line-height: 1.15;
}

.hero-brave p {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 1.75rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #0f3d5c;
  border-radius: 999px;
  padding: 0.9rem 1.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 61, 92, 0.25);
}

.intro-card p,
.goals-card p,
.flowchart-summary p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #2c3947;
  white-space: pre-line;
}

.goals-card {
  margin-bottom: 2rem;
}

.data-summary-card header h2,
.overview-card header h2,
.team-card header h2 {
  margin-bottom: 0.45rem;
}

.data-summary-card header p,
.overview-card header p,
.team-card header p {
  margin: 0 0 1.5rem;
  color: #546478;
}

.data-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
}

.data-summary-item {
  background: linear-gradient(160deg, rgba(15, 61, 92, 0.08), #fff);
  border-radius: 18px;
  padding: 1.25rem;
  border: 1px solid rgba(15, 61, 92, 0.08);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.data-summary-icon {
  font-size: 1.5rem;
}

.data-summary-value {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f3d5c;
}

.data-summary-label {
  font-size: 0.95rem;
  color: #516274;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.overview-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
  background: #f7fafc;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.overview-icon {
  font-size: 1.6rem;
}

.overview-item h3 {
  margin: 0;
  color: var(--primary);
  font-size: 1.1rem;
}

.overview-item p {
  margin: 0;
  color: #415160;
  flex-grow: 1;
}

.overview-item a {
  align-self: flex-start;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 61, 92, 0.25);
  padding-bottom: 0.15rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.overview-item a:hover {
  color: #0f3d5c;
  border-color: #0f3d5c;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.team-photo-wrapper {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(15, 61, 92, 0.1);
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member {
  border: 1px solid rgba(15, 61, 92, 0.12);
  border-radius: 16px;
  padding: 1.25rem;
  background: #fdfefe;
}

.team-member h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: var(--primary);
}

.team-member p {
  margin: 0.25rem 0 0;
  color: #415160;
  font-size: 0.95rem;
}

.institution-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 1.75rem;
}

.institution-list span {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 61, 92, 0.08);
  color: #173d53;
  font-weight: 600;
  font-size: 0.85rem;
}

.team-funding {
  margin-top: 1.25rem;
  color: #324659;
  font-size: 0.98rem;
  font-weight: 500;
}

.partner-logos {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.link-list a {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 61, 92, 0.25);
  padding-bottom: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-list a:hover {
  color: #0f3d5c;
  border-color: #0f3d5c;
}

.partner-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 61, 92, 0.12);
  box-shadow: 0 8px 18px rgba(15, 61, 92, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-logo:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(15, 61, 92, 0.16);
}

.partner-logo img {
  max-height: 48px;
  width: auto;
  display: block;
}

.sponsor-boxes {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.sponsor-box {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 61, 92, 0.12);
  box-shadow: 0 8px 18px rgba(15, 61, 92, 0.08);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(15, 61, 92, 0.16);
}

.sponsor-box p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sponsor-box a {
  display: block;
}

.sponsor-box img {
  max-height: 60px;
  width: auto;
  margin: 0 auto;
  display: block;
}

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

.card {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--primary);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0.4rem 0 0;
}

.tabs {
  margin-top: 2rem;
}

.tab-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tab-buttons button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  padding: 0.65rem 1.1rem;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-buttons button.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(21, 67, 96, 0.2);
}

.tab-panel {
  display: none;
  margin-top: 1.5rem;
}

.tab-panel.is-active {
  display: block;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card header {
  position: static;
  box-shadow: none;
  padding: 1.5rem 1.75rem 0;
}

.table-card header h3 {
  margin: 0;
}

.datatable-container {
  padding: 1.5rem 1.75rem 1.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
  min-width: 620px;
}

table.dataTable thead {
  background: #f7f9fb;
}

table.dataTable thead th {
  color: var(--primary);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

table.dataTable tbody td {
  border-bottom: 1px solid #f1f2f6;
}

footer {
  margin-top: 3rem;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary);
}

.flowchart-card {
  padding: 2rem;
  margin-top: 2rem;
}

.flowchart-summary-card header h3 {
  margin-bottom: 0.35rem;
}

.flow-summary-category {
  color: var(--muted);
  font-weight: 600;
}

.flowchart-summary-card p+p {
  margin-top: 0.75rem;
}

.flowchart {
  --flowchart-scale: 0.5;
  display: flex;
  flex-direction: column;
  gap: calc(1.75rem * var(--flowchart-scale));
  align-items: center;
}

.flowchart-grid {
  display: grid;
  grid-template-columns: minmax(calc(260px * var(--flowchart-scale)),
      calc(340px * var(--flowchart-scale))) calc(70px * var(--flowchart-scale)) minmax(calc(260px * var(--flowchart-scale)),
      calc(340px * var(--flowchart-scale)));
  grid-auto-rows: auto;
  gap: calc(1.35rem * var(--flowchart-scale)) calc(1rem * var(--flowchart-scale));
  justify-content: center;
  align-items: center;
}

.flow-left {
  grid-column: 1;
  justify-self: center;
}

.flow-right {
  grid-column: 3;
  justify-self: center;
}

.flow-bottom {
  grid-column: 1;
  justify-self: center;
  max-width: calc(420px * var(--flowchart-scale));
}

.flow-arrow-right {
  grid-column: 2;
  justify-self: center;
}

.flow-arrow-left {
  grid-column: 2;
  justify-self: center;
  transform: rotate(180deg);
}

.flow-arrow-down {
  grid-column: 1;
  justify-self: center;
}

.flow-placeholder {
  height: 1px;
}

.flow-placeholder.middle {
  grid-column: 2;
}

.flow-placeholder.right {
  grid-column: 3;
}

.flow-node {
  min-width: calc(280px * var(--flowchart-scale));
  max-width: calc(340px * var(--flowchart-scale));
  padding: calc(1.5rem * var(--flowchart-scale));
  border: calc(1.5px * var(--flowchart-scale)) solid #1f2a37;
  border-radius: calc(14px * var(--flowchart-scale));
  background: #fff;
  color: #1f2a37;
  box-shadow: 0 10px 22px rgba(31, 42, 55, 0.08);
  text-align: center;
  font-size: calc(0.95rem * var(--flowchart-scale));
  line-height: 1.5;
  transition: box-shadow 0.2s ease;
}

.flow-node:focus {
  outline: 3px solid rgba(26, 115, 232, 0.35);
  box-shadow: 0 16px 32px rgba(31, 42, 55, 0.18);
}

.flow-node em {
  display: block;
  margin-top: calc(0.75rem * var(--flowchart-scale));
  font-style: italic;
  font-weight: 600;
}

.flow-node span {
  display: block;
  margin-top: calc(0.25rem * var(--flowchart-scale));
  font-size: calc(0.92rem * var(--flowchart-scale));
}

.flow-node-large {
  max-width: calc(420px * var(--flowchart-scale));
}

.flow-arrow {
  font-size: calc(1.8rem * var(--flowchart-scale));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-arrow.flow-arrow-down,
.flow-arrow.flow-arrow-right,
.flow-arrow.flow-arrow-left {
  font-size: calc(1.8rem * var(--flowchart-scale));
}

.flow-arrow.flow-arrow-left {
  transform: rotate(180deg);
}

.flow-arrow-down-left {
  grid-column: 1;
  justify-self: center;
}

.forest-card header h3 {
  margin-bottom: 0.75rem;
}

.table-card+.forest-card {
  margin-top: 2rem;
}

.forest-summary {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f7f9fb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.forest-summary .summary-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.forest-summary .summary-detail {
  font-size: 0.95rem;
  color: var(--muted);
}

.forest-summary .summary-hint {
  font-size: 0.85rem;
  color: #6c7a89;
}

.forest-plot {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1rem;
}

.forest-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.forest-label {
  min-width: 160px;
  font-weight: 500;
  color: var(--primary);
}

.forest-axis {
  flex: 1;
  position: relative;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f5f7fb, #edf1f8);
  border: 1px solid var(--border);
  overflow: hidden;
}

.forest-axis::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #cfd8e3;
  transform: translateY(-50%);
}

.forest-ci {
  position: absolute;
  top: 50%;
  height: 4px;
  background: var(--accent);
  transform: translateY(-50%);
  border-radius: 4px;
}

.forest-ci::before,
.forest-ci::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 14px;
  border: 2px solid var(--accent);
  border-top: none;
  border-bottom: none;
  transform: translateY(-50%);
}

.forest-ci::before {
  left: -4px;
}

.forest-ci::after {
  right: -4px;
}

.forest-effect {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(21, 67, 96, 0.25);
}

.forest-value {
  min-width: 150px;
  font-variant-numeric: tabular-nums;
  color: #415160;
  text-align: right;
}

.forest-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.d3-forest-wrapper {
  margin-top: 1.5rem;
}

.d3-forest-wrapper svg {
  width: 100%;
  height: auto;
}

.d3-forest-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.data-table-wrapper {
  margin-top: 1.25rem;
}

.filter-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.filter-inputs input,
.filter-inputs select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
}

.filter-inputs label {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.3rem;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.auth-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.auth-card {
  background: #000;
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: none;
  border: 1px solid #1c1c1c;
  color: #fff;
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #fff;
}

.auth-card p {
  margin-top: 0;
  color: #c9d1d9;
}

.auth-card label {
  display: block;
  font-weight: 600;
  color: #fff;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

.auth-card input {
  width: 100%;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
  background: #0d1117;
  color: #fff;
}

.auth-card button {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}

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

.auth-error {
  margin-top: 0.75rem;
  color: #f16a6f;
  font-size: 0.9rem;
  min-height: 1em;
}

body.auth-locked {
  overflow: hidden;
  background: #000;
  color: #fff;
}

body.auth-locked header,
body.auth-locked main,
body.auth-locked footer {
  visibility: hidden;
}

@media (max-width: 640px) {
  .language-menu {
    left: 0;
    right: auto;
    min-width: 140px;
  }

  .flowchart {
    --flowchart-scale: 1;
  }

  .hero {
    padding: 2rem;
  }

  .hero-brave {
    padding: 2.5rem 2rem;
  }

  .hero-brave h1 {
    font-size: 2rem;
  }

  .hero-cta {
    width: 100%;
  }

  .data-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .overview-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .institution-list {
    flex-direction: column;
    align-items: stretch;
  }

  .institution-list span {
    justify-content: center;
  }

  .partner-logos {
    justify-content: center;
  }

  .nav {
    flex-direction: column;
    gap: 0.85rem;
  }

  .tab-buttons {
    flex-direction: column;
  }

  .forest-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .forest-label,
  .forest-value {
    min-width: auto;
    text-align: left;
  }

  .forest-value {
    width: 100%;
  }

  .flowchart-grid {
    grid-template-columns: minmax(220px, 1fr);
    gap: 1rem;
  }

  .flow-left,
  .flow-right,
  .flow-bottom,
  .flow-arrow-right,
  .flow-arrow-left,
  .flow-arrow-down {
    grid-column: 1;
    justify-self: center;
  }

  .flow-arrow-left {
    transform: none;
  }

  .flow-placeholder {
    display: none;
  }

  table.dataTable {
    min-width: 540px;
  }

  .footer-bar {
    align-items: flex-start;
    gap: 0.75rem;
  }
}

@media (max-width: 900px) {
  .data-summary-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .hero-brave h1 {
    font-size: 2.1rem;
  }

  .flowchart-grid {
    grid-template-columns: minmax(calc(240px * var(--flowchart-scale)),
        calc(300px * var(--flowchart-scale))) calc(60px * var(--flowchart-scale)) minmax(calc(240px * var(--flowchart-scale)),
        calc(300px * var(--flowchart-scale)));
    gap: calc(1rem * var(--flowchart-scale)) calc(0.75rem * var(--flowchart-scale));
  }

  .flow-node {
    min-width: calc(240px * var(--flowchart-scale));
    max-width: calc(300px * var(--flowchart-scale));
    font-size: calc(0.9rem * var(--flowchart-scale));
  }

  .flow-node-large {
    max-width: calc(360px * var(--flowchart-scale));
  }

  .datatable-container {
    padding: 1.25rem 1rem 1.5rem;
  }
}

html.lang-initializing body {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* Subgroup Analysis Menu */
.subgroup-menu {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.subgroup-link {
  background: var(--surface);
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.subgroup-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.subgroup-link.active {
  background: var(--primary);
  color: white !important;
  border-color: var(--primary);
}