/* Jcode site coming-soon aesthetic: mono, monochrome, minimal. */

/* Self-hosted so every visitor sees the identical font. */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-700.woff2") format("woff2");
}

:root {
  --ink: #111;
  --muted: #666;
  --faint: #999;
  --rule: #ccc;
  --wash: #f4f4f4;
  --bg: #fff;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

/* ---- Hero ---- */

.home-page > section:first-of-type {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-page > section:first-of-type h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

#donut-canvas {
  margin: 0.5rem 0 1rem;
  contain: layout paint;
}

.home-page > section:first-of-type > p:first-of-type {
  color: var(--muted);
  margin: 0;
}

.home-page > section:first-of-type p {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

/* ---- Detail pages ---- */

.detail-header {
  padding: 5rem 0 1rem;
}

.detail-header article {
  margin-bottom: 0;
}

.detail-header h1 {
  margin: 1.5rem 0 1rem;
  font-size: 2.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.detail-header p:last-child {
  max-width: 760px;
  color: var(--muted);
}

/* ---- Install command (copyable) ---- */

.install-command {
  display: inline-flex;
  align-items: stretch;
  margin-top: 1.75rem;
  border: 1px solid var(--rule);
  background: var(--wash);
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}

.install-command pre {
  margin: 0;
  padding: 0.75rem 1.25rem;
  overflow-x: auto;
}

.install-command code {
  font-size: 0.9rem;
  white-space: nowrap;
}

.copy-button {
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg);
  border: none;
  border-left: 1px solid var(--rule);
  padding: 0 1rem;
  cursor: pointer;
  min-width: 5.5em;
}

.copy-button:hover {
  color: var(--ink);
}

/* Sticky install pill after scrolling past the hero */
.install-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 1rem;
  display: flex;
  justify-content: center;
  padding: 0;
  pointer-events: none;
  transform: translateY(-150%);
  transition: transform 0.25s ease;
  will-change: transform;
  z-index: 10;
}

.install-bar.visible {
  transform: translateY(0);
}

.install-bar .install-command {
  margin-top: 0;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.install-bar pre {
  padding: 0.5rem 1rem;
}

/* ---- Download buttons ---- */

.downloads {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.download-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 0.9rem;
  text-decoration: none;
}

.download-button:hover {
  border-color: var(--ink);
}

.download-button img {
  display: block;
}

.download-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.beta-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
}

#star-count {
  color: var(--muted);
}

/* ---- Rules ---- */

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0 0 4rem;
}

main > section[id] {
  scroll-margin-top: 5rem;
}

/* ---- Feature articles ---- */

article {
  margin: 0 0 5.5rem;
}

article:last-child {
  margin-bottom: 0;
}

/* Defer layout and painting for long-form content until it nears the viewport. */
.home-page > section:not(:first-of-type) > article {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.section-intro {
  margin-bottom: 3rem;
}

.performance-block > h3:first-child {
  margin-top: 0;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2.5rem 0 0.5rem;
}

article p {
  margin: 0 0 1rem;
  color: var(--ink);
}

article code {
  background: var(--wash);
  border: 1px solid var(--rule);
  padding: 0 0.3em;
  font-size: 0.9em;
}

/* ---- DeepSWE harness leaderboard ---- */

.deepswe-leaderboard-block > p:first-of-type {
  max-width: 680px;
}

.deepswe-leaderboard {
  margin: 2rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}

.deepswe-leaderboard-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(8rem, 11rem) 1fr 5.5rem;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 0.75rem;
  border-top: 1px solid var(--rule);
}

.deepswe-leaderboard-row.winner {
  background: var(--wash);
}

.deepswe-rank {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.deepswe-harness strong,
.deepswe-harness small {
  display: block;
}

.deepswe-harness small {
  margin-top: 0.15rem;
  color: var(--muted);
}

.deepswe-bar {
  display: block;
  height: 1.4rem;
  overflow: hidden;
  border-radius: 5px;
  background: #e7e7e7;
}

.deepswe-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: #999;
}

.deepswe-leaderboard-row.winner .deepswe-bar i {
  background: var(--ink);
}

.deepswe-score {
  text-align: right;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 620px) {
  .deepswe-leaderboard-row {
    grid-template-columns: 2rem 1fr 5rem;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
  }

  .deepswe-bar {
    grid-column: 2 / -1;
    grid-row: 2;
  }
}

