/* ==========================================================================
   1. Root Variables & Reset
   ========================================================================== */
:root {
  --bg-color: #FBF9F5;
  --primary-color: #1A3A5F;
  --accent-color: #6D213C;
  --text-dark: #1A1A1A;
  --text-light: #5A5A5A;
  --text-nav: #8C8279;
  --sea-color: #AACAE0;

  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--text-dark);
  font-family: var(--font-serif);
  overflow-x: hidden;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================================================
   2. Hero Section
   ========================================================================== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  overflow: hidden;
}

.top-nav {
  position: absolute;
  top: 3rem;
  right: 3rem;
  z-index: 50;
  display: flex;
  gap: 2.5rem;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-nav);
}

.nav-link {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: all 0.3s;
  color: inherit;
}

.nav-link:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.hero-center-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

#hero-content {
  padding-top: 6rem;
  padding-left: 2rem;
  padding-right: 2rem;
  z-index: 10;
  max-width: 42rem;
  margin-top: 3rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
}

@media (min-width: 768px) {
  #hero-content {
    padding-left: 5rem;
    padding-right: 5rem;
    margin-top: 6rem;
  }
}

#hero-boat {
  margin-top: -4rem;
  margin-bottom: -1rem;
  color: var(--primary-color);
  position: relative;
  z-index: 0;
}

.hero-title {
  font-size: 80px;
  line-height: 0.85;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 110px;
  }
}

.hero-title span {
  font-style: italic;
  font-weight: 300;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-light);
  max-width: 28rem;
  line-height: 1.6;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 13px;
  }
}

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: inline;
  }
}

/* ==========================================================================
   3. Sea Transition
   ========================================================================== */
.sea-transition {
  width: 100%;
  background-color: var(--sea-color);
  position: relative;
  height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 3rem;
  margin-top: auto;
}

.sea-wave-wrapper {
  position: absolute;
  top: -39px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 0;
}

.sea-wave-svg {
  position: relative;
  display: block;
  width: 100%;
  height: 40px;
  fill: var(--sea-color);
}

#wave-boat {
  position: absolute;
  top: -50px;
  left: 15%;
  width: 4rem;
  height: 4rem;
  filter: drop-shadow(0 25px 25px rgba(0, 0, 0, 0.15));
  z-index: 10;
}

@media (min-width: 768px) {
  #wave-boat {
    left: 25%;
  }
}

.start-journey-btn {
  background-color: white;
  color: var(--primary-color);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background-color 0.3s, color 0.3s;
  z-index: 10;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.start-journey-btn:hover {
  background-color: #D1E0ED;
}

/* ==========================================================================
   4. Introduction Section
   ========================================================================== */
#introduction {
  position: relative;
  min-height: 100vh;
  background-color: var(--sea-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem 6rem 2rem;
  /* Reduced top padding and increased bottom padding to shift content higher */
  text-align: center;
}

#introduction .journey-text-wrapper {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  max-width: 800px;
  margin: 0 auto;
}

.intro-placeholder-col {
  position: relative;
  top: auto;
  transform: none;
  right: auto;
  width: 100%;
  max-width: 800px;
  padding: 1rem 0;
  background: transparent;
  display: flex;
  flex-direction: row !important;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  font-family: var(--font-sans);
  color: var(--text-dark);
  margin-top: 1rem;
}

@keyframes floatBubble {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }

  100% {
    transform: translateY(0px);
  }
}

#introduction .journey-title {
  margin-bottom: 2rem;
}

#introduction .stat-box {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  background: var(--primary-color);
  color: white;
  animation: floatBubble 4s ease-in-out infinite;
}

#introduction .stat-box:nth-child(1) {
  animation-delay: 0s;
}

#introduction .stat-box:nth-child(2) {
  animation-delay: 1.3s;
}

#introduction .stat-box:nth-child(3) {
  animation-delay: 2.6s;
}

