:root {
  color-scheme: light;
  --paper: #f2f0e8;
  --paper-bright: #fffefa;
  --ink: #181916;
  --muted: #62665e;
  --line: #c9ccc2;
  --charcoal: #20211e;
  --coral: #ef6049;
  --cyan: #1397b0;
  --lime: #c4d83e;
  --code: #171816;
  --code-muted: #aaaea5;
  --max-width: 1180px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  letter-spacing: 0;
}

code,
pre {
  font-family: var(--mono);
}

code {
  font-size: 0.92em;
}

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--paper-bright);
  color: var(--ink);
  border: 1px solid var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 240, 232, 0.94);
}

.home .site-header {
  position: absolute;
  border-bottom-color: rgba(255, 255, 255, 0.2);
  background: rgba(19, 20, 18, 0.52);
  color: white;
}

.nav-shell {
  width: min(calc(100% - 40px), var(--max-width));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.home .brand {
  position: relative;
  isolation: isolate;
}

.home .brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 36px;
  height: 36px;
  pointer-events: none;
  background: url("eliscript-logo-light.png") center / contain no-repeat;
  filter: blur(6px) saturate(1.12);
  mix-blend-mode: screen;
  opacity: 0.34;
  transform: translate(-2px, 2px) scale(1.06);
}

.home .brand > * {
  position: relative;
  z-index: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--coral);
}

.hero {
  min-height: 650px;
  height: 82svh;
  max-height: 780px;
  display: flex;
  align-items: center;
  color: white;
  background-color: #1b1b19;
  background-image: url("eliscript-hero.jpg");
  background-position: center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 8, 0.22);
}

.hero-inner {
  position: relative;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 42px auto 0;
}

.hero-logo {
  width: 86px;
  height: 86px;
  display: block;
  margin-bottom: 22px;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: inherit;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 3px;
  background: var(--lime);
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: 112px;
  line-height: 0.88;
  font-weight: 790;
  letter-spacing: 0;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.34);
}

.hero-copy {
  max-width: 590px;
  margin: 30px 0 0;
  color: #f5f4ee;
  font-size: 20px;
  line-height: 1.48;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 31px;
}

.status-band {
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  color: white;
}

.status-grid {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.status-metric {
  min-width: 0;
  padding: 25px 22px 27px;
  border-right: 1px solid #3a3d38;
}

.status-metric:first-child {
  border-left: 1px solid #3a3d38;
}

.status-metric strong,
.status-metric span {
  display: block;
}

.status-metric strong {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 27px;
  line-height: 1;
}

.status-metric span {
  margin-top: 8px;
  color: #c6c9c1;
  font-size: 13px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: var(--coral);
  border-color: var(--coral);
  color: white;
}

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

.button-outline-light {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(20, 20, 18, 0.42);
  color: white;
}

.band {
  border-bottom: 1px solid var(--line);
}

.band-white {
  background: var(--paper-bright);
}

.band-dark {
  background: var(--charcoal);
  color: white;
}

.band-cyan {
  background: #dceff2;
}

.section-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 84px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 770;
  letter-spacing: 0;
}

.section-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.band-dark .section-heading p {
  color: #c6c9c1;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pipeline-step {
  min-height: 190px;
  padding: 24px 24px 28px;
  border-right: 1px solid var(--line);
}

.pipeline-step:last-child {
  border-right: 0;
}

.step-number {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

.pipeline-step h3 {
  margin: 42px 0 7px;
  font-size: 20px;
  line-height: 1.15;
}

.pipeline-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.code-lab {
  border: 1px solid #3a3d38;
  border-radius: 6px;
  overflow: hidden;
  background: var(--code);
  box-shadow: 16px 16px 0 var(--cyan);
}

.code-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 12px 8px 18px;
  border-bottom: 1px solid #3a3d38;
}

