:root {
  color-scheme: light;
  --lf-bg: #fbfaf6;
  --lf-bg-soft: #f5f1e9;
  --lf-surface: #ffffff;
  --lf-surface-muted: #edf3ef;
  --lf-ink: var(--theme-color-text-primary);
  --lf-muted: var(--theme-color-text-secondary);
  --lf-line: #dfe4df;
  --lf-teal: #0a706f;
  --lf-teal-soft: #d9ece7;
  --lf-coral: #c95b4d;
  --lf-rose: #e9b4aa;
  --lf-sage: #7fa293;
  --lf-gold: #b8943b;
  --lf-plum: #695c91;
  --lf-shadow: 0 24px 70px rgba(28, 38, 35, 0.11);
  --lf-content: 1180px;
}

body {
  min-width: 320px;
  background:
    linear-gradient(
      180deg,
      rgba(217, 236, 231, 0.55),
      rgba(251, 250, 246, 0) 460px
    ),
    var(--lf-bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 33, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 31, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(23, 33, 31, 0.08);
  background: rgba(251, 250, 246, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner,
.section-inner,
.site-footer {
  width: min(var(--lf-content), calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--theme-space-6);
  min-height: 72px;
}

[data-i18n] {
  white-space: pre-line;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lf-ink);
  font-size: var(--theme-text-lg);
  font-weight: 800;
  text-decoration: none;
}

.brand:visited {
  color: var(--lf-ink);
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  /* border-radius: 10px;
  background: var(--lf-ink);
  color: var(--theme-color-text-inverse);
  font-family: var(--theme-font-numeric);
  font-size: 13px;
  letter-spacing: 0; */
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 24px);
  color: var(--lf-muted);
  font-size: var(--theme-text-md);
}

.nav-actions a {
  text-decoration: none;
}

.nav-actions a:hover {
  color: var(--lf-ink);
}

.lang-toggle {
  min-width: 50px;
  height: 36px;
  border: 1px solid var(--lf-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--lf-ink);
  transition:
    border-color var(--theme-motion-fast),
    transform var(--theme-motion-fast),
    background var(--theme-motion-fast);
}

.lang-toggle:hover {
  transform: translateY(var(--theme-motion-hover-lift));
  border-color: rgba(10, 112, 111, 0.32);
  background: var(--lf-surface);
}

.hero {
  /* min-height: calc(100svh - 72px); */
  display: flex;
  flex-direction: column;
  /* gap: var(--theme-space-7); */
  padding: clamp(54px, 8vw, 108px) 0 54px;
}

.hero .hero-copy + div {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.58fr);
  align-items: center;
  gap: clamp(30px, 5vw, 64px);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--lf-coral);
  font-size: var(--theme-text-xs);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  color: var(--lf-ink);
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}

html:lang(en) h1 {
  font-size: clamp(42px, 5vw, 56px);
}

.hero-lede {
  /* max-width: 690px; */
  margin-top: 26px;
  color: #3f4b47;
  font-size: clamp(18px, 2.1vw, 23px);
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 850;
  text-decoration: none;
  transition:
    transform var(--theme-motion-fast),
    box-shadow var(--theme-motion-fast),
    border-color var(--theme-motion-fast);
}

.primary-action {
  border: 1px solid var(--lf-ink);
  background: var(--lf-ink);
  color: var(--theme-color-text-inverse);
  box-shadow: 0 12px 26px rgba(23, 33, 31, 0.16);
}

.primary-action:visited {
  color: var(--theme-color-text-inverse);
}

.secondary-action {
  border: 1px solid var(--lf-line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--lf-ink);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
  color: var(--theme-color-text-inverse);
}

.secondary-action:hover {
  border-color: rgba(10, 112, 111, 0.35);
  color: var(--lf-ink);
  box-shadow: 0 12px 24px rgba(28, 38, 35, 0.08);
}

.hero-visual {
  min-height: 0;
  display: grid;
  place-items: center;
}

.orbit-map {
  width: min(240px, 70vw);
  aspect-ratio: 1;
  /* border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.92),
      rgba(245, 241, 233, 0.82)
    ),
    radial-gradient(
      circle at 72% 24%,
      rgba(0, 133, 199, 0.16),
      transparent 30%
    ),
    radial-gradient(circle at 28% 78%, rgba(0, 159, 61, 0.14), transparent 28%);
  box-shadow: 0 18px 46px rgba(28, 38, 35, 0.09); */
  overflow: hidden;
}