#introduction .stat-box h4 {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

#introduction .stat-box .stat-number {
  color: white;
  font-size: 36px;
}

#introduction .stat-box:hover {
  animation-play-state: paused;
}

.intro-desc {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: #1A1A1A;
  margin-bottom: 1.5rem;
  text-align: left;
}

.intro-placeholder-col h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.intro-next-btn {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 10;
}

/* ==========================================================================
   5. Map Journey Section
   ========================================================================== */
#journey {
  position: relative;
  height: 100vh;
  background-color: var(--sea-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6rem;
}

.map-svg-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(10vw);
}

#map-svg {
  width: 100%;
  height: 100%;
  max-height: 90vh;
  object-fit: contain;
}

#map-boat-container {
  opacity: 0;
  transform-origin: 16px 32px;
}

.map-boat-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#global-progress {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8rem;
  pointer-events: none;
  z-index: 60;
  opacity: 0;
}

#global-line-bg {
  position: absolute;
  left: 55px;
  top: 10%;
  bottom: 10%;
  width: 3px;
  background-image: linear-gradient(to bottom, var(--primary-color) 50%, transparent 50%);
  background-size: 3px 12px;
  background-repeat: repeat-y;
  opacity: 0.6;
  /* Made darker */
}

#global-line-active {
  position: absolute;
  left: 55px;
  top: 10%;
  width: 3px;
  background-image: linear-gradient(to bottom, var(--primary-color) 50%, transparent 50%);
  background-size: 3px 12px;
  background-repeat: repeat-y;
  height: 0%;
}

#global-boat {
  position: absolute;
  left: 66px;
  /* Moved to the right side of the line */
  top: 10%;
  z-index: 10;
  margin-top: -20px;
  /* Center boat vertically */
}

.scroll-stop {
  position: absolute;
  left: 56.5px;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  z-index: 5;
  transition: color 0.3s ease;
  pointer-events: auto;
}

.scroll-stop.completed {
  color: var(--accent-color);
}


.scroll-stop svg {
  width: 12px;
  height: 12px;
}

#next-btn {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
  z-index: 50;
  opacity: 1;
}

#next-btn:hover {
  color: var(--primary-color);
}

.next-btn-text {
  font-family: var(--font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.journey-text-wrapper {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 6rem;
  z-index: 30;
  pointer-events: none;
}

@media (min-width: 768px) {
  .journey-text-wrapper {
    left: 8rem;
  }
}

.journey-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .journey-title {
    font-size: 40px;
  }
}

.journey-subtitle {
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary-color);
  max-width: 28rem;
  line-height: 1.6;
}

.journey-desc {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: #1A1A1A;
  margin-bottom: 1.5rem;
  text-align: left;
  max-width: 28rem;
}

.country-hl {
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
}