.code-toolbar-label {
  color: var(--code-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.segments {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid #474a45;
  border-radius: 5px;
}

.segment {
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #c9cdc4;
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}

.segment:hover,
.segment:focus-visible,
.segment[aria-selected="true"] {
  background: var(--coral);
  color: white;
}

.code-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.code-pane {
  min-width: 0;
}

.code-pane + .code-pane {
  border-left: 1px solid #3a3d38;
}

.code-label {
  display: block;
  padding: 11px 18px;
  border-bottom: 1px solid #30332e;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.code-pane pre {
  min-height: 330px;
  margin: 0;
  padding: 22px 20px 28px;
  overflow: auto;
  color: #f1f1eb;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 2;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.feature {
  min-height: 200px;
  padding: 30px 28px 34px 0;
  border-bottom: 1px solid var(--line);
}

.feature:not(:nth-child(3n + 1)) {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.feature-kicker {
  color: var(--coral);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.feature h3 {
  margin: 28px 0 10px;
  font-size: 21px;
  line-height: 1.2;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.roadmap-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: end;
}

.roadmap-strip h2 {
  max-width: 720px;
  margin: 0;
  font-size: 52px;
  line-height: 1.02;
}

.roadmap-strip p {
  margin: 0 0 22px;
  color: #343733;
  font-size: 17px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.text-link {
  font-size: 14px;
  font-weight: 720;
}

.site-footer {
  background: #151613;
  color: #dfe2d9;
}

.footer-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}

.footer-shell p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 20px;
}

/* Documentation pages */

/* An inner page opens with the same band as the home page: the same photograph,
   darkened once, with the heading in white. The band is what tells a reader the
   page finished loading, so it carries the same treatment everywhere. */
.doc-hero {
  border-bottom: 1px solid var(--line);
  color: white;
  background-color: #1b1b19;
  background-image: url("eliscript-hero.jpg");
  background-position: center;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.doc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 8, 0.32);
}

.doc-hero-inner {
  position: relative;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 78px 0 66px;
}

.doc-hero .eyebrow {
  color: rgba(255, 255, 255, 0.84);
}

.doc-hero .doc-lede {
  color: rgba(255, 255, 255, 0.88);
}

.doc-hero h1 {
  color: white;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.34);
  max-width: 850px;
  margin: 0;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 0;
}

.doc-lede {
  max-width: 730px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
}

/* A sticky header covers the first 69px of the viewport, so an anchor target
   has to stay clear of it when a reader follows a link to a section. */
.doc-section,
.doc-content > [id] {
  scroll-margin-top: 88px;
}

.doc-shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 760px);
  gap: 72px;
  align-items: start;
  padding: 60px 0 96px;
}

.doc-nav {
  position: sticky;
  top: 24px;
  min-width: 0;
  padding-top: 4px;
}

