:root {
  --ink: #0a0c0f;
  --ink-2: #12161b;
  --paper: #f2f0e9;
  --paper-2: #e6e2d8;
  --white: #ffffff;
  --acid: #c8ff36;
  --cyan: #2bc7d8;
  --orange: #ff6b35;
  --pink: #ff4f8b;
  --blue: #2864ff;
  --muted: #9ca3ad;
  --line-dark: rgba(255, 255, 255, 0.16);
  --line-light: rgba(10, 12, 15, 0.18);
  --radius: 6px;
  --header-h: 66px;
  --font-sans: "Segoe UI", Tahoma, Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::selection {
  color: var(--ink);
  background: var(--acid);
}

body.is-locked {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

button {
  cursor: pointer;
}

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

.shell {
  width: min(1240px, calc(100% - 56px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: -80px;
  z-index: 500;
  padding: 10px 16px;
  color: var(--ink);
  background: var(--acid);
  border: 2px solid var(--ink);
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  inset-inline: 0;
  height: var(--header-h);
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  padding-inline: 28px;
  color: var(--white);
  background: rgba(10, 12, 15, 0.86);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  font-weight: 900;
}

.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--acid);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  transform: rotate(-3deg);
}

.brand-name {
  font-size: 18px;
  letter-spacing: 0;
}

.brand-dot {
  color: var(--acid);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.desktop-nav a {
  padding: 8px 12px;
  color: #c7ccd4;
  border-bottom: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--white);
  border-color: var(--acid);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.command-key,
.icon-button,
.language-switch {
  height: 34px;
  color: #d7dae0;
  background: transparent;
  border: 1px solid var(--line-dark);
}

.command-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline: 9px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

kbd {
  font-family: var(--font-mono);
  font-size: 11px;
}

.icon-button {
  width: 34px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  font-size: 18px;
}

.language-switch {
  display: flex;
  padding: 2px;
  border-radius: 3px;
}

.language-switch button {
  min-width: 31px;
  padding: 0;
  color: #a8aeb7;
  background: transparent;
  border: 0;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.language-switch button.is-active {
  color: var(--ink);
  background: var(--acid);
}

.menu-button,
.mobile-nav {
  display: none;
}

.hero {
  position: relative;
  height: calc(100svh - 118px);
  min-height: 480px;
  max-height: 760px;
  margin-top: var(--header-h);
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}

.hero-canvas,
.hero-grid,
.hero-noise {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-canvas {
  z-index: 1;
  opacity: 0.78;
}

.hero-grid {
  z-index: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 74px 74px;
}

.hero-noise {
  z-index: 2;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

.hero-portrait-wrap {
  position: absolute;
  z-index: 2;
  inset-block: 0;
  inset-inline-end: max(4vw, calc((100vw - 1240px) / 2));
  width: min(45vw, 610px);
  pointer-events: none;
}

.hero-portrait-wrap::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block: 10%;
  inset-inline: 12% 2%;
  background: var(--acid);
  clip-path: polygon(0 9%, 90% 0, 100% 88%, 10% 100%);
  opacity: 0.92;
}

.hero-portrait {
  position: absolute;
  inset-inline-end: 0;
  bottom: -15%;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: saturate(0.88) contrast(1.05);
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
  mix-blend-mode: normal;
}

.portrait-index {
  position: absolute;
  z-index: 3;
  top: 92px;
  inset-inline-end: -18px;
  writing-mode: vertical-rl;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.hero-content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: 40px;
  padding-block: 56px 78px;
}

.hero-copy {
  max-width: 700px;
}

.signal,
.section-kicker,
.console-label,
.readout-label,
.readout-meta,
.project-meta,
.lab-session,
.demo-toolbar,
.demo-index,
.project-card-top,
.tech-list,
.text-link,
.method-step code,
.ledger-table span,
.ledger-table em,
.site-footer,
.hero-tags,
.hero-coordinates {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.signal {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--acid);
  font-size: 11px;
  font-weight: 800;
}

.signal > span:first-child {
  width: 36px;
  height: 2px;
  background: var(--acid);
}

.hero h1 {
  margin: 0;
  font-size: 76px;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 > span {
  display: block;
  width: max-content;
  max-width: 100%;
  padding: 5px 10px 9px;
  color: var(--ink);
  background: var(--white);
}

.hero h1 small {
  display: block;
  max-width: 640px;
  margin-top: 16px;
  color: var(--white);
  font-size: 30px;
  line-height: 1.28;
  font-weight: 700;
}

.hero-lead {
  max-width: 650px;
  margin: 22px 0 0;
  color: #c4c9d0;
  font-size: 16px;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 850;
}

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

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

.button-ghost {
  color: var(--white);
  background: rgba(10, 12, 15, 0.42);
  border-color: var(--line-dark);
}

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

.hero-side {
  align-self: end;
  justify-self: end;
  width: min(330px, 100%);
  margin-bottom: 12px;
}

.live-readout {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  color: var(--white);
  background: rgba(10, 12, 15, 0.78);
  border-inline-start: 3px solid var(--cyan);
}

.readout-label {
  color: var(--cyan);
  font-size: 10px;
}

.live-readout strong {
  font-size: 15px;
}

.readout-meta {
  color: #858d98;
  font-size: 9px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hero-tags span {
  padding: 6px 8px;
  color: #c6cbd2;
  background: rgba(10, 12, 15, 0.78);
  border: 1px solid var(--line-dark);
  font-size: 9px;
}

.hero-footer {
  position: absolute;
  z-index: 5;
  inset-inline: 28px;
  bottom: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a5abb4;
  font-size: 11px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot,
.live-pill i {
  width: 8px;
  height: 8px;
  display: inline-block;
  background: var(--acid);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(200, 255, 54, 0.12);
  animation: pulse 2s infinite;
}

.signal-strip {
  height: 52px;
  overflow: hidden;
  color: var(--ink);
  background: var(--acid);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.signal-track {
  min-width: max-content;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  animation: ticker 24s linear infinite;
}

.signal-track i {
  width: 7px;
  height: 7px;
  background: var(--ink);
  transform: rotate(45deg);
}

.section-pad {
  padding-block: 112px;
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: 80px;
  margin-bottom: 46px;
}

.section-kicker {
  margin: 0 0 14px;
  color: #5a6169;
  font-size: 11px;
  font-weight: 800;
}

.section-header h2,
.about-statement h2 {
  max-width: 780px;
  margin: 0;
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-header > p {
  margin: 0;
  color: #5b626a;
  font-size: 15px;
}

.project-feature {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 60px;
  padding-block: 54px;
  border-block: 1px solid var(--line-light);
}

.project-meta,
.project-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #616872;
  font-size: 10px;
}

.project-number {
  font-size: 14px;
  font-weight: 900;
}

.live-pill,
.work-in-progress,
.experiment-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border: 1px solid var(--line-light);
}

.project-copy h3 {
  margin: 42px 0 0;
  font-size: 68px;
  line-height: 1;
  letter-spacing: 0;
}

.project-subtitle {
  margin: 14px 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  line-height: 1.35;
}

.project-copy > p:not(.project-subtitle) {
  color: #565e66;
  font-size: 15px;
}

.project-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 32px;
}

.project-stats > div {
  min-height: 92px;
  padding: 13px;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}

.project-stats strong,
.project-stats span {
  display: block;
}

.project-stats strong {
  font-family: var(--font-mono);
  font-size: 24px;
}

.project-stats span {
  margin-top: 6px;
  color: #626a72;
  font-size: 11px;
}

.project-links {
  display: flex;
  gap: 20px;
  margin-top: 26px;
  font-size: 13px;
  font-weight: 850;
}

.project-links a,
.text-link,
.about-links a {
  border-bottom: 2px solid var(--ink);
}

.project-links a:hover,
.text-link:hover,
.about-links a:hover {
  color: #a34a19;
  border-color: var(--orange);
}

.dictionary-demo {
  position: relative;
  min-height: 500px;
  padding: 0 24px 24px;
  color: var(--white);
  background: var(--ink-2);
  border: 1px solid #2e343b;
  border-radius: var(--radius);
  box-shadow: 16px 16px 0 var(--cyan);
  overflow: hidden;
}

.dictionary-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
}

.demo-toolbar {
  position: relative;
  height: 52px;
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
  color: #939aa4;
  border-bottom: 1px solid var(--line-dark);
  font-size: 9px;
}

.demo-dots {
  display: flex;
  gap: 5px;
}

.demo-dots i {
  width: 8px;
  height: 8px;
  background: #6c737d;
  border-radius: 50%;
}

.demo-dots i:first-child {
  background: var(--orange);
}

.demo-dots i:nth-child(2) {
  background: var(--acid);
}

.demo-status {
  color: var(--acid);
}

.dictionary-search {
  position: relative;
  height: 58px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  padding-inline: 16px;
  background: #1c2229;
  border: 1px solid #3f4751;
  border-radius: 4px;
}

.dictionary-search:focus-within {
  border-color: var(--acid);
  box-shadow: 0 0 0 3px rgba(200, 255, 54, 0.12);
}

.dictionary-search input {
  min-width: 0;
  color: var(--white);
  background: transparent;
  border: 0;
  outline: 0;
}

.dictionary-search kbd {
  color: #7f8791;
}

.dictionary-result {
  position: relative;
  margin-top: 18px;
  padding: 22px;
  background: #11161b;
  border-inline-start: 3px solid var(--pink);
  border-radius: 3px;
}

.term-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 11px;
}

.term-row em {
  color: #707984;
  font-style: normal;
  font-size: 9px;
}

.dictionary-result h4 {
  margin: 14px 0 8px;
  font-size: 22px;
}

.dictionary-result p {
  margin: 0;
  color: #adb4bd;
  font-size: 13px;
}

.related-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.related-row span {
  padding: 4px 7px;
  color: var(--cyan);
  border: 1px solid rgba(43, 199, 216, 0.35);
  font-family: var(--font-mono);
  font-size: 8px;
}

.demo-index {
  position: absolute;
  inset-inline: 24px;
  bottom: 17px;
  display: flex;
  justify-content: space-between;
  color: #69727c;
  font-size: 9px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 64px;
}

.project-card {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
}

.work-in-progress {
  color: #984311;
  background: #fff0e8;
}

.experiment-pill {
  color: #006d77;
  background: #e4fbfd;
}

.card-visual {
  height: 222px;
  margin-block: 28px 24px;
  background: #0f1318;
  border-radius: 3px;
  overflow: hidden;
}

.trace-visual {
  display: grid;
  align-content: center;
  gap: 34px;
  padding: 30px;
  color: var(--white);
}

.trace-visual > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.trace-visual i {
  height: 1px;
  background: var(--cyan);
}

.trace-visual > div:last-child {
  display: flex;
  gap: 8px;
  align-items: end;
  height: 78px;
}

.trace-visual > div:last-child span {
  flex: 1;
  display: grid;
  place-items: end center;
  padding-bottom: 6px;
  color: var(--ink);
  background: var(--acid);
  font-family: var(--font-mono);
  font-size: 9px;
}

.trace-visual > div:last-child span:nth-child(1) { height: 35%; }
.trace-visual > div:last-child span:nth-child(2) { height: 88%; background: var(--pink); }
.trace-visual > div:last-child span:nth-child(3) { height: 76%; background: var(--cyan); }
.trace-visual > div:last-child span:nth-child(4) { height: 48%; background: var(--orange); }

.matrix-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 30px;
}

.matrix-cell {
  display: grid;
  place-items: center;
  color: #737c86;
  background: #20262d;
  font-family: var(--font-mono);
  font-size: 9px;
}

.matrix-cell.mid { background: #145c65; color: var(--white); }
.matrix-cell.hot { background: var(--acid); color: var(--ink); }

.project-card h3 {
  margin: 0;
  font-size: 32px;
}

.project-card p {
  color: #60676e;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: auto 0 0;
  list-style: none;
}

.tech-list li {
  padding: 4px 7px;
  color: #5c636b;
  border: 1px solid var(--line-light);
  font-size: 9px;
}

.text-link {
  width: max-content;
  margin-top: auto;
  font-size: 11px;
  font-weight: 850;
}

.lab-section {
  color: var(--white);
  background: var(--ink);
}

.section-header-light .section-kicker,
.lab-section .section-kicker {
  color: var(--cyan);
}

.section-header-light > p {
  color: #969ea8;
}

.lab-console {
  border: 1px solid #343b44;
  border-radius: var(--radius);
  overflow: hidden;
}

.lab-tabs {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-inline: 8px;
  background: #14191f;
  border-bottom: 1px solid #343b44;
}

.lab-tabs button {
  align-self: stretch;
  padding-inline: 18px;
  color: #8f97a1;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.lab-tabs button[aria-selected="true"] {
  color: var(--acid);
  border-color: var(--acid);
}

.lab-session {
  margin-inline-start: auto;
  padding-inline: 14px;
  color: #68717b;
  font-size: 9px;
}

.lab-panel {
  display: none;
  min-height: 510px;
  grid-template-columns: minmax(300px, 0.7fr) minmax(420px, 1.3fr);
}

.lab-panel.is-active {
  display: grid;
}

.controls-panel,
.trace-query {
  padding: 36px;
  background: #10151a;
  border-inline-end: 1px solid #343b44;
}

.console-label {
  margin: 0 0 34px;
  color: #717a85;
  font-size: 10px;
}

.range-control {
  display: block;
  margin-bottom: 33px;
}

.range-control > span,
.range-control small,
.switch-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-control b,
.switch-control b {
  font-size: 13px;
}

.range-control output {
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 12px;
}

.range-control input {
  width: 100%;
  height: 4px;
  margin: 17px 0 6px;
  accent-color: var(--acid);
}

.range-control small,
.switch-control small {
  color: #626b76;
  font-family: var(--font-mono);
  font-size: 8px;
}

.switch-control {
  margin-bottom: 32px;
}

.switch-control > span {
  display: grid;
  gap: 3px;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control i {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  background: #333a42;
  border: 1px solid #4e5660;
  border-radius: 99px;
}

.switch-control i::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 16px;
  height: 16px;
  background: #9099a3;
  border-radius: 50%;
  transition: transform 180ms ease, background 180ms ease;
}

.switch-control input:checked + i {
  background: rgba(200, 255, 54, 0.15);
  border-color: var(--acid);
}

.switch-control input:checked + i::after {
  background: var(--acid);
  transform: translateX(20px);
}

[dir="rtl"] .switch-control input:checked + i::after {
  transform: translateX(-20px);
}

.button-wide {
  width: 100%;
  border: 0;
}

.metrics-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(270px, 1.2fr);
  grid-template-rows: auto 1fr;
  gap: 1px;
  background: #343b44;
}

.metric-primary,
.metric-grid,
.retrieval-bars {
  background: #0d1116;
}

.metric-primary {
  padding: 36px;
}

.metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8a939e;
  font-size: 11px;
}

.metric-heading em {
  padding: 4px 7px;
  color: var(--ink);
  background: var(--acid);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.metric-primary > strong {
  display: block;
  margin-top: 20px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 72px;
  line-height: 1;
}

.metric-primary small {
  color: #68717b;
  font-size: 14px;
}

.score-bar {
  height: 7px;
  margin-top: 28px;
  background: #272e35;
}

.score-bar i {
  width: 86%;
  height: 100%;
  display: block;
  background: var(--acid);
  transition: width 500ms ease, background 500ms ease;
}

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

.metric-grid > div {
  min-height: 126px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 24px;
  border-inline-start: 1px solid #343b44;
  border-bottom: 1px solid #343b44;
}

.metric-grid span,
.retrieval-bars span,
.retrieval-bars em {
  color: #69727d;
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
}

.metric-grid strong {
  font-family: var(--font-mono);
  font-size: 22px;
}

.retrieval-bars {
  grid-column: 1 / -1;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 34px 36px;
}

.retrieval-bars > div {
  display: grid;
  grid-template-columns: 58px 1fr 38px;
  align-items: center;
  gap: 12px;
}

.retrieval-bars i {
  height: 6px;
  background: #272e35;
}

.retrieval-bars b {
  width: var(--value);
  height: 100%;
  display: block;
  background: var(--cyan);
  transition: width 500ms ease;
}

.trace-query label {
  display: grid;
  gap: 10px;
  color: #8f98a2;
  font-size: 12px;
}

.trace-query textarea {
  width: 100%;
  min-height: 144px;
  resize: vertical;
  padding: 14px;
  color: var(--white);
  background: #1b2128;
  border: 1px solid #3b434d;
  border-radius: 3px;
  outline: 0;
}

.trace-query textarea:focus {
  border-color: var(--acid);
}

.trace-query .button {
  margin-top: 20px;
}

.trace-timeline {
  display: grid;
  align-content: center;
  gap: 1px;
  padding: 40px;
  background: #343b44;
}

.trace-step {
  min-height: 92px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  color: #78818b;
  background: #0d1116;
  transition: color 200ms ease, background 200ms ease;
}

.trace-step > span,
.trace-step em,
.trace-step b {
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
}

.trace-step p {
  margin: 5px 0 0;
  font-size: 12px;
}

.trace-step.is-running {
  color: var(--white);
  background: #172027;
  box-shadow: inset 3px 0 var(--cyan);
}

.trace-step.is-done {
  color: #c7ccd3;
}

.trace-step.is-done em,
.trace-step.is-ready em {
  color: var(--acid);
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line-light);
}

.method-step {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-inline-end: 1px solid var(--line-light);
}

.method-step:first-child {
  border-inline-start: 1px solid var(--line-light);
}

.method-step > span {
  color: #8b4d29;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.method-step h3 {
  margin: 58px 0 12px;
  font-size: 22px;
}

.method-step p {
  margin: 0;
  color: #626970;
  font-size: 13px;
}

.method-step code {
  margin-top: auto;
  color: #727981;
  font-size: 9px;
}

.open-source-ledger {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  gap: 50px;
  margin-top: 92px;
  padding: 46px;
  color: var(--white);
  background: var(--blue);
  border-radius: var(--radius);
}

.ledger-intro .section-kicker {
  color: #b9ceff;
}

.ledger-intro h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.ledger-intro p:last-child {
  color: #d6e0ff;
  font-size: 13px;
}

.ledger-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.ledger-table > div {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
}

.ledger-table > div:nth-child(2n) {
  border-inline-end: 0;
}

.ledger-table > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.ledger-table span,
.ledger-table em {
  color: #b9ceff;
  font-size: 8px;
  font-style: normal;
}

.ledger-table strong {
  font-family: var(--font-mono);
  font-size: 17px;
}

.copy-repo {
  grid-column: 1 / -1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 16px;
  color: var(--blue);
  background: var(--white);
  border: 0;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 850;
}

.about-section {
  color: var(--white);
  background: var(--orange);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 100px;
  padding-block: 112px 92px;
}

.about-section .section-kicker {
  color: #4b1d09;
}

.about-statement h2 {
  font-size: 52px;
}

.about-copy {
  align-self: end;
}

.about-copy p {
  margin: 0;
  color: #2b160e;
  font-size: 18px;
  font-weight: 650;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
}

.closing-line {
  min-height: 210px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 25px;
  border-top: 1px solid rgba(10, 12, 15, 0.35);
}

.closing-line > span {
  color: #512109;
  font-family: var(--font-mono);
  font-size: 10px;
}

.closing-line strong {
  color: var(--white);
  font-size: 86px;
  line-height: 0.78;
  letter-spacing: 0;
}

.closing-line strong span {
  color: var(--ink);
}

.site-footer {
  color: #8d949d;
  background: var(--ink);
  border-top: 1px solid #292f36;
  font-size: 9px;
}

.footer-grid {
  min-height: 74px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.footer-grid p {
  margin: 0;
}

.footer-grid p:nth-child(2) {
  text-align: center;
}

.footer-grid a {
  justify-self: end;
  color: var(--white);
}

.command-palette {
  width: min(620px, calc(100% - 28px));
  padding: 0;
  color: var(--white);
  background: #11161b;
  border: 1px solid #3d454f;
  border-radius: var(--radius);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.55);
}

.command-palette::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(7px);
}

.command-head {
  height: 62px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-inline: 18px;
  border-bottom: 1px solid #343b44;
}

.command-head input {
  min-width: 0;
  color: var(--white);
  background: transparent;
  border: 0;
  outline: 0;
}

.command-head kbd {
  padding: 4px 6px;
  color: #7d8691;
  border: 1px solid #3d454f;
  border-radius: 2px;
}

.command-list {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.command-list button {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 12px;
  color: #c5cbd2;
  background: transparent;
  border: 0;
  border-radius: 3px;
  text-align: start;
}

.command-list button:hover,
.command-list button:focus-visible {
  color: var(--ink);
  background: var(--acid);
  outline: 0;
}

.command-list em {
  font-family: var(--font-mono);
  font-size: 9px;
  font-style: normal;
}

.toast {
  position: fixed;
  z-index: 300;
  inset-inline-start: 50%;
  bottom: 20px;
  max-width: calc(100% - 32px);
  padding: 10px 14px;
  color: var(--ink);
  background: var(--acid);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

[dir="rtl"] .toast {
  transform: translate(50%, 18px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

[dir="rtl"] .toast.is-visible {
  transform: translate(50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal[data-delay="1"] { transition-delay: 100ms; }
.reveal[data-delay="2"] { transition-delay: 180ms; }
.reveal[data-delay="3"] { transition-delay: 260ms; }

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-theme="light"] .site-header {
  color: var(--ink);
  background: rgba(242, 240, 233, 0.9);
  border-color: var(--line-light);
}

[data-theme="light"] .brand-dot {
  color: #845000;
}

[data-theme="light"] .desktop-nav a,
[data-theme="light"] .command-key,
[data-theme="light"] .icon-button {
  color: #41474e;
  border-color: var(--line-light);
}

[data-theme="light"] .language-switch {
  border-color: var(--line-light);
}

[data-theme="light"] .desktop-nav a:hover,
[data-theme="light"] .desktop-nav a:focus-visible {
  color: var(--ink);
}

[data-theme="light"] body,
[data-theme="light"] .work-section,
[data-theme="light"] .method-section {
  background: var(--white);
}

[data-theme="light"] .project-card,
[data-theme="light"] .project-stats > div {
  background: #f7f6f1;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

[dir="rtl"] .signal-track {
  animation-direction: reverse;
}

@keyframes pulse {
  50% { opacity: 0.45; }
}

@media (max-width: 1000px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: grid;
  }

  .mobile-nav {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    inset-inline: 18px;
    display: none;
    padding: 8px;
    color: var(--white);
    background: #12171c;
    border: 1px solid #333a42;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .mobile-nav a {
    padding: 12px;
    border-bottom: 1px solid #2c333b;
  }

  .mobile-nav a:last-child {
    border: 0;
  }

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

  .hero h1 small {
    font-size: 24px;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.6fr);
  }

  .hero-portrait-wrap {
    width: 48vw;
    opacity: 0.78;
  }

  .section-header h2,
  .about-statement h2 {
    font-size: 40px;
  }

  .project-feature {
    grid-template-columns: 1fr;
  }

  .dictionary-demo {
    min-height: 470px;
  }

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

  .method-step:nth-child(3) {
    border-inline-start: 1px solid var(--line-light);
  }

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

  .closing-line strong {
    font-size: 66px;
  }
}

@media (max-height: 650px) and (min-width: 761px) {
  .hero {
    min-height: 400px;
  }

  .hero-content {
    padding-block: 28px 50px;
  }

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

  .hero h1 small {
    margin-top: 10px;
    font-size: 23px;
  }

  .hero-lead {
    margin-top: 12px;
    font-size: 14px;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .hero-side {
    margin-bottom: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 62px;
  }

  .shell {
    width: min(100% - 30px, 620px);
  }

  .site-header {
    padding-inline: 15px;
  }

  .command-key {
    display: none;
  }

  .brand-name {
    font-size: 15px;
  }

  .hero {
    height: calc(100svh - 110px);
    min-height: 590px;
    max-height: 740px;
  }

  .hero-portrait-wrap {
    inset-inline-end: -8%;
    width: 72vw;
    opacity: 0.52;
  }

  .hero-portrait-wrap::before {
    inset-inline-start: 16%;
    opacity: 0.6;
  }

  .portrait-index {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    padding-block: 64px 76px;
  }

  .hero-copy {
    max-width: 520px;
  }

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

  .hero h1 small {
    max-width: 420px;
    font-size: 21px;
  }

  .hero-lead {
    max-width: 480px;
    font-size: 14px;
  }

  .hero-side {
    display: none;
  }

  .hero-footer {
    inset-inline: 15px;
  }

  .hero-coordinates {
    display: none;
  }

  .section-pad {
    padding-block: 78px;
  }

  .section-header,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

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

  .section-header h2,
  .about-statement h2 {
    font-size: 35px;
  }

  .project-copy h3 {
    font-size: 50px;
  }

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

  .project-card {
    min-height: 490px;
  }

  .lab-panel.is-active {
    grid-template-columns: 1fr;
  }

  .controls-panel,
  .trace-query {
    border-inline-end: 0;
    border-bottom: 1px solid #343b44;
  }

  .metrics-panel {
    grid-template-columns: 1fr;
  }

  .metric-primary,
  .metric-grid,
  .retrieval-bars {
    grid-column: 1;
  }

  .lab-session {
    display: none;
  }

  .open-source-ledger {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px;
  }

  .copy-repo {
    grid-column: 1;
  }

  .about-grid {
    padding-block: 82px 64px;
  }

  .closing-line {
    min-height: 150px;
  }

  .closing-line strong {
    font-size: 48px;
  }
}

@media (max-width: 520px) {
  .language-switch {
    display: none;
  }

  .hero {
    min-height: 575px;
  }

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

  .hero h1 small {
    font-size: 19px;
  }

  .signal {
    font-size: 9px;
  }

  .hero-actions {
    gap: 8px;
  }

  .button {
    flex: 1 1 160px;
  }

  .section-header h2,
  .about-statement h2 {
    font-size: 31px;
  }

  .project-feature {
    gap: 36px;
  }

  .project-copy h3 {
    font-size: 44px;
  }

  .project-subtitle {
    font-size: 19px;
  }

  .project-stats {
    grid-template-columns: 1fr;
  }

  .project-stats > div {
    min-height: 76px;
  }

  .dictionary-demo {
    min-height: 500px;
    padding-inline: 14px;
    box-shadow: 8px 8px 0 var(--cyan);
  }

  .demo-toolbar {
    grid-template-columns: 56px 1fr;
  }

  .demo-status {
    display: none;
  }

  .dictionary-search {
    margin-top: 34px;
  }

  .dictionary-search kbd {
    display: none;
  }

  .project-card {
    min-height: 450px;
    padding: 18px;
  }

  .card-visual {
    height: 190px;
  }

  .controls-panel,
  .trace-query,
  .metric-primary,
  .retrieval-bars,
  .trace-timeline {
    padding: 24px 18px;
  }

  .metric-primary > strong {
    font-size: 60px;
  }

  .metric-grid > div {
    min-height: 102px;
    padding: 17px;
  }

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

  .method-step,
  .method-step:nth-child(3) {
    min-height: 250px;
    border-inline: 1px solid var(--line-light);
    border-bottom: 1px solid var(--line-light);
  }

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

  .method-step h3 {
    margin-top: 34px;
  }

  .ledger-table {
    grid-template-columns: 1fr;
  }

  .ledger-table > div,
  .ledger-table > div:nth-child(2n),
  .ledger-table > div:nth-last-child(-n + 2) {
    border-inline-end: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  }

  .ledger-table > div:last-child {
    border-bottom: 0;
  }

  .closing-line {
    align-items: center;
  }

  .closing-line > span {
    display: none;
  }

  .closing-line strong {
    max-width: 100%;
    font-size: 39px;
  }

  .footer-grid {
    grid-template-columns: 1fr auto;
  }

  .footer-grid p:nth-child(2) {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