.hl-de {
  background: linear-gradient(transparent 52%, #feda1566 52%);
}

.hl-nl {
  background: linear-gradient(transparent 52%, #a180ad66 52%);
}

.hl-fr {
  background: linear-gradient(transparent 52%, #1f7f9566 52%);
}

.hl-pt {
  background: linear-gradient(transparent 52%, #f4a64e66 52%);
}

.hl-es {
  background: linear-gradient(transparent 52%, #bb521f66 52%);
}

.hl-it {
  background: linear-gradient(transparent 52%, #90be6d66 52%);
}

/* ==========================================================================
   5. Analysis Section
   ========================================================================== */
.analysis-section {
  position: relative;
  min-height: 100vh;
  background-color: var(--sea-color);
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.analysis-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.analysis-content-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-left: 8rem;
}

@media (min-width: 768px) {
  .analysis-content-wrapper {
    padding: 6rem;
    padding-left: 8rem;
  }
}

.section-bridge {
  width: 100%;
  max-width: 64rem;
  margin-top: 4rem;
  padding-top: 2rem;
}

.section-bridge p {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-dark);
  text-align: left;
  opacity: 0.9;
  max-width: 48rem;
  margin: 0 auto;
}

.analysis-grid {
  max-width: 64rem;
  width: 100%;
  display: grid;
  gap: 4rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.analysis-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.1;
}

@media (min-width: 768px) {
  .analysis-title {
    font-size: 60px;
  }
}

.analysis-title span {
  font-style: italic;
  font-weight: 300;
  opacity: 0.8;
}

.analysis-subtitle {
  font-family: var(--font-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--primary-color);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.analysis-desc {
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.9;
  text-align: justify;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.analysis-section-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--primary-color);
  opacity: 0.65;
  margin-top: 1.4rem;
  margin-bottom: 0.4rem;
}

.analysis-findings {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.analysis-findings li {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--text-dark);
  padding-left: 1.1rem;
  position: relative;
}

.analysis-findings li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1.1em;
  line-height: 1.4;
  opacity: 0.8;
}

/* Marker-pen highlight on every <strong> and <b> across the whole site */
strong,
b {
  background: linear-gradient(transparent 48%, rgba(29, 63, 103, 0.3) 52%);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

.analysis-chart-col {
  height: 400px;
  width: 100%;
}

/* ==========================================================================
   5a. Analysis Section #RsQ01 — RQ01 Water Chart
   ========================================================================== */

/* Column that holds the amCharts chart */
.rsq01-chart-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 440px;
}

@media (max-width: 767px) {
  .rsq01-chart-col {
    margin-top: 1.5rem;
  }
}

/* amCharts root div — must have explicit dimensions */
#rsq01-chart-div,
#rsq03-chart-div {
  flex: 1;
  width: 100%;
  min-height: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 4px 24px rgba(10, 60, 100, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

/* Small chart title above the chart */
.chart-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 550;
  color: var(--text-dark);
  margin: 0 0 16px 0;
  text-align: center;
}

/* Variant of .analysis-subtitle styled as a research-question badge */
.analysis-subtitle.rq-label {
  line-height: 1.8;
  font-size: 12px;
  letter-spacing: 0.16em;
}

/* Narrative column for RsQ01 & RsQ03 spreading across the whole grid */
.rsq01-narrative-column,
.rsq03-narrative-column {
  grid-column: 1 / -1;
  margin-top: -2rem;
}

.rsq01-narrative-column h3,
.rsq03-narrative-column h3 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: black;
  margin-bottom: 1rem;
}

.rsq01-narrative-column p,
.rsq03-narrative-column p {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.9;
  text-align: justify;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.rsq01-narrative-column .takeaway-highlight,
.rsq03-narrative-column .takeaway-highlight,
.takeaway-highlight {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--primary-color);
  line-height: 1.8;
  text-align: center;
  opacity: 1;
  font-weight: 600;

  padding: 1.5rem;
  margin-top: 1.5rem;

  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 4px 24px rgba(10, 60, 100, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* Ensure no background highlight line appears on these bolded takeaways */
.takeaway-highlight,
.takeaway-highlight strong,
.takeaway-highlight b {
  background-image: none !important;
}

/* ==========================================================================
   5b. Analysis Section #RsQ02 — Wide 2/3 + 1/3 layout
   ========================================================================== */

/* Override grid to 2fr + 1fr columns */
@media (min-width: 768px) {
  .analysis-grid--wide {
    grid-template-columns: 2fr 1fr;
    column-gap: 4rem;
    align-items: center;
  }
}

/* 2/3 column: flex column so text sits above chart */
.analysis-main-col {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 1/3 side column: centred vertically */
.analysis-side-col {
  display: flex;
  align-items: center;
  padding-left: 1rem;
  border-left: 2px solid rgba(26, 32, 48, 0.12);
}

/* Make the chart taller in the wide layout */
.rsq01b-chart-col {
  height: 500px;
}

/* Side panel typography */
.pt-bias-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pt-bias-tag {
  display: inline-block;
  align-self: flex-start;
  background-color: rgba(244, 166, 78, 0.2);
  color: #f4a64e;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pt-bias-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--text-dark);
  margin: 0;
}

.pt-bias-desc {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.9;
  text-align: justify;
  color: var(--text-dark);
  margin: 0;
}

.pt-bias-desc b {
  color: var(--text-dark);
}

/* ==========================================================================
   Category note panel (RSQ03 stacked bar — methodology note)
   ========================================================================== */

.cat-note-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 2px solid rgba(26, 32, 48, 0.12);
  padding-left: 1rem;
}

.cat-note-tag {
  display: inline-block;
  align-self: flex-start;
  background-color: rgba(26, 58, 95, 0.12);
  color: #1a3a5f;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-sans);
}

.cat-note-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text-dark);
  margin: 0;
}

.cat-note-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.65;
  opacity: 0.85;
  color: var(--text-dark);
  margin: 0;
}

.cat-note-desc b {
  font-weight: 600;
  color: var(--text-dark);
  opacity: 1;
}

/* Interactive correct button */
.pt-correct-btn {
  margin-top: 1rem;
  background: #1a3a5f;
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(26, 58, 95, 0.3);
}

.pt-correct-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 58, 95, 0.4);
}

