:root {
  --bg:       #A7B8B5;
  --surface:  #C1D0CD;
  --surface-2:#91A6A2;
  --text: #0E1216;
  --muted:#2F3D44;
  --border: rgba(14, 18, 22, 0.18);
  --accent: #2F3D44;
  --accent-hover:#2F3D44;
  --bronze:#6A5A38;
  --danger:#8B2E2E;
  --success:#1F6F4A;
  --header-height: 56px;
  --top-edge-offset: 1.6rem;
}

* {
  box-sizing: border-box;}

html {
  scroll-behavior: smooth;}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

.button {
  --btn-bg: #d3cec0;
  --btn-ink: var(--text);
  --btn-line: rgba(21, 25, 27, 0.26);
  --btn-accent: #6d5932;

  position: relative;
  display: inline-block;
  padding: 0.85rem 1.1rem;
  color: var(--btn-ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0)) top / 100% 42% no-repeat,
    linear-gradient(180deg, var(--btn-bg), #ccc5b5);
  border: 1px solid var(--btn-line);
  border-radius: 2px;
  text-decoration: none;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.28),
    0 2px 8px rgba(14,18,22,0.05);
  transition:
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.button:hover {
  color: var(--btn-ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0)) top / 100% 40% no-repeat,
    linear-gradient(180deg, #cbc2ae, #bfb49a);
  border-color: rgba(109, 89, 50, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.18),
    0 4px 12px rgba(14,18,22,0.09);
  text-decoration: none;
}

#database-access .button {
  margin-top: 0.65rem;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
.btn:focus-visible {
  outline: 2px solid rgba(14,18,22,.35);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--header-height);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--text);
  color: var(--surface);
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  z-index: 1000;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  pointer-events: none;
}

.site-header__inner {
  width: min(calc(120rem + (var(--top-edge-offset) * 2)), 100%);
  margin: 0 auto;
  padding: var(--top-edge-offset) var(--top-edge-offset) 0;
}

.site-header__primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__mobile-nav {
  display: none;
  position: relative;
}

.site-header__mobile-nav select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.72rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  padding: 0.6rem 2.3rem 0.6rem 0.8rem;
  line-height: 1.35;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.site-header__brand-name {
  margin: 0;
  display: inline-block;
  pointer-events: auto;
  font-family: "Alegreya", serif;
  font-size: clamp(1.5rem, 1.05vw + 1.15rem, 2.15rem);
  line-height: 1.1;
  letter-spacing: .04em;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.site-header__brand-name:hover {
  color: var(--accent-hover);
}

.site-header__login {
  display: inline-flex;
  pointer-events: auto;
  font-family: "Source Sans 3", sans-serif;
  font-size: 1.3rem;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
}

a.site-header__login {
text-decoration: none;
}

.page-shell {
  width: min(calc(120rem + (var(--top-edge-offset) * 2)), 100%);
  margin: 0 auto;
  padding: var(--top-edge-offset) var(--top-edge-offset) 0;
  display: grid;
  grid-template-columns: 18.75rem minmax(0, 1fr);
  gap: clamp(2.3rem, 3.4vw, 3.7rem);
  align-items: start;
}

.chapter-nav {
  position: sticky;
  top: calc(var(--header-height) + var(--top-edge-offset));
  align-self: start;
  min-height: calc(100vh - var(--header-height) - var(--top-edge-offset));
  max-height: calc(100vh - var(--header-height) - var(--top-edge-offset));
  display: flex;
  flex-direction: column;
  padding: 0 1rem 1rem 0.2rem;
}

.chapter-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .8rem;
  margin-bottom: auto;
}

.chapter-link {
  display: block;
  text-decoration: none;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.2;
  font-family: "Alegreya", serif;
  font-weight: 600;
}

.chapter-link:hover {
  color: var(--accent-hover);
}

.chapter-link[aria-current="location"] {
  color: var(--accent-hover);
}

.hero {
  min-height: calc(100svh - var(--top-edge-offset));
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 0 0 clamp(3.1rem, 7vw, 5.8rem);
}

.hero > :not(.hero-image) {
  position: relative;
  z-index: 1;
}

.hero-image{
  position: absolute;
  margin-right: calc(-1 * var(--top-edge-offset));
  bottom: clamp(-0.4rem, 0.9vw, 0.6rem);
  z-index: 0;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  pointer-events: none;
}

