.network-state {
  color: var(--dim);
}

.topbar {
  direction: ltr;
}

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.topbar-actions nav {
  justify-self: auto;
}

.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;
}

.language-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-picker::after {
  content: "⌄";
  position: absolute;
  right: .7rem;
  color: var(--acid);
  pointer-events: none;
  font: 700 .65rem/1 var(--mono);
}

.language-picker select {
  width: 8.4rem;
  min-height: 2.35rem;
  padding: 0 1.85rem 0 .75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  appearance: none;
  background: var(--surface);
  font: .65rem/1 var(--mono);
  cursor: pointer;
}

.language-picker select:hover,
.language-picker select:focus-visible {
  color: var(--ink);
  border-color: var(--acid);
}

.handoff-hero {
  grid-template-columns: minmax(0, .8fr) minmax(34rem, 1.2fr);
  gap: 2rem clamp(3rem, 6vw, 7rem);
  padding-top: clamp(3rem, 6vh, 5rem);
}

.hero-copy h1 {
  max-width: 10ch;
  font-size: clamp(3.6rem, 6.2vw, 6.8rem);
  overflow-wrap: anywhere;
}

.hero-lead {
  max-width: 34rem;
}

.capability-note {
  max-width: 38rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  margin: 1.45rem 0 0;
  padding-top: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .78rem;
  line-height: 1.65;
}

.capability-note strong {
  color: var(--acid);
  font: 700 .62rem/1.65 var(--mono);
  letter-spacing: .08em;
  white-space: nowrap;
}

.hero-terminal {
  position: relative;
  z-index: 1;
  align-self: center;
  animation: visual-enter .85s .12s cubic-bezier(.22, .8, .22, 1) both;
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, .22);
}

.prompt-body {
  min-height: 17rem;
  padding: clamp(1.4rem, 2.4vw, 2.2rem);
  color: #c8cec5;
  font: .76rem/1.85 var(--mono);
  overflow-wrap: anywhere;
}

.prompt-body p {
  margin: 0;
  unicode-bidi: plaintext;
}

.prompt-body p + p {
  margin-top: 1rem;
}

.prompt-body [data-origin] {
  color: var(--acid);
}

.hero-terminal .prompt-body {
  max-height: min(24rem, 43vh);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.prompt-terminal footer button:disabled {
  cursor: wait;
  opacity: .72;
}

.live-strip dd {
  font-size: 1.05rem;
}

.live-strip div:nth-child(3) dd {
  font-size: clamp(.78rem, 1.1vw, 1rem);
}

.agent-flow > header {
  align-items: start;
}

.agent-flow h2 {
  max-width: 12ch;
}

.author-mode {
  min-height: 50rem;
}

.author-mode .handoff-copy h2 {
  max-width: 8ch;
}

.author-mode .handoff-copy > p:not(.eyebrow) {
  max-width: 32rem;
}

.participation-boundary {
  max-width: 95rem;
  margin: 0 auto;
  padding: 7rem clamp(1.1rem, 7vw, 8.5rem);
  border-bottom: 1px solid var(--line);
}

.participation-boundary header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 3rem;
  margin-bottom: 4rem;
}

.participation-boundary .eyebrow {
  grid-column: 1 / -1;
}

.participation-boundary h2 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(2.8rem, 5.1vw, 5.5rem);
  line-height: .94;
  letter-spacing: -.065em;
}

.participation-boundary dl {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.participation-boundary dl div {
  min-height: 7rem;
  display: grid;
  grid-template-columns: minmax(11rem, .55fr) 1fr;
  align-items: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}

.participation-boundary dt {
  color: var(--acid);
  font: 700 .65rem/1.4 var(--mono);
  letter-spacing: .07em;
}

.participation-boundary dd {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.public-proof h2 {
  max-width: 11ch;
}

.machine-docs h2 {
  max-width: 8ch;
}

[dir="rtl"] .topbar nav,
[dir="rtl"] .network-state,
[dir="rtl"] .language-picker select {
  direction: rtl;
}

[dir="rtl"] .language-picker::after {
  right: auto;
  left: .7rem;
}

[dir="rtl"] .language-picker select {
  padding-right: .75rem;
  padding-left: 1.85rem;
}

[dir="rtl"] .prompt-terminal footer button {
  margin-right: -1.2rem;
  margin-left: 0;
  border-right: 0;
  border-left: 1px solid var(--line);
}

[dir="rtl"] .live-strip div + div {
  padding-right: 1.5rem;
  padding-left: 0;
  border-right: 1px solid var(--line);
  border-left: 0;
}

[dir="rtl"] code,
[dir="rtl"] .machine-docs nav code {
  direction: ltr;
  unicode-bidi: isolate;
}

@media (max-width: 1180px) {
  .handoff-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .hero-copy {
    max-width: 50rem;
  }

  .hero-terminal {
    width: 100%;
    max-width: 58rem;
  }

  .hero-terminal .prompt-body {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .topbar-actions {
    gap: .65rem;
  }

  .topbar nav a {
    display: none;
  }

  .topbar nav a:nth-child(2) {
    display: inline;
  }

  .language-picker select {
    width: 7.2rem;
    min-height: 2.25rem;
  }

  .handoff-hero {
    padding-top: 3.5rem;
  }

  .hero-copy h1 {
    max-width: 9ch;
    font-size: clamp(3.25rem, 16vw, 4.6rem);
  }

  .capability-note {
    grid-template-columns: 1fr;
    gap: .35rem;
  }

  .prompt-body {
    min-height: 0;
    padding: 1.35rem;
    font-size: .69rem;
    line-height: 1.8;
  }

  .prompt-terminal footer {
    min-height: 3.8rem;
  }

  .prompt-terminal footer button {
    width: 100%;
    border-right: 0;
  }

  .live-strip dd {
    font-size: .93rem;
  }

  .live-strip div:nth-child(3) dd {
    font-size: .7rem;
  }

  [dir="rtl"] .live-strip div:nth-child(3) {
    padding-right: 0;
    border-right: 0;
  }

  .author-mode {
    min-height: auto;
  }

  .participation-boundary {
    padding: 5.5rem 1rem;
  }

  .participation-boundary header {
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
  }

  .participation-boundary h2 {
    font-size: 3.25rem;
  }

  .participation-boundary dl div {
    grid-template-columns: 1fr;
    gap: .75rem;
    padding: 1.5rem 0;
  }
}
