:root {
  color-scheme: light dark;

  /* Selected identity: brand/tokens/cobalt-signal.css */
  --indexhand-index: #2f45e6;
  --indexhand-index: light-dark(#2f45e6, #8b9aff);
  --indexhand-signal: #c93620;
  --indexhand-signal: light-dark(#c93620, #ff866a);
  --indexhand-signal-soft: #ffe0d6;
  --indexhand-signal-soft: light-dark(#ffe0d6, #49251f);
  --indexhand-canvas: #f3f6fa;
  --indexhand-canvas: light-dark(#f3f6fa, #0d1220);
  --indexhand-surface: #ffffff;
  --indexhand-surface: light-dark(#ffffff, #151c2f);
  --indexhand-ink: #111827;
  --indexhand-ink: light-dark(#111827, #f3f6fa);
  --indexhand-muted: #536075;
  --indexhand-muted: light-dark(#536075, #a9b4c8);
  --indexhand-rule: #c8d3e3;
  --indexhand-rule: light-dark(#c8d3e3, #33405a);

  /* Semantic roles consumed by the site */
  --background: var(--indexhand-canvas);
  --surface: var(--indexhand-surface);
  --foreground: var(--indexhand-ink);
  --secondary: var(--indexhand-muted);
  --border: var(--indexhand-rule);
  --interactive: var(--indexhand-index);
  --location: var(--indexhand-signal);
  --selection: var(--indexhand-signal-soft);
  --focus: var(--indexhand-index);
  --inverse-background: #0d1220;
  --inverse-surface: #151c2f;
  --inverse-foreground: #f3f6fa;
  --inverse-muted: #a9b4c8;
  --inverse-rule: #33405a;
  --inverse-index: #8b9aff;
  --inverse-signal: #ff866a;

  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--foreground);
  background: var(--background);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 0.95rem;
  color: var(--inverse-foreground);
  background: var(--inverse-background);
  font-size: 0.75rem;
  font-weight: 750;
  transform: translateY(-200%);
}

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

.page-shell {
  position: relative;
  width: min(100% - 3rem, 1440px);
  min-height: 100svh;
  margin: 0 auto;
  border-inline: 1px solid var(--border);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--border) 24%, transparent) 1px, transparent 1px) 0 0 / 32px 100%,
    var(--background);
}

.page-shell::before {
  position: absolute;
  z-index: 5;
  top: 0;
  right: -1px;
  left: -1px;
  height: 4px;
  background: var(--interactive);
  content: "";
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5.75rem;
  padding: 1.25rem clamp(1.5rem, 4vw, 4.5rem);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.wordmark {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--foreground);
  font-size: 1.15rem;
  font-weight: 760;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.wordmark-mark {
  position: relative;
  display: block;
  width: 1.7rem;
  height: 1.7rem;
  overflow: hidden;
  background: var(--interactive);
}

.wordmark-mark::before,
.wordmark-mark::after {
  position: absolute;
  left: 0.42rem;
  width: 0.85rem;
  height: 2px;
  background: var(--surface);
  content: "";
}

.wordmark-mark::before {
  top: 0.48rem;
}

.wordmark-mark::after {
  top: 1.02rem;
}

.wordmark-mark span::before,
.wordmark-mark span::after {
  position: absolute;
  z-index: 1;
  background: var(--location);
  content: "";
}

.wordmark-mark span::before {
  top: 0.3rem;
  right: 0.35rem;
  width: 2px;
  height: 1.1rem;
}

.wordmark-mark span::after {
  top: 0.8rem;
  right: 0.15rem;
  width: 0.72rem;
  height: 2px;
}

.header-status {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0;
  color: var(--secondary);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid var(--interactive);
  border-radius: 50%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(21rem, 0.75fr);
  min-height: calc(100svh - 5.75rem);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 6vw, 7rem);
}

.eyebrow,
.section-index {
  margin: 0;
  color: var(--interactive);
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: clamp(2.75rem, 6vw, 5rem);
}

.eyebrow span {
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.75rem, 7.4vw, 7.75rem);
  font-weight: 610;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

h1 strong {
  color: var(--interactive);
  font-weight: inherit;
}

.introduction {
  max-width: 47rem;
  margin: clamp(2.5rem, 5vw, 4.25rem) 0 0;
  color: var(--secondary);
  font-size: clamp(1.08rem, 1.65vw, 1.38rem);
  line-height: 1.55;
}

.hero-status {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  align-self: flex-start;
  margin: 2rem 0 0;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-status span {
  color: var(--location);
  font-size: 1rem;
}

.source-figure {
  position: relative;
  display: flex;
  min-height: 36rem;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  margin: 0;
  padding: clamp(2rem, 4vw, 4rem);
  border-left: 1px solid var(--border);
  background: var(--surface);
}

.source-figure::before,
.source-figure::after {
  position: absolute;
  content: "";
  background: var(--border);
}

.source-figure::before {
  top: 0;
  bottom: 0;
  left: 26%;
  width: 1px;
}

.source-figure::after {
  top: 44%;
  right: 0;
  left: 0;
  height: 1px;
}

.source-coordinate,
.citation-tag {
  position: relative;
  z-index: 2;
}

.source-coordinate {
  margin: 0;
  color: var(--secondary);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.locator-map {
  position: relative;
  z-index: 1;
  width: min(16rem, 72%);
  aspect-ratio: 1;
  align-self: center;
}

.locator-map::before {
  position: absolute;
  inset: 12%;
  border: 1px solid var(--border);
  content: "";
}

.locator-axis {
  position: absolute;
  z-index: 1;
  display: block;
  background: var(--interactive);
}

.locator-axis-x {
  top: 53%;
  right: 0;
  left: 0;
  height: 2px;
}

.locator-axis-y {
  top: 0;
  bottom: 0;
  left: 62%;
  width: 2px;
}

.locator-point {
  position: absolute;
  z-index: 2;
  top: calc(53% - 0.45rem);
  left: calc(62% - 0.45rem);
  width: 0.9rem;
  height: 0.9rem;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--location);
  outline: 2px solid var(--location);
}

.locator-readout {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: -0.35rem;
  padding: 0.35rem 0.5rem;
  color: var(--location);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.source-lines {
  position: absolute;
  z-index: 1;
  top: 60%;
  right: 12%;
  left: 12%;
  display: grid;
  gap: 0.8rem;
}

.source-lines span {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  background: var(--border);
}

.source-lines span:nth-child(2) { width: 82%; }
.source-lines span:nth-child(4) { width: 70%; }
.source-lines span:nth-child(5) { width: 88%; }

.source-lines .located-line {
  width: 78%;
  height: 1.6rem;
  margin-left: -0.65rem;
  background: var(--selection);
}

.source-lines .located-line::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--location);
  content: "";
}

.citation-tag {
  display: grid;
  gap: 0.35rem;
  align-self: flex-end;
  padding-left: 1rem;
  border-left: 3px solid var(--location);
}

.citation-tag span {
  color: var(--secondary);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.citation-tag strong {
  font-size: 0.88rem;
  font-weight: 650;
}

.principles {
  display: grid;
  grid-template-columns: minmax(17rem, 0.72fr) minmax(0, 1.5fr);
  border-top: 1px solid var(--border);
}

.section-heading {
  padding: clamp(3rem, 6vw, 6rem) clamp(1.5rem, 4vw, 4.5rem);
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--interactive) 6%, var(--background));
}

.section-index {
  margin-bottom: 2rem;
}

.section-heading h2,
.transparency h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3.7vw, 4.1rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.principle-list {
  margin: 0;
  padding: 0;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  list-style: none;
}

.principle-list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
  padding: clamp(2.5rem, 4vw, 4rem) clamp(1.5rem, 5vw, 5rem);
  border-bottom: 1px solid var(--border);
}

.principle-list li:last-child {
  border-bottom: 0;
}

.principle-number {
  color: var(--interactive);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.principle-list h3 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.035em;
}

.principle-list p {
  max-width: 42rem;
  margin: 0;
  color: var(--secondary);
  font-size: clamp(0.93rem, 1.2vw, 1.05rem);
  line-height: 1.6;
}

.transparency {
  position: relative;
  display: grid;
  grid-template-columns: minmax(10rem, 0.42fr) minmax(0, 1.25fr) minmax(10rem, 0.45fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 5rem);
  border-top: 1px solid var(--inverse-rule);
  background: var(--inverse-background);
  color: var(--inverse-foreground);
}

.transparency::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 22%;
  width: 1px;
  background: var(--inverse-rule);
  content: "";
}

.handoff-diagram {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 8rem;
}

.handoff-label {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--inverse-muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.handoff-line {
  position: absolute;
  top: 55%;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--inverse-index);
}

.handoff-line::after {
  position: absolute;
  top: -0.45rem;
  right: 0;
  width: 0.8rem;
  height: 0.8rem;
  border-top: 2px solid var(--inverse-index);
  border-right: 2px solid var(--inverse-index);
  content: "";
  transform: rotate(45deg);
}

.handoff-point {
  position: absolute;
  z-index: 2;
  top: calc(55% - 0.42rem);
  left: 44%;
  width: 0.85rem;
  height: 0.85rem;
  border: 3px solid var(--inverse-background);
  border-radius: 50%;
  background: var(--inverse-signal);
  outline: 2px solid var(--inverse-signal);
}

.transparency-copy {
  position: relative;
  z-index: 1;
}

.transparency .section-index {
  color: var(--inverse-index);
}

.transparency h2 {
  max-width: 15ch;
}

.transparency-copy > p:last-child {
  max-width: 45rem;
  margin: 2rem 0 0;
  color: var(--inverse-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
}

.margin-note {
  margin: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--inverse-signal);
  color: var(--inverse-muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  line-height: 2.4;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 8rem;
  padding: 2rem clamp(1.5rem, 4vw, 4.5rem);
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.59rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

.footer-brand {
  color: var(--interactive);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.035em;
  text-transform: none;
}

.copyright {
  justify-self: end;
  color: var(--secondary);
}

.error-shell {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
}

.error-page {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 10vw, 10rem) clamp(1rem, 8vw, 8rem);
}

.error-page .eyebrow {
  margin-bottom: 3rem;
}

.error-page h1 {
  font-size: clamp(3.5rem, 7.5vw, 7rem);
}

.error-page > p:not(.eyebrow) {
  max-width: 34rem;
  margin: 2.5rem 0;
  color: var(--secondary);
  font-size: 1.1rem;
  line-height: 1.6;
}

.return-link {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  align-self: flex-start;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--interactive);
  color: var(--interactive);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 1.5rem, 1440px);
  }

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

  .source-figure {
    min-height: 29rem;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

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

  .section-heading {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .transparency {
    grid-template-columns: minmax(8rem, 0.38fr) 1fr;
  }

  .transparency::before {
    left: 27%;
  }

  .margin-note {
    display: none;
  }
}

@media (max-width: 600px) {
  .page-shell {
    width: calc(100% - 1rem);
  }

  .site-header {
    min-height: 5rem;
    padding: 0.9rem 1rem;
  }

  .wordmark {
    gap: 0.5rem;
    font-size: 1rem;
  }

  .wordmark-mark {
    width: 1.5rem;
    height: 1.5rem;
  }

  .wordmark-mark::before,
  .wordmark-mark::after {
    left: 0.35rem;
    width: 0.78rem;
  }

  .wordmark-mark::before { top: 0.42rem; }
  .wordmark-mark::after { top: 0.91rem; }

  .header-status {
    max-width: 8rem;
    justify-content: flex-end;
    font-size: 0.55rem;
    text-align: right;
  }

  .hero-copy {
    padding: 4rem 1rem 4.5rem;
  }

  .eyebrow {
    align-items: flex-start;
    margin-bottom: 3rem;
    line-height: 1.5;
  }

  h1 {
    font-size: clamp(3.3rem, 16.5vw, 4.9rem);
  }

  .introduction {
    font-size: 1.05rem;
  }

  .source-figure {
    min-height: 25rem;
    padding: 1.5rem;
  }

  .source-lines {
    top: 62%;
  }

  .section-heading,
  .principle-list li {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .principle-list li {
    grid-template-columns: 2.25rem 1fr;
  }

  .transparency {
    grid-template-columns: 1fr;
    padding: 4rem 1rem 4.5rem;
  }

  .transparency::before {
    top: 9rem;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
  }

  .handoff-diagram {
    height: 6rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding: 2.25rem 1rem;
  }

  .copyright {
    justify-self: start;
  }
}

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

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