.hero-image img {
  display: block;
  width: clamp(380px, 54vw, 700px);
  height: auto;
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 1.9rem;
  text-transform: uppercase;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 600;
}

.wordmark-sans {
  font-family: "Source Sans 3", sans-serif;
  font-weight: 500;
}

h1,
h2 {
  margin: 0;
  font-family: "Alegreya", serif;
  line-height: 1.1;
  letter-spacing: .01em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.2rem, 2.5vw + 1.2rem, 3.8rem);
  margin-top: .25rem;
  margin-bottom: .62rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 5.2rem);
  line-height: 0.94;
  letter-spacing: .02em;
  margin-top: 0;
  margin-bottom: .95rem;
  max-width: none;
  white-space: nowrap;
}

h2 {
  font-size: clamp(1.95rem, 1.4vw + 1.18rem, 2.8rem);
  margin-bottom: .45rem;
}

#challenge-title{
  max-width: 30ch;
  text-wrap: pretty;
}

h3,
h4 {
  font-family: "Alegreya", serif;
  line-height: 1.4;
}

h3 {
  margin-top: 1.5rem;
  margin-bottom: .5rem;
  font-size: 1.15rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text);
  font-family: "Source Sans 3", sans-serif;
}

h4 {
  margin-top: 1.3rem;
  margin-bottom: .8rem;
  font-size: 1.3rem;
  font-weight: 500;
}

p,
ul,
ol,
dl,
table {
  margin-top: 0;
  margin-bottom: 1rem;
}

strong {
  font-weight: 600;
}

section[id] {
  scroll-margin-top: calc(var(--top-edge-offset) + 2rem);
}

section + section {
  margin-top: 0;
}

.hero + section {
  margin-top: clamp(4.2rem, 8.6vw, 7.2rem);
}

.chapter + .chapter {
  margin-top: clamp(3.2rem, 5vw, 5.1rem);
  padding-top: 0;
}

.chapter-header {
  margin: 0 0 1.2rem;
}

.chapter-number {
  margin: 0 0 0.9rem;
  text-transform: uppercase;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}

.chapter-body {
  max-width: 62ch;
}

.chapter-body--split {
  max-width: none;
}

.chapter-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 62ch) minmax(260px, 1fr);
  gap: clamp(1.2rem, 3vw, 2.8rem);
  align-items: start;
  margin-bottom: clamp(1.1rem, 2vw, 1.8rem);
}

.chapter-intro-copy > p {
  max-width: 60ch;
  line-height: 1.5;
  color: var(--text);
  font-size: clamp(0.98rem, 0.45vw + 0.9rem, 1.12rem);
}

.chapter-intro-image {
  margin: 0;
  justify-self: center;
  width: min(100%, 360px);
}

.chapter-intro-image img {
  display: block;
  width: 100%;
  height: auto;
}

.chapter-audience {
  max-width: none;
}

.chapter-audience-title {
  text-align: left;
  margin-bottom: 1.4rem;
}

.chapter-audience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 3rem);
}

.chapter-audience-grid > *{
  max-width: 48ch;
}

.chapter-audience-column h4 {
  margin-top: 0;
}

.chapter-audience-column ul {
  margin-bottom: 0;
}

.chapter-columns-grid {
  display: grid;
  grid-template-columns: minmax(0, 62ch) minmax(260px, 1fr);
  gap: clamp(1.2rem, 3vw, 2.8rem);
  align-items: start;
}

.chapter-columns-grid--two-copy {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.chapter-columns-grid--two-copy > *{
  max-width: 48ch;
}

.chapter-columns-copy > p {
  max-width: 64ch;
  line-height: 1.5;
  color: var(--text);
}

#how-it-works .chapter-columns-copy > p{ max-width: 58ch; }

.chapter-columns-image {
  margin: 0;
  justify-self: center;
  width: min(100%, 360px);
}

#scanning-objects .chapter-columns-image {
  width: min(100%, 300px);
}

#how-it-works .chapter-columns-image {
    width: min(100%, 300px);
}

.chapter-columns-image img {
  display: block;
  width: 100%;
  height: auto;
}

.chapter-body--split > :not(.chapter-intro-grid):not(.chapter-audience):not(.chapter-columns-grid) {
  max-width: 62ch;
}

