:root {
  --ink: #07131d;
  --ink-2: #0c2130;
  --ink-3: #11364a;
  --paper: #f7fbff;
  --white: #ffffff;
  --text: #102436;
  --muted: #577082;
  --line: rgba(16, 36, 54, 0.16);
  --line-dark: rgba(255, 255, 255, 0.18);
  --blue: #39a8f2;
  --blue-2: #9cd7ff;
  --green: #2fbf83;
  --green-2: #b8efd7;
  --amber: #f0b84d;
  --coral: #f26f5b;
  --shadow: 0 24px 70px rgba(7, 19, 29, 0.18);
  --max: 1180px;
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(57, 168, 242, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 191, 131, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, #f7fbff 0%, #edf7fb 38%, #f7fbff 100%);
  background-size: 72px 72px, 72px 72px, auto;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.58;
  -webkit-text-size-adjust: 100%;
}

body.nav-open {
  overflow: hidden;
}

body[data-page="actions"] {
  --page-hero-image: url("images/hero-actions.webp");
}

body[data-page="events"] {
  --page-hero-image: url("images/hero-events.webp");
}

body[data-page="ledger"] {
  --page-hero-image: url("images/hero-ledger.webp");
}

body[data-page="travel"] {
  --page-hero-image: url("images/hero-travel.webp");
}

body[data-page="research"] {
  --page-hero-image: url("images/hero-research.webp");
}

body[data-page="ecosystem"] {
  --page-hero-image: url("images/hero-ecosystem.webp");
}

body[data-page="boundaries"] {
  --page-hero-image: url("images/hero-boundaries.webp");
}

body[data-page="contribute"] {
  --page-hero-image: url("images/hero-contribute.webp");
}

body[data-page="sources"] {
  --page-hero-image: url("images/hero-sources.webp");
}

main,
section,
article,
div,
p,
h1,
h2,
h3,
a,
span,
label,
input,
textarea,
select {
  min-width: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
a,
button,
label,
textarea {
  overflow-wrap: break-word;
}

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--amber);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 19, 29, 0.92);
  color: var(--white);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(100%, var(--max));
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  padding: 0.78rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 8px;
  border: 1px solid rgba(156, 215, 255, 0.65);
  background: linear-gradient(135deg, var(--blue), var(--green));
  color: var(--white);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 30px rgba(57, 168, 242, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.15;
  min-width: 0;
}

.brand-text strong {
  color: var(--white);
  font-size: 1rem;
}

.brand-text span {
  color: var(--blue-2);
  font-size: 0.78rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.24rem;
  flex-wrap: wrap;
}

.site-nav a {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.58rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.87rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--white);
  background: rgba(57, 168, 242, 0.18);
}

.nav-toggle {
  display: none;
  flex: 0 0 2.7rem;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 0.24rem auto;
  background: currentColor;
}

.hero {
  min-height: 82vh;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 19, 29, 0.94) 0%, rgba(7, 19, 29, 0.78) 42%, rgba(7, 19, 29, 0.28) 100%),
    linear-gradient(0deg, rgba(7, 19, 29, 0.88) 0%, rgba(7, 19, 29, 0.05) 46%);
  z-index: 1;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  padding: 5.3rem 1.1rem 4.2rem;
}

.hero-copy {
  width: min(100%, 46rem);
  max-width: 46rem;
}