.doc-nav-title {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.doc-nav a {
  display: block;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.doc-nav a:hover,
.doc-nav a:focus-visible {
  color: var(--coral);
}

.doc-content section {
  scroll-margin-top: 24px;
  padding: 0 0 52px;
}

.doc-content {
  min-width: 0;
}

.doc-content section + section {
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.doc-content h2 {
  margin: 0 0 20px;
  font-size: 34px;
  line-height: 1.12;
}

.doc-content h3 {
  margin: 30px 0 10px;
  font-size: 20px;
}

.doc-content p,
.doc-content li {
  color: #3d403b;
}

.doc-content pre {
  margin: 22px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid #333630;
  border-radius: 5px;
  background: var(--code);
  color: #f0f1eb;
  font-size: 13px;
  line-height: 1.65;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--cyan);
  background: #e3eff0;
}

.callout-coral {
  border-left-color: var(--coral);
  background: #f7e4df;
}

.callout p {
  margin: 0;
  color: var(--ink);
}

.fact-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.fact-table th,
.fact-table td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.fact-table th {
  background: #e7e6df;
  font-size: 12px;
  text-transform: uppercase;
}

.language-tabs {
  margin: 28px 0;
}

.language-tabs .segments {
  width: fit-content;
  border-color: var(--line);
  background: #e6e5de;
}

.language-tabs .segment {
  color: var(--ink);
}

.language-tabs .segment[aria-selected="true"] {
  color: white;
}

.language-panel[hidden] {
  display: none;
}

.form-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.form-item {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper-bright);
}

.form-item code {
  color: var(--coral);
  font-weight: 700;
}

.form-item p {
  margin: 8px 0 0;
  font-size: 14px;
}

.milestones {
  border-top: 1px solid var(--line);
}

.milestone {
  display: grid;
  grid-template-columns: 90px 1fr 120px;
  gap: 28px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.milestone-id {
  color: var(--cyan);
  font-family: var(--mono);
  font-weight: 750;
}

.milestone h3 {
  margin: 0 0 6px;
}

.milestone p {
  margin: 0;
  font-size: 14px;
}

.status {
  display: inline-flex;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-done {
  border-color: #72851e;
  background: var(--lime);
  color: #242713;
}

.status-next {
  border-color: #137c90;
  background: #ccecef;
  color: #17434a;
}

.api-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 44px;
}

.api-search {
  width: min(100%, 520px);
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-bright);
  color: var(--ink);
  font: inherit;
}

.api-search:focus-visible {
  border-color: var(--cyan);
  outline: 3px solid rgba(19, 151, 176, 0.2);
  outline-offset: 1px;
}

.api-search-count {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.api-module {
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}

.api-module[hidden],
.doc-content section[hidden] {
  display: none;
}

.api-module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.api-module-header h3 {
  margin: 2px 0 0;
  font-size: 22px;
}

.api-module-path {
  margin: 0;
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 11px;
}

.api-module-meta {
  display: flex;
  gap: 18px;
  font-size: 13px;
}

.api-export-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.api-export-list li {
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--paper-bright);
}

.api-export-list code {
  overflow-wrap: anywhere;
  color: #3d403b;
  font-size: 12px;
}

.api-empty {
  margin: 0;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-inner > * {
  animation: hero-enter 560ms ease-out both;
}

.hero-inner > :nth-child(2) {
  animation-delay: 70ms;
}

.hero-inner > :nth-child(3) {
  animation-delay: 130ms;
}

.hero-inner > :nth-child(4) {
  animation-delay: 190ms;
}

@media (max-width: 900px) {
  .hero h1 {
    font-size: 78px;
  }

  .section-heading,
  .roadmap-strip {
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

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

  .status-metric:nth-child(2) {
    border-right: 1px solid #3a3d38;
  }

  .status-metric:nth-child(-n + 2) {
    border-bottom: 1px solid #3a3d38;
  }

  .pipeline-step:nth-child(2) {
    border-right: 0;
  }

  .pipeline-step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .feature:not(:nth-child(3n + 1)) {
    padding-left: 0;
    border-left: 0;
  }

  .feature:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid var(--line);
  }

  /* A sticky header covers the first 69px of the viewport, so an anchor target
   has to stay clear of it when a reader follows a link to a section. */
.doc-section,
.doc-content > [id] {
  scroll-margin-top: 88px;
}

.doc-shell {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 42px;
  }
}

@media (max-width: 680px) {
  .nav-shell {
    width: min(calc(100% - 28px), var(--max-width));
    min-height: 60px;
    gap: 12px;
  }

  .nav-links {
    gap: 12px;
    font-size: 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .home .brand::before {
    width: 32px;
    height: 32px;
  }

  .hero-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
  }

  .nav-links .nav-optional {
    display: none;
  }

  .hero {
    min-height: 560px;
    height: 78svh;
    background-position: 58% center;
  }

  .hero::before {
    background: rgba(8, 9, 8, 0.4);
  }

  .hero-inner,
  .section-shell,
  .footer-shell,
  .doc-hero-inner,
  /* A sticky header covers the first 69px of the viewport, so an anchor target
   has to stay clear of it when a reader follows a link to a section. */
.doc-section,
.doc-content > [id] {
  scroll-margin-top: 88px;
}

.doc-shell {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .status-grid {
    width: min(calc(100% - 28px), var(--max-width));
    grid-template-columns: 1fr;
  }

  .status-metric,
  .status-metric:first-child,
  .status-metric:nth-child(2) {
    padding: 18px 0 19px;
    border-right: 0;
    border-bottom: 1px solid #3a3d38;
    border-left: 0;
  }

  .status-metric:last-child {
    border-bottom: 0;
  }

  .hero h1 {
    font-size: 56px;
  }

  .hero-copy {
    max-width: 440px;
    font-size: 17px;
  }

  .section-shell {
    padding: 64px 0;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .section-heading h2,
  .roadmap-strip h2 {
    font-size: 36px;
  }

  .pipeline,
  .feature-grid,
  .code-grid,
  .form-list {
    grid-template-columns: 1fr;
  }

  .pipeline-step {
    min-height: 150px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pipeline-step:last-child {
    border-bottom: 0;
  }

  .pipeline-step h3 {
    margin-top: 24px;
  }

  .code-lab {
    box-shadow: 8px 8px 0 var(--cyan);
  }

  .code-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .segments {
    width: 100%;
    overflow-x: auto;
  }

  .segment {
    flex: 1 0 auto;
  }

  .code-pane + .code-pane {
    border-left: 0;
    border-top: 1px solid #3a3d38;
  }

  .code-pane pre {
    min-height: 260px;
    font-size: 12px;
  }

  .feature,
  .feature:nth-child(even),
  .feature:not(:nth-child(3n + 1)) {
    min-height: 0;
    padding: 28px 0;
    border-left: 0;
  }

  .footer-shell {
    flex-direction: column;
  }

  .doc-hero-inner {
    padding: 58px 0 48px;
  }

  .doc-hero h1 {
    font-size: 44px;
  }

  .doc-lede {
    font-size: 18px;
  }

  /* A sticky header covers the first 69px of the viewport, so an anchor target
   has to stay clear of it when a reader follows a link to a section. */
.doc-section,
.doc-content > [id] {
  scroll-margin-top: 88px;
}

.doc-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-top: 34px;
  }

  .doc-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .doc-nav-title {
    grid-column: 1 / -1;
  }

  .doc-nav a:nth-child(even) {
    padding-left: 12px;
    border-left: 1px solid var(--line);
  }

  .milestone {
    grid-template-columns: 54px 1fr;
    gap: 16px;
  }

  .milestone .status {
    grid-column: 2;
    width: fit-content;
  }

  .api-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .api-module-header {
    gap: 12px;
  }
}

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

  .hero-inner > * {
    animation: none;
  }
}