.chapter-body > p {
  max-width: 64ch;
  line-height: 1.5;
  color: var(--text);
}

.chapter-body ul,
.chapter-body ol {
  margin: 0.3rem 0 1.8rem;
  padding-left: .22em;
}

.chapter-body li {
  line-height: 1.6;
  position: relative;
  padding-left: 1.4rem;
  margin: 0 0 .55rem 0;
}

.chapter-body li::before{
  content: "—";
  position: absolute;
  left: 0;
  top: 0;
}

.chapter-note {
  margin-top: 1.3rem;
  max-width: 62ch;
  color: var(--muted);
}

ul,
ol {
  padding-left: 1.35em;
}

li {
  margin-bottom: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-subtitle {
  font-size: clamp(1.4rem, 1.15vw + 1.1rem, 2.3rem);
  max-width: 35ch;
  margin-bottom: 1.6rem;
  line-height: 1.14;
  font-weight: 600;
  color:  var(--text);
  text-wrap: pretty;
  font-family: "Alegreya", serif;
}

.hero-manifesto {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(0.98rem, 0.45vw + 0.9rem, 1.12rem);
  line-height: 1.4;
  color: var(--text);
  text-wrap: pretty;
  letter-spacing: .01em;
}

.site-footer {
  margin-top: clamp(4rem, 6vw, 6rem);
  padding: clamp(1rem, 1.5vw, 1.4rem) 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 28vw, 360px);
  gap: clamp(1rem, 2vw, 2.2rem);
  align-items: end;
}

.site-footer__info {
  max-width: 58ch;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
  padding-bottom: clamp(1.2rem, 2.4vw, 2rem);
}

.site-footer__line {
  margin: 0 0 0.5rem;
}

.site-footer__line:last-child {
  margin-bottom: 0;
}

.site-footer__info a {
  color: inherit;
  text-decoration: none;
}

.site-footer__info a:hover {
  color: var(--text);
  border-bottom-color: rgba(14,18,22,0.42);
}

.site-footer__copyright {
  color: var(--text);
}

.site-footer__image {
  margin: 0 calc(-1 * var(--top-edge-offset)) 0 0;
  justify-self: end;
  align-self: end;
}

.site-footer__image img {
  display: block;
  width: 100%;
  height: auto;
}

.tabular,
td[data-num],
th[data-num] {
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  padding: 0.62rem 0.98rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: color-mix(in oklab, var(--surface-2) 55%, white 45%);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}