.hero-globe {
  width: 100%;
  height: 100%;
}

.globe-ocean {
  fill: rgba(231, 242, 239, 0.92);
  stroke: rgba(23, 33, 31, 0.12);
  stroke-width: 1.6;
}

.globe-line {
  fill: none;
  stroke: rgba(10, 112, 111, 0.16);
  stroke-width: 1.2;
}

.continent-pulse {
  stroke: #fffdf8;
  stroke-width: 2.2;
  animation: heroPulse 2.6s infinite;
  transform-origin: center;
}

.continent-blue {
  fill: #0085c7;
  filter: drop-shadow(0 0 9px rgba(0, 133, 199, 0.38));
}

.continent-yellow {
  fill: #f4c300;
  filter: drop-shadow(0 0 9px rgba(244, 195, 0, 0.38));
  animation-delay: 0.2s;
}

.continent-black {
  fill: #1f2725;
  filter: drop-shadow(0 0 8px rgba(31, 39, 37, 0.34));
  animation-delay: 0.4s;
}

.continent-green {
  fill: #009f3d;
  filter: drop-shadow(0 0 9px rgba(0, 159, 61, 0.36));
  animation-delay: 0.6s;
}

.continent-red {
  fill: #df0024;
  filter: drop-shadow(0 0 9px rgba(223, 0, 36, 0.34));
  animation-delay: 0.8s;
}

.stat-pill {
  /* position: absolute;
  right: 20px;
  bottom: 20px; */
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  max-width: calc(100% - 48px);
  padding: 4px 16px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--theme-radius-pill);
  background: rgba(255, 255, 255, 0.46);
  color: var(--lf-muted);
  box-shadow: 0 12px 30px rgba(28, 38, 35, 0.08);
  backdrop-filter: blur(18px);
}

.stat-pill strong {
  color: var(--lf-ink);
  font-family: var(--theme-font-numeric);
  font-size: 30px;
  line-height: 1;
}

@keyframes mapPulse {
  50% {
    transform: scale(1.45);
    opacity: 0.72;
  }
}

@keyframes heroPulse {
  50% {
    transform: scale(1.22);
    opacity: 0.76;
  }
}

.prophecy-band,
.map-section,
.policy-page {
  padding: clamp(62px, 9vw, 112px) 0;
}

.submit-section {
  padding-bottom: clamp(62px, 9vw, 112px);
}

.prophecy-band {
  background:
    linear-gradient(135deg, rgba(127, 162, 147, 0.16), transparent 38%), #17211f;
  color: var(--theme-color-text-inverse);
}

.section-heading {
  max-width: 880px;
  margin-bottom: 32px;
}

.section-heading.compact {
  max-width: 920px;
}

.section-heading h2,
.policy-hero h1 {
  color: inherit;
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

html:lang(en) .section-heading h2 {
  font-size: clamp(32px, 5vw, 42px);
}

.section-heading p:not(.eyebrow),
.policy-hero p {
  margin-top: 16px;
  color: var(--lf-muted);
  font-size: var(--theme-text-xl);
  line-height: 1.75;
}

.prophecy-band .section-heading p:not(.eyebrow),
.prophecy-band .plain-panel p {
  color: rgba(251, 250, 246, 0.72);
}

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

.plain-panel {
  padding-top: 22px;
  border-top: 1px solid rgba(251, 250, 246, 0.2);
}

.plain-panel h3,
.top-list h3 {
  margin-bottom: 12px;
  font-size: var(--theme-text-2xl);
  font-weight: 850;
}

.plain-panel p {
  line-height: 1.78;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.map-surface {
  position: relative;
  min-height: 540px;
  max-height: 630px;
  border: 1px solid var(--lf-line);
  border-radius: 18px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.74),
      rgba(255, 255, 255, 0.34)
    ),
    var(--lf-surface-muted);
  box-shadow: 0 18px 50px rgba(28, 38, 35, 0.08);
  overflow: hidden;
}