.pt-correct-btn.corrected {
  background: var(--bg-color);
  color: var(--text-dark);
  box-shadow: 0 4px 12px rgba(251, 249, 245, 0.5);
}

.pt-correct-btn.corrected:hover {
  box-shadow: 0 6px 16px rgba(251, 249, 245, 0.7);
}


/* ==========================================================================
   6. About Modal
   ========================================================================== */
#about-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--primary-color);
  display: flex;
  flex-direction: column;
  padding: 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

@media (min-width: 768px) {
  #about-modal {
    padding: 4rem;
    /* was 6rem */
  }
}

.modal-nav {
  position: absolute;
  top: 3rem;
  right: 3rem;
  display: flex;
  gap: 2.5rem;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #7A98B8;
}

.modal-nav-link {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: all 0.3s;
  color: inherit;
}

.modal-nav-link:hover {
  color: white;
}

.modal-close-btn {
  margin-left: 2rem;
  color: white;
  transition: color 0.3s;
}

.modal-close-btn:hover {
  color: #F87171;
}

.modal-content-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 84rem;
  /* was 72rem — more room overall */
  margin: 0 auto;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.tab-content {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s;
  transform: translateY(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tab-subtitle {
  font-size: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  color: #7A98B8;
}

.tab-text {
  font-size: 24px;
  font-family: var(--font-sans);
  line-height: 1.6;
  font-weight: 300;
  color: white;
  opacity: 0.7;
  max-width: 72rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .tab-text {
    font-size: 24px;
  }
}

.tab-text-credit {
  font-size: 20px;
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  max-width: 72rem;
  color: white;
  opacity: 0.7;
}

@media (min-width: 768px) {
  .tab-text-credit {
    font-size: 24px;
  }
}

.credit-block {
  margin-top: 2.5rem;
  max-width: 72rem;
}

.credit-block-title {
  font-size: 11px;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7A98B8;
  margin-bottom: 0.75rem;
}

.credit-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 16px;
  color: white;
}

.credit-table th {
  text-align: left;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #7A98B8;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.credit-table td {
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.85;
  vertical-align: top;
}

.credit-table a {
  color: var(--sea-color);
  text-decoration: none;
}

.credit-table a:hover {
  text-decoration: underline;
}

.tab-text a,
.tab-text-credit a {
  color: var(--bg-color);
}

.tab-text a:hover,
.tab-text-credit a:hover {
  color: var(--sea-color);
}

.credit-license-text {
  font-size: 16px !important;
  opacity: 0.8;
}

/* ==========================================================================
   7. Map Components (Original)
   ========================================================================== */
.country {
  transition: all 0.5s ease;
  fill: var(--bg-color);
  stroke: var(--sea-color);
  stroke-width: 0.5px;
  opacity: 1;
}

.country.highlighted {
  fill: var(--accent-color);
  stroke-width: 1px;
}

/* ==========================================================================
   8. Utilities & State Classes
   ========================================================================== */
.modal-active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.tab-active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

.tab-btn-active {
  color: white !important;
  border-color: white !important;
}

.icon-white {
  color: var(--bg-color);
  fill: var(--primary-color);
}

.icon-blue {
  color: var(--primary-color);
  fill: var(--bg-color);
}

.team-commits-container {
  text-align: center;
}

.commits-subtitle {
  font-size: 12px;
  font-family: var(--font-sans);
  color: #7A98B8;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.team-commits-container canvas {
  display: block;
  margin: 0 auto;
  max-height: 120px;
}

/* Slightly more compact stats grid, freeing up vertical room for the chart below it */
.team-meta-grid {
  gap: 1rem;
}

.scroll-hint-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(26, 58, 95, 0) 0%, rgba(26, 58, 95, 0.95) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
}