/* ---- Live base system prompt ---- */

.system-prompt-block {
  margin-bottom: 5.5rem;
}

.system-prompt-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.system-prompt-heading > div {
  max-width: 680px;
}

.prompt-revision {
  flex: none;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

.prompt-evolution {
  margin: 2rem 0 2.5rem;
  scroll-margin-top: 6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.prompt-evolution-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.prompt-evolution-heading > div:first-child {
  max-width: 36rem;
}

.prompt-evolution-heading h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.prompt-evolution-heading p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.prompt-evolution-stat {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 0.1rem;
  text-align: right;
}

.prompt-evolution-stat strong {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.prompt-evolution-stat span {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.prompt-evolution-plot {
  padding: 0.85rem 1rem 0.35rem;
  overflow-x: auto;
  background-color: var(--wash);
  scrollbar-color: var(--rule) var(--wash);
}

.prompt-evolution svg {
  display: block;
  width: 100%;
  min-width: 620px;
  height: auto;
  overflow: visible;
  font-family: inherit;
}

.prompt-scroll-hint {
  display: none;
}

.prompt-chart-grid line {
  stroke: var(--rule);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.prompt-chart-grid text {
  fill: var(--faint);
  font-size: 10px;
  text-anchor: end;
}

.prompt-chart-area {
  fill: url("#prompt-dots");
  color: var(--ink);
  opacity: 0.45;
}

#prompt-dots circle {
  fill: var(--ink);
}

.prompt-chart-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prompt-chart-point circle {
  fill: var(--bg);
  stroke: var(--ink);
  stroke-width: 2;
  transition: fill 120ms ease, r 120ms ease;
}

.prompt-chart-point:hover circle {
  fill: var(--ink);
}

.prompt-chart-point text {
  text-anchor: middle;
}

.prompt-point-value {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.prompt-point-version {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.prompt-point-date {
  fill: var(--muted);
  font-size: 9px;
}

.prompt-chart-point-current circle {
  fill: var(--ink);
}

.prompt-evolution figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
}

.prompt-evolution figcaption span:last-child {
  max-width: 31rem;
  text-align: right;
}

.prompt-comparison-block {
  margin-top: 1rem;
}

.prompt-comparison-table td:nth-child(2) {
  font-variant-numeric: tabular-nums;
}

.prompt-comparison-table td:last-child {
  min-width: 13rem;
  white-space: normal;
}

.dynamic-prompt-row td {
  color: var(--muted);
}

.prompt-methodology {
  max-width: 760px;
  color: var(--muted);
  font-size: 0.82rem;
}

.system-prompt-panel {
  margin-top: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--wash);
}

.system-prompt-toolbar {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  padding-left: 1rem;
  font-size: 0.75rem;
}

.system-prompt-actions {
  align-self: stretch;
  display: flex;
}

.system-prompt-toolbar button {
  min-width: 5.5rem;
  border: 0;
  border-left: 1px solid var(--rule);
  background: var(--bg);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.system-prompt-toolbar button:hover {
  color: var(--ink);
  background: var(--wash);
}

.system-prompt-content {
  max-height: 38rem;
  margin: 0;
  padding: 1.25rem;
  overflow: auto;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.system-prompt-content code {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
}

.system-prompt-status {
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.system-prompt-error {
  flex-direction: column;
}

/* ---- Hill-climbability transcript distribution ---- */

.hill-distribution {
  margin-top: 2rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.hill-distribution-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 1.5rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.hill-distribution-heading h3 {
  max-width: 34rem;
  margin: 0;
  font-size: 1.05rem;
}

.hill-distribution .hill-sample {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.hill-sample strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.hill-chart {
  position: relative;
  padding: 3.25rem 1.5rem 1rem;
  overflow-x: auto;
  background-image: linear-gradient(to top, transparent 24%, var(--wash) 25%, transparent 26%, transparent 49%, var(--wash) 50%, transparent 51%, transparent 74%, var(--wash) 75%, transparent 76%);
  background-size: 100% calc(100% - 5.75rem);
  background-position: 0 2.75rem;
  background-repeat: no-repeat;
}

.hill-bars {
  display: grid;
  grid-template-columns: repeat(17, minmax(1.75rem, 1fr));
  gap: 0.45rem;
  align-items: end;
  min-width: 720px;
  height: 17rem;
  border-bottom: 1px solid var(--ink);
}

.hill-bar-column {
  display: grid;
  grid-template-rows: 1.4rem 1fr 1.8rem;
  align-items: end;
  height: 100%;
  text-align: center;
}

.hill-bar-count {
  align-self: start;
  color: var(--muted);
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
}

.hill-bar {
  display: block;
  width: 100%;
  height: var(--hill-height);
  min-height: 2px;
  border: 1px solid var(--ink);
  border-bottom: 0;
  background: var(--ink);
}

.hill-bar.below-threshold {
  background: repeating-linear-gradient(-45deg, var(--ink) 0 1px, var(--bg) 1px 4px);
}

.hill-bar-score {
  padding-top: 0.45rem;
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
}

.hill-threshold {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
}

.hill-threshold::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 0.7rem;
  margin-right: 0.5rem;
  border: 1px solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--ink) 0 1px, var(--bg) 1px 4px);
  vertical-align: -0.1rem;
}

.hill-axis-label {
  min-width: 720px;
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  text-align: right;
}

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

.hill-summary p {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--rule);
}

.hill-summary p:last-child {
  border-right: 0;
}

.hill-summary strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.hill-summary span {
  color: var(--muted);
  font-size: 0.65rem;
}

.hill-distribution figcaption {
  padding: 1rem 1.5rem;
}

/* ---- Changelog ---- */

.changelog-block .lede {
  color: var(--muted);
  margin-bottom: 3rem;
}

.release {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 0.5rem;
  margin-top: 1.75rem;
}

.release-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.release h3 {
  font-size: 1.15rem;
  margin: 0;
}

.release time {
  color: var(--muted);
  font-size: 0.85rem;
}

.release-title {
  margin: 0.65rem 0 0;
  font-weight: 600;
}

.release-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.2rem 0 0;
}

.release ul {
  padding-left: 1.25rem;
  margin: 1rem 0;
}

.release li {
  margin: 0.35rem 0;
}

.tag {
  display: inline-block;
  margin-right: 0.35em;
  padding: 0 0.4em;
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  vertical-align: middle;
}

/* ---- Links ---- */

a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

a:hover {
  border-bottom-color: var(--ink);
}

/* ---- Docs page ---- */

.docs-nav {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

.docs-page article > pre {
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  margin: 0 0 1rem;
  overflow-x: auto;
}

.docs-page article > pre code {
  font-size: 0.85rem;
  background: none;
  border: none;
  padding: 0;
}

.docs-page tbody tr:first-child td {
  font-weight: 400;
}

.docs-page tbody td {
  white-space: normal;
}

.docs-page tbody td:first-child {
  white-space: nowrap;
}

/* ---- Tables ---- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin: 1rem 0 1.5rem;
  display: block;
  overflow-x: auto;
}

thead th {
  text-align: left;
  font-weight: 400;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  padding: 0 1rem 0.5rem 0;
  border-bottom: 1px solid var(--ink);
}

tbody td {
  padding: 0.55rem 1rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
  vertical-align: middle;
}

tbody tr:first-child td {
  font-weight: 700;
}

tbody td:last-child {
  color: var(--muted);
}

/* Bar graphs */
progress {
  -webkit-appearance: none;
  appearance: none;
  width: 180px;
  height: 10px;
  border: none;
  background: var(--wash);
  display: block;
  border-radius: 5px;
  overflow: hidden;
}

progress::-webkit-progress-bar {
  background: var(--wash);
  border-radius: 5px;
}

progress::-webkit-progress-value {
  background: var(--ink);
  border-radius: 5px;
}

progress::-moz-progress-bar {
  background: var(--ink);
  border-radius: 5px;
}

/* ---- Figures / media ---- */

figure {
  margin: 1.5rem 0 0;
}

figure img,
figure video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

.visual-placeholder > div {
  min-height: 20rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  background:
    linear-gradient(135deg, transparent 48%, var(--rule) 49%, var(--rule) 51%, transparent 52%),
    linear-gradient(45deg, transparent 48%, var(--rule) 49%, var(--rule) 51%, transparent 52%),
    var(--wash);
  background-size: 4rem 4rem;
  color: var(--muted);
}

.visual-placeholder span {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule);
  background: var(--bg);
  font-size: 0.8rem;
}

figcaption {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* ---- Product screenshots ---- */

.screenshot-showcase > p {
  max-width: 760px;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.screenshot-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--wash);
  overflow: hidden;
}

.screenshot-card.wide {
  grid-column: 1 / -1;
}

.screenshot-card a {
  display: block;
  border: 0;
  background: #090909;
  overflow: hidden;
}

.screenshot-card img {
  width: 100%;
  border: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.screenshot-card:not(.wide) img {
  aspect-ratio: 1439 / 1762;
  object-fit: cover;
}

.screenshot-card a:hover img {
  transform: scale(1.01);
  opacity: 0.94;
}

.screenshot-card figcaption {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-top: 1px solid var(--rule);
  background: var(--bg);
  text-align: left;
}

/* ---- Footer ---- */

footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.construction-notice {
  width: fit-content;
  margin: 0 auto 1.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.construction-notice span {
  color: var(--ink);
  opacity: 0.55;
}

.page-status {
  width: fit-content;
  margin: 1rem 0 1.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.page-status span {
  color: var(--ink);
  opacity: 0.55;
}

.footer-brand {
  color: var(--muted);
}

.yc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: var(--muted);
  vertical-align: middle;
}

.yc-logo {
  width: 1.1em;
  height: 1.1em;
  border-radius: 2px;
  display: block;
}

/* ---- Section map (right rail) ---- */

.page-toc {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  max-height: 80vh;
  overflow-y: auto;
  font-size: 0.72rem;
  line-height: 1.5;
  border-left: 1px solid var(--rule);
  padding-left: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
  will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
  .install-bar,
  .page-toc,
  .prompt-chart-point circle,
  .screenshot-card img {
    transition-duration: 0.01ms;
  }
}

.page-toc.visible {
  opacity: 1;
  visibility: visible;
}

.page-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page-toc li {
  margin: 0.15rem 0;
}

.page-toc li.toc-sub {
  padding-left: 1rem;
}

.page-toc a {
  color: var(--faint);
  text-decoration: none;
  border-bottom: none;
  display: block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-toc a:hover {
  color: var(--ink);
  border-bottom: none;
}

.page-toc a.active {
  color: var(--ink);
}

/* Hide the rail when it would collide with the copy column. */
@media (max-width: 1280px) {
  .page-toc {
    display: none;
  }
}

/* ---- Small screens ---- */

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .home-page > section:first-of-type h1,
  .detail-header h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.25rem;
  }

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

  .screenshot-card.wide {
    grid-column: auto;
  }

  progress {
    width: 110px;
  }

  .system-prompt-heading {
    display: block;
  }

  .prompt-revision {
    margin-top: 0.5rem;
    text-align: left;
  }

  .prompt-evolution-heading {
    display: block;
    padding: 1.25rem;
  }

  .prompt-evolution-stat {
    align-items: flex-start;
    margin-top: 1.25rem;
    text-align: left;
  }

  .prompt-evolution-stat strong {
    font-size: 1.7rem;
  }

  .prompt-evolution-plot {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .prompt-scroll-hint {
    position: sticky;
    left: 0;
    display: block;
    width: fit-content;
    margin: 0 0 -0.4rem auto;
    color: var(--muted);
    font-size: 0.62rem;
  }

  .prompt-evolution svg {
    min-width: 560px;
  }

  .prompt-evolution figcaption {
    display: block;
    padding: 0.85rem 1rem;
    text-align: left;
  }

  .prompt-evolution figcaption span {
    display: block;
  }

  .prompt-evolution figcaption span:last-child {
    margin-top: 0.45rem;
    text-align: left;
  }

  .system-prompt-toolbar {
    padding-left: 0.75rem;
  }

  .system-prompt-toolbar button {
    min-width: 4.5rem;
  }

  .system-prompt-content {
    max-height: 32rem;
    padding: 1rem;
    font-size: 0.72rem;
  }

  .hill-distribution-heading {
    display: block;
    padding: 1.25rem;
  }

  .hill-distribution .hill-sample {
    align-items: flex-start;
    margin-top: 1rem;
  }

  .hill-chart {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .hill-threshold {
    left: 1.25rem;
  }

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

  .hill-summary p:nth-child(2) {
    border-right: 0;
  }

  .hill-summary p:nth-child(-n + 2) {
    border-bottom: 1px solid var(--rule);
  }

  .hill-distribution figcaption {
    padding: 1rem 1.25rem;
    text-align: left;
  }
}