.map-surface.is-fullscreen {
  position: fixed;
  inset: 16px;
  z-index: 60;
  min-height: calc(100svh - 32px);
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.94),
      rgba(241, 247, 244, 0.92)
    ),
    var(--lf-surface-muted);
}

.map-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(10, 112, 111, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 112, 111, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
}

#world-map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 540px;
}

.map-surface.is-fullscreen #world-map {
  min-height: calc(100svh - 32px);
}

.map-fullscreen-button {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--lf-ink);
  font-weight: 820;
  box-shadow: 0 10px 24px rgba(28, 38, 35, 0.08);
  backdrop-filter: blur(12px);
}

.map-ocean {
  fill: transparent;
}

.map-graticule {
  fill: none;
  stroke: rgba(10, 112, 111, 0.1);
  stroke-width: 1;
}

.land-mass {
  fill: rgba(127, 162, 147, 0.24);
  stroke: rgba(23, 33, 31, 0.08);
  stroke-width: 1.2;
}

.country-shape {
  fill: rgba(127, 162, 147, 0.34);
  stroke: rgba(251, 250, 246, 0.94);
  stroke-width: 0.8;
  transition:
    fill var(--theme-motion-fast),
    stroke var(--theme-motion-fast);
  cursor: pointer;
}

.country-shape.has-signal {
  fill: rgba(10, 112, 111, 0.4);
}

.country-shape:hover,
.country-shape:focus-visible {
  fill: rgba(201, 91, 77, 0.54);
  stroke: rgba(23, 33, 31, 0.22);
  outline: none;
}

.map-dot {
  fill: var(--lf-coral);
  stroke: #fffdf8;
  stroke-width: 2;
  filter: drop-shadow(0 8px 10px rgba(95, 50, 43, 0.2));
  cursor: pointer;
}

.map-dot.is-top {
  animation: mapPulse 2.5s infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.map-label {
  fill: var(--lf-ink);
  font-size: 12px;
  font-weight: 800;
}

.map-tooltip {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 4px;
  min-width: 180px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 33, 31, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--lf-muted);
  box-shadow: 0 16px 38px rgba(28, 38, 35, 0.14);
  pointer-events: none;
  backdrop-filter: blur(14px);
}

.map-tooltip strong {
  color: var(--lf-ink);
  font-size: var(--theme-text-lg);
}

.map-tooltip span {
  font-size: var(--theme-text-sm);
}

.signal-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: stretch;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric-row,
.top-list {
  border: 1px solid var(--lf-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 40px rgba(28, 38, 35, 0.06);
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  min-height: 92px;
  padding: 14px 16px;
  gap: 4px 12px;
}

.metric-row span,
.top-list li {
  color: var(--lf-muted);
}

.metric-row strong {
  color: var(--lf-ink);
  font-family: var(--theme-font-numeric);
  font-size: 32px;
}

.metric-row small {
  grid-column: 1 / -1;
  color: var(--lf-teal);
  font-family: var(--theme-font-numeric);
  font-weight: 800;
}

.top-list {
  padding: 18px;
}

.top-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.top-list-header h3 {
  margin-bottom: 0;
}

.top-list-header button,
.ranking-modal-header button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--lf-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--lf-teal);
  font-weight: 820;
}

.top-list ol {
  display: grid;
  gap: 11px;
  list-style: decimal;
  padding-left: 20px;
  counter-reset: ranking;
}

.ranking-empty {
  margin-top: 12px;
  color: var(--lf-muted);
}

.top-list li,
.ranking-modal li {
  position: relative;
  list-style: none;
  counter-increment: ranking;
  padding-left: 42px;
  min-height: 30px;
  display: flex;
  align-items: center;
}

.top-list li::before,
.ranking-modal li::before {
  content: counter(ranking);
  position: absolute;
  left: 0;
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(10, 112, 111, 0.12);
  color: var(--lf-teal);
  font-family: var(--theme-font-numeric);
  font-size: var(--theme-text-sm);
  font-weight: 900;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 33, 31, 0.3);
  backdrop-filter: blur(8px);
}