.scroll-hint-fade.visible {
  opacity: 1;
}

.scroll-hint-chevron {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--sea-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  animation: scrollBounce 1.6s ease-in-out infinite;
  z-index: 6;
}

.scroll-hint-chevron.visible {
  opacity: 0.85;
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* ==========================================================================
   9. Animations
   ========================================================================== */
.boat-float {
  animation: boatFloat 4s ease-in-out infinite;
}

@keyframes boatFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.boat-bob {
  animation: boatBob 3s ease-in-out infinite;
  transform-origin: center;
}

@keyframes boatBob {

  0%,
  100% {
    transform: translateY(0) rotate(-5deg);
  }

  50% {
    transform: translateY(-5px) rotate(5deg);
  }
}

.wave-boat-anim {
  animation: waveBoat 4s ease-in-out infinite;
}

@keyframes waveBoat {

  0%,
  100% {
    transform: translateY(0) rotate(-15deg);
  }

  50% {
    transform: translateY(-10px) rotate(-5deg);
  }
}

/* ==========================================================================
   10. Team Cards
   ========================================================================== */
.team-layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  width: 100%;
}

@media (min-width: 768px) {
  .team-layout-grid {
    grid-template-columns: 640px 340px;
    /* fixed widths, not 1fr -- stops the left column stretching full width */
    gap: 3rem;
    /* was 5rem -- pulls the two columns closer together */
    width: auto;
    /* was 100% -- lets the grid size to its actual content */
    margin: 2.5rem auto 0 auto;
    /* auto centers the compact block; top value pushes everything down */
  }
}

.team-meta-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.team-main-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.team-role-placeholder {
  margin-top: 4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 1.5rem;
  text-align: left;
  color: white;
  width: 100%;
  max-width: 800px;
}

.placeholder-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--sea-color);
}

.placeholder-desc {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.9;
}

.team-cards-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}


.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 220px;
  height: 220px;
  flex-shrink: 0;
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  color: white;
}

.team-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--sea-color);
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #AACAE0;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
  overflow: hidden;
  /* Ensure images are clipped to the circle */
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* This makes the image fill the area without stretching */
  border-radius: 50%;
}

.team-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: white;
}

.team-role {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #7A98B8;
  margin-bottom: 0.75rem;
}

.team-desc {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.4;
  opacity: 0.8;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-github {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s;
}

.team-github:hover {
  color: var(--sea-color);
}

/* ==========================================================================
   7. Placeholder Charts
   ========================================================================== */
.placeholder-chart-col {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 58, 95, 0.05);
  border-radius: 1rem;
}

.placeholder-chart-text {
  color: var(--primary-color);
  font-family: var(--font-sans);
  opacity: 0.5;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}