.hero h1 {
  margin: 0;
  font-size: 5.4rem;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-lede {
  margin: 1.35rem 0 0;
  max-width: 42rem;
  color: #d8efff;
  font-size: 1.26rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  min-height: 2.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: var(--white);
  box-shadow: 0 18px 48px rgba(47, 191, 131, 0.28);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.button.dark {
  background: var(--ink);
  color: var(--white);
}

.button.outline {
  border-color: var(--line);
  background: var(--white);
  color: var(--text);
}

.button::after,
.sequence-link.next::after {
  content: "";
  width: 0.52rem;
  height: 0.52rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.sequence-link::before {
  content: "";
  width: 0.52rem;
  height: 0.52rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.sequence-link.next::before {
  display: none;
}

.button.no-arrow::after {
  display: none;
}

.section {
  padding: 4.8rem 1.1rem;
}

.section.dark {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--white);
}

.section.green {
  background: linear-gradient(180deg, #e8f9f0 0%, #f7fbff 100%);
}

.section.blue {
  background: linear-gradient(180deg, #eaf6ff 0%, #f7fbff 100%);
}

.shell {
  width: min(100%, var(--max));
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(18rem, 1fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.section-heading h2,
.page-title h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading p,
.page-title p,
.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.dark .section-heading p,
.dark .lead,
.dark .muted {
  color: #c7dcea;
}

.label {
  margin: 0 0 0.7rem;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.action-card,
.link-card,
.note-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.card,
.action-card,
.link-card,
.note-card {
  padding: 1.2rem;
}

.dark .card,
.dark .action-card,
.dark .link-card,
.dark .note-card {
  border-color: var(--line-dark);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.card h3,
.action-card h3,
.link-card h3,
.note-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.18rem;
  line-height: 1.2;
}

.card p,
.action-card p,
.link-card p,
.note-card p {
  margin: 0;
  color: var(--muted);
}

.card p + p,
.action-card p + p,
.link-card p + p,
.note-card p + p {
  margin-top: 0.65rem;
}

.dark .card p,
.dark .action-card p,
.dark .link-card p,
.dark .note-card p {
  color: #c7dcea;
}

.link-card {
  display: grid;
  gap: 0.8rem;
  text-decoration: none;
}

.link-card:hover {
  border-color: rgba(57, 168, 242, 0.55);
  transform: translateY(-2px);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.2rem;
}

.mini-button {
  display: inline-flex;
  min-height: 2.3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.48rem 0.72rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.mini-button:hover,
.mini-button:focus-visible {
  border-color: rgba(57, 168, 242, 0.55);
  transform: translateY(-1px);
}

.mini-button.primary {
  border-color: transparent;
  color: var(--white);
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.mini-button.disabled {
  color: var(--muted);
  background: rgba(231, 239, 245, 0.78);
  cursor: not-allowed;
}

.dark .mini-button {
  border-color: var(--line-dark);
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.dark .mini-button.disabled {
  color: #a9c1d1;
}

.stat-strip,
.truth-band,
.source-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.truth-band {
  padding: 2.2rem 1.1rem;
}

.truth-band .shell {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 2rem;
  align-items: center;
}

.truth-band strong {
  color: var(--ink);
  font-size: 1.3rem;
}

.truth-band p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  position: relative;
  min-height: 25rem;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 4.8rem 1.1rem 3.2rem;
  background:
    linear-gradient(90deg, rgba(57, 168, 242, 0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47, 191, 131, 0.09) 1px, transparent 1px),
    linear-gradient(145deg, var(--ink) 0%, var(--ink-2) 62%, var(--ink-3) 100%);
  background-size: 58px 58px, 58px 58px, auto;
  color: var(--white);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--page-hero-image, none);
  background-position: center;
  background-size: cover;
  opacity: 0.72;
  filter: saturate(1.04) contrast(1.02);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 19, 29, 0.92) 0%, rgba(7, 19, 29, 0.76) 45%, rgba(7, 19, 29, 0.36) 100%),
    linear-gradient(0deg, rgba(7, 19, 29, 0.88) 0%, rgba(7, 19, 29, 0.1) 58%);
}

.page-title {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1fr);
  gap: 2rem;
  align-items: end;
}

.page-title p {
  color: #c7dcea;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  border-left: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.76);
}

.timeline-item strong {
  color: var(--ink);
}

.comparison {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.comparison th,
.comparison td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.comparison th {
  background: var(--ink);
  color: var(--white);
}

.comparison tr:last-child td {
  border-bottom: 0;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.pill {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: rgba(57, 168, 242, 0.12);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
}

.dark .pill {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
  gap: 1rem;
  align-items: start;
}

.field-grid {
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-weight: 900;
  color: var(--ink);
}

.field input,
.field select,
.field textarea,
.markdown-output {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  padding: 0.72rem 0.8rem;
}

.field textarea,
.markdown-output {
  min-height: 8rem;
  resize: vertical;
}

.markdown-output {
  min-height: 31rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

.site-footer {
  padding: 3rem 1.1rem;
  background: var(--ink);
  color: var(--white);
}

.footer-grid {
  width: min(100%, var(--max));
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr);
  gap: 2rem;
}

.footer-grid p {
  color: #c7dcea;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.footer-links a {
  color: #d8efff;
  font-weight: 800;
}

.sequence-nav {
  width: min(100%, var(--max));
  max-width: calc(100vw - 2rem);
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sequence-link {
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  color: var(--white);
  text-decoration: none;
}

.sequence-link.next {
  justify-content: flex-end;
  text-align: right;
}

.sequence-link span {
  display: block;
  color: #9cd7ff;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sequence-link strong {
  display: block;
  font-size: 1.1rem;
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top svg {
  width: 1.2rem;
  height: 1.2rem;
}

@media (max-width: 980px) {
  body {
    font-size: 17px;
  }

  .nav-toggle {
    display: block;
    margin-left: 0;
  }

  .nav-shell {
    justify-content: flex-start;
  }

  .site-nav {
    position: fixed;
    inset: 4.35rem 1rem auto 1rem;
    display: none;
    max-height: calc(100vh - 5.4rem);
    overflow: auto;
    padding: 0.8rem;
    border: 1px solid var(--line-dark);
    border-radius: 8px;
    background: rgba(7, 19, 29, 0.98);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: grid;
    justify-content: stretch;
  }

  .site-nav a {
    width: 100%;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero-copy {
    width: min(100%, 24rem);
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions .button {
    width: min(100%, 18rem);
  }

  .hero {
    min-height: 78vh;
  }

  .section-heading,
  .page-title,
  .truth-band .shell,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    width: min(100%, 24rem);
  }

  .grid.three,
  .grid.four,
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .brand-text span {
    display: none;
  }

  .brand-text strong {
    font-size: 0.94rem;
  }

  .nav-shell {
    gap: 0.65rem;
    padding-inline: 0.85rem;
  }

  .hero-content,
  .shell,
  .page-title,
  .footer-grid,
  .sequence-nav {
    width: min(100%, 22rem);
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .hero-lede {
    font-size: 1.08rem;
  }

  .hero-content {
    padding-inline: 1rem;
  }

  .button {
    max-width: 100%;
  }

  .section {
    padding: 3.4rem 1rem;
  }

  .section-heading h2,
  .page-title h1 {
    font-size: 2.25rem;
  }

  .grid.three,
  .grid.four,
  .grid.two,
  .sequence-nav {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .comparison {
    display: block;
    overflow-x: auto;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