.btn-ghost:hover {
  background: color-mix(in oklab, var(--surface-2) 35%, transparent 65%);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-verified {
  background: color-mix(in oklab, var(--success) 20%, transparent 80%);
  border-color: color-mix(in oklab, var(--success) 45%, transparent 55%);
}

.badge-confidential {
  background: color-mix(in oklab, var(--accent) 19%, transparent 81%);
  border-color: color-mix(in oklab, var(--accent) 41%, transparent 59%);
}

.badge-reg {
  background: color-mix(in oklab, var(--bronze) 24%, transparent 76%);
  border-color: color-mix(in oklab, var(--bronze) 44%, transparent 56%);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  overflow-x: auto;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.72rem 0.82rem;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: color-mix(in oklab, var(--surface-2) 57%, white 43%);
  font-weight: 700;
}

tbody tr:hover {
  background: color-mix(in oklab, var(--accent) 8%, transparent 92%);
}

td[data-num],
th[data-num],
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dl {
  display: grid;
  gap: 0.75rem;
  margin: 1.2rem 0;
}

.dl div {
  border: 1px solid var(--border);
  border-radius: 0.74rem;
  background: var(--surface);
  padding: 0.74rem 0.82rem;
}

.dl dt {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.dl dd {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.66;
}

@media (max-width: 1180px) {
  .hero {
    min-height: auto;
    padding-bottom: clamp(2.6rem, 5vw, 3.8rem);
  }

  .hero-image{
    position: relative;
    bottom: auto;
    width: 100%;
    margin-top: clamp(1rem, 3vw, 1.75rem);
    margin-right: 0;
    justify-content: flex-end;
  }

  .hero-image img{
    width: min(72vw, 620px);
    margin-left: auto;
  }
}

@media (max-width: 934px) {
  body {
    font-size: 16px;
    line-height: 1.5;
  }

  .site-header {
    background: var(--bg);
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-header__primary {
    justify-content: center;
    gap: 0.75rem;
    align-items: baseline;
    width: 100%;
  }

  .site-header__inner {
    padding-top: max(0.85rem, env(safe-area-inset-top));
    padding-left: max(0.8rem, calc(var(--top-edge-offset) - 0.25rem));
    padding-right: max(0.8rem, calc(var(--top-edge-offset) - 0.25rem));
  }

  .site-header__brand-name {
    font-size: clamp(1.18rem, 3.8vw, 1.36rem);
    line-height: 1.05;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-align: center;
    padding-block: 0.18rem 0.32rem;
  }

  .site-header__login {
    font-size: clamp(1.02rem, 3.2vw, 1.2rem);
    line-height: 1.1;
    letter-spacing: 0.04em;
    display: none;
  }

  .site-header__mobile-nav {
    display: block;
    pointer-events: auto;
    margin-top: 0.4rem;
  }

  .site-header__mobile-nav::after {
    content: "";
    position: absolute;
    right: 1.15rem;
    top: 50%;
    width: 0.58rem;
    height: 0.58rem;
    border-right: 2px solid rgba(14, 18, 22, 0.62);
    border-bottom: 2px solid rgba(14, 18, 22, 0.62);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    z-index: 2;
  }

  .site-header__mobile-nav select {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(14, 18, 22, 0.16);
    border-radius: 1rem;
    background: color-mix(in oklab, white 50%, var(--surface) 50%);
    color: var(--muted);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 0.64rem 2.35rem 0.64rem 0.85rem;
    box-shadow: none;
    -webkit-box-shadow: none;
    background-clip: padding-box;
  }

  .site-header__mobile-nav select option {
    color: var(--text);
    background: color-mix(in oklab, var(--surface) 90%, white 10%);
  }

  .site-header__mobile-nav select:focus-visible {
    outline: 2px solid color-mix(in oklab, var(--accent) 74%, white 26%);
    outline-offset: 2px;
    box-shadow: none;
    -webkit-box-shadow: none;
  }

  .page-shell {
    grid-template-columns: 1fr;
    padding-top: calc(var(--header-height) + 0.55rem);
  }

  section[id] {
    scroll-margin-top: calc(var(--header-height) + 0.95rem);
  }

  .chapter-nav {
    display: none;
  }

  .chapter-nav__list {
    display: none;
  }

  .main-content {
    max-width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 0.75rem 0 2.2rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 9.2vw, 3.6rem);
    line-height: 0.98;
    margin-bottom: 0.72rem;
  }

  .hero-subtitle {
    font-size: clamp(1.1rem, 4.4vw, 1.34rem);
    margin-bottom: 0.85rem;
  }

  .hero-manifesto {
    max-width: 100%;
  }

  .hero-image{
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    pointer-events: none;
    margin-top: clamp(1.2rem, 4vw, 2rem);
    margin-right: 0;
  }

  .hero-image img{
    width: min(92vw, 520px);
    margin-left: auto;
  }

  .hero + section {
    margin-top: 3.1rem;
  }

  .chapter + .chapter {
    margin-top: 2.45rem;
    padding-top: 0;
  }

  .chapter-header {
    margin-bottom: 1rem;
  }

  .chapter-body,
  .chapter-body > p {
    max-width: 100%;
  }

  .chapter-intro-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .chapter-intro-copy > p {
    max-width: 100%;
  }

  .chapter-intro-image {
    width: min(100%, 520px);
    justify-self: center;
  }

  .chapter-columns-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .chapter-columns-copy > p {
    max-width: 100%;
  }

  .chapter-columns-image {
    width: min(100%, 520px);
    justify-self: center;
  }

  #how-it-works .chapter-columns-image {
    width: min(82vw, 420px);
    justify-self: center;
  }

  #scanning-objects .chapter-columns-image {
    width: min(78vw, 360px);
    justify-self: center;
  }

  .chapter-body--split > :not(.chapter-intro-grid) {
    max-width: 100%;
  }

  .chapter-audience-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .site-footer {
    margin-top: 3.2rem;
    padding-bottom: 0;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
  }

  .site-footer__info {
    max-width: 100%;
    font-size: 0.95rem;
    padding-bottom: 0;
  }

  .site-footer__image {
    width: min(88vw, 320px);
    margin-right: 0;
    justify-self: end;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}