.ranking-modal {
  width: min(680px, 100%);
  max-height: min(760px, calc(100svh - 48px));
  overflow: auto;
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 18px;
  background: var(--lf-surface);
  box-shadow: 0 28px 80px rgba(23, 33, 31, 0.22);
  padding: 22px;
}

.ranking-modal-header {
  position: sticky;
  top: -22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -22px -22px 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--lf-line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.ranking-modal-header h2 {
  font-size: var(--theme-text-2xl);
  font-weight: 900;
}

.ranking-modal ol {
  display: grid;
  gap: 10px;
  list-style: decimal;
  padding-left: 22px;
  counter-reset: ranking;
}

.ranking-modal li {
  color: var(--lf-muted);
}

.submit-section {
  background: linear-gradient(
    180deg,
    rgba(245, 241, 233, 0),
    var(--lf-bg-soft)
  );
}

.signal-form {
  max-width: 760px;
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--lf-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 50px rgba(28, 38, 35, 0.08);
}

.trap-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signal-form label,
.signal-form fieldset {
  display: grid;
  gap: 8px;
  color: var(--lf-ink);
  font-weight: 760;
}

.signal-form input[type="number"],
.signal-form input[type="text"],
.signal-form select {
  min-height: 36px;
  width: 100%;
  border: 1px solid var(--lf-line);
  border-radius: 8px;
  background: var(--lf-surface);
  color: var(--lf-ink);
  padding: 0 14px;
}

.signal-form input[type="number"]:focus,
.signal-form input[type="text"]:focus,
.signal-form select:focus,
.check-line input:focus-visible,
.radio-line input:focus-visible {
  outline: 3px solid rgba(10, 112, 111, 0.18);
  border-color: rgba(10, 112, 111, 0.5);
}

.country-field {
  position: relative;
}

.country-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid rgba(23, 33, 31, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(28, 38, 35, 0.14);
}

.country-option {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--lf-ink);
  padding: 0 10px;
  text-align: left;
  font: inherit;
  font-weight: 680;
  cursor: pointer;
}

.country-option:hover,
.country-option:focus-visible {
  background: rgba(10, 112, 111, 0.1);
  outline: none;
}

.signal-form fieldset {
  border: 1px solid var(--lf-line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(245, 241, 233, 0.44);
}

.signal-form legend {
  margin-bottom: 10px;
}

.check-line,
.radio-line {
  grid-template-columns: 20px 1fr;
  align-items: center;
  font-weight: 680;
}

.check-line input,
.radio-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--lf-teal);
  appearance: auto;
}

.form-button {
  width: max-content;
}

.form-message {
  min-height: 24px;
  color: var(--lf-teal);
  font-weight: 760;
}

.policy-page {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
}

.policy-hero {
  margin-bottom: 40px;
}

.policy-content {
  display: grid;
  gap: 18px;
  max-width: 820px;
  line-height: 1.76;
}

.policy-content h2 {
  margin-top: 22px;
  color: var(--lf-ink);
  font-size: 24px;
  font-weight: 850;
}

.policy-content p {
  color: var(--lf-muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 30px 0;
  border-top: 1px solid rgba(23, 33, 31, 0.08);
  color: var(--lf-muted);
}

.site-footer span:first-child {
  color: var(--lf-ink);
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(
      circle at 18% 16%,
      rgba(10, 112, 111, 0.14),
      transparent 28%
    ),
    radial-gradient(
      circle at 84% 82%,
      rgba(201, 91, 77, 0.14),
      transparent 30%
    ),
    var(--lf-bg);
}

.not-found-panel {
  width: min(100%, 620px);
}

.not-found-panel h1 {
  margin: 10px 0 16px;
}

.not-found-panel p:not(.eyebrow) {
  color: var(--lf-muted);
  max-width: 48rem;
}

@media (max-width: 980px) {
  .hero,
  .map-layout,
  .signal-board {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .prophecy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  h1 {
    font-size: 40px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero .hero-copy + div {
    grid-template-columns: auto;
  }

  .orbit-map {
    width: min(340px, 88vw);
  }

  .map-surface,
  #world-map {
    min-height: 380px;
  }

  .metric-row {
    min-height: 64px;
  }

  .header-inner,
  .section-inner,
  .site-footer,
  .policy-page {
    width: min(100% - 28px, var(--lf-content));
  }
}