/* ==========================================================================
   8. Conclusion Section
   ========================================================================== */
.conclusion-section {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-color);
  /* The clear background */
  padding-top: 150px;
  /* Space for the wave */
  display: flex;
  align-items: center;
  justify-content: center;
}

.sea-transition-top {
  position: absolute;
  top: -2px;
  /* slight overlap to prevent gap */
  left: 0;
  width: 100%;
  height: 120px;
  transform: rotate(180deg);
  z-index: 10;
}

.sea-wave-svg-top {
  width: 100%;
  height: 100%;
  fill: var(--sea-color);
}

.sea-transition-bottom {
  position: absolute;
  bottom: -2px;
  /* slight overlap to prevent gap */
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 10;
}

.sea-wave-svg-bottom {
  width: 100%;
  height: 100%;
  fill: var(--sea-color);
}

.conclusion-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  padding-left: 8rem;
  z-index: 20;
}

@media (min-width: 768px) {
  .conclusion-wrapper {
    padding: 6rem;
    padding-left: 8rem;
  }
}

.conclusion-title {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text-dark);
  margin-bottom: 3rem;
  line-height: 1.1;
}

.conclusion-title span {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  color: var(--primary-color);
}

.conclusion-grid {
  max-width: 64rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  text-align: left;
}

@media (min-width: 768px) {
  .conclusion-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.conclusion-text-col h3 {
  font-size: 24px;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.conclusion-text-col .conclusion-subtitle {
  font-size: 18px;
  color: rgba(26, 58, 95, 0.7);
  line-height: 1.6;
}

.conclusion-text-col p {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.conclusion-text-col p u {
  text-decoration: underline dotted var(--primary-color);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.conclusion-stats-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-box {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.stat-box h4 {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 16px;
  color: rgba(26, 58, 95, 0.5);
  margin-bottom: 0.5rem;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 900;
  color: var(--primary-color);
}

.back-to-top-wrapper {
  margin-top: 4rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.back-to-top-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top-btn:hover {
  background: var(--secondary-color, #1a3a5f);
  /* Fallback if secondary isn't defined */
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.back-to-top-btn .arrow-up {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.back-to-top-btn:hover .arrow-up {
  transform: translateY(-3px);
}

/* ==========================================================================
   9. Bridging Text Section
   ========================================================================== */
.bridge-section {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 8rem;
  background: transparent;
}

.bridge-content {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
}

/* Left column: explanatory text */
.bridge-explanation-text {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bridge-explanation-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.bridge-explanation-text p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-dark);
  opacity: 0.85;
  margin: 0;
}

/* Right column: bubble + chart */
.france-concentration-right {
  flex: 1 1 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 320px;
}

.bridge-icon {
  width: 32px;
  height: 32px;
}

.bridge-content p {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-dark);
  opacity: 0.85;
}

@media (max-width: 900px) {
  .bridge-content {
    flex-direction: column;
    max-width: 600px;
  }

  .bridge-explanation-text {
    flex: none;
    width: 100%;
    text-align: center;
  }

  .france-concentration-right {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .bridge-section {
    padding-left: 2rem;
  }

  .bridge-content p {
    font-size: 16px;
  }
}

/* ==========================================================================
   10. RQ02 — Chart containers, filter buttons & tab switcher
   ========================================================================== */

/* Default RQ02 grid: text left | chart right */
.analysis-grid-rq2 {
  grid-template-columns: 1fr;
  max-width: 76rem;
}

@media (min-width: 768px) {
  .analysis-grid-rq2 {
    grid-template-columns: 2fr 2.8fr;
    gap: 3rem;
  }
}

/* Inverted layout (analysis-2): chart left | text right
   Use CSS order so HTML source order doesn't need to change */
@media (min-width: 768px) {
  .rq2-chart-left {
    order: -1;
  }

  /* chart column moves to column 1 */
  .rq2-text-right {
    order: 1;
  }

  /* text column stays in column 2  */

  /* When inverted, flip the column widths */
  .analysis-grid-rq2:has(.rq2-chart-left) {
    grid-template-columns: 2.8fr 2fr;
  }
}

/* Chart column wrapper */
.rq2-chart-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: auto;
}

/* amCharts container */
.rq2-amchart-container {
  width: 100%;
  height: 440px;
  background: rgba(26, 58, 95, 0.04);
  border-radius: 1rem;
  overflow: hidden;
}

/* ---- RSQ01 Country filter buttons ---- */
.rsq01-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.rsq01-filter-btn {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-color);
  background: rgba(26, 58, 95, 0.07);
  border: 2px solid rgba(26, 58, 95, 0.15);
  border-radius: 9999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.rsq01-filter-btn:hover {
  background: rgba(26, 58, 95, 0.15);
  border-color: var(--primary-color);
}

.rsq01-filter-btn.rsq01-active {
  background: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
}

.map-country-btn.map-country-active {
  background: var(--primary-color);
  color: var(--bg-color);
  border-color: var(--primary-color);
}



/* ==========================================================================
   10. Team Meta Stats
   ========================================================================== */
.team-meta-container {
  width: 100%;
  text-align: center;
  color: white;
}

.team-meta-title {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7A98B8;
  margin-bottom: 1rem;
  /* was 1.5rem -- frees vertical space */
}

.team-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* was repeat(2, 1fr) -- 3 columns, 2 rows */
  gap: 1.25rem 0.75rem;
  padding-bottom: 0.5rem;
}

.team-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0.25rem;
  min-width: 90px;
  /* was 100px -- needs to fit 3 per row in 340px column */
}

.meta-icon {
  color: var(--sea-color);
  width: 24px;
  height: 24px;
  margin-bottom: 0.5rem;
}

.meta-label {
  font-family: var(--font-sans);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.2rem;
  text-align: center;
}

.meta-count {
  font-family: var(--font-serif);
  font-size: 24px;
  /* was 28px */
  font-weight: 700;
  color: white;
  text-align: center;
}

#falling-france-bubble {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background-color: #1f7f95;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  /* bubble is now relative to .france-concentration-right */
}

/* =========================================
   SECTION 5 — QUALITY WAFFLE CHARTS
   ========================================= */

.waffle-left-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.waffle-question-text {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.waffle-country-highlight {
  color: #1f7f95;
  font-weight: 800;
  transition: color 0.3s;
}

.waffle-country-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.waffle-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.waffle-chart-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.waffle-chart-title {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-color);
  margin: 0;
}

.waffle-grid {
  width: 100%;
  transition: opacity 0.35s;
}

.waffle-legend {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.waffle-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-dark);
}

.waffle-legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* =========================================
   SECTION 6 — OPENNESS RINGS
   ========================================= */

.openness-rings-row {
  display: flex;
  flex-wrap: nowrap;
  /* Force single row */
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  overflow: visible;
}

.openness-ring-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 0;
  /* Equal width, shrink to fit */
  min-width: 0;
  transition: transform 0.2s ease;
}

.openness-ring-card:hover {
  transform: translateY(-4px);
}

.openness-ring-chart {
  width: 100%;
  aspect-ratio: 1;
  max-width: 150px;
}

.openness-ring-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .team-layout-grid {
    grid-template-columns: 740px 340px;
    gap: 3rem;
    width: max-content;
    margin: 0.5rem auto 0 auto;
    /* Centered, minimum top/bottom margin */
  }
}

.team-card {
  width: 220px !important;
  height: 220px !important;
  padding: 0.75rem !important;
}

.team-photo {
  width: 135px !important;
  height: 135px !important;
}
.stat-verb {
  font-family: var(--font-sans);
  font-size: 18px;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.05em;
  font-weight: 700;
}
