:root {
  color-scheme: light;
  font-family: "Paradigm SemiMono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --black: #000000;
  --blue: #0a82e1;
  --error: #e04545;
  --green: #00ff00;
  --white: #ffffff;
  --grey-100: #f6f6f6;
  --grey-200: #eeeeee;
  --grey-300: #dddddd;
  --grey-400: #cccccc;
  --grey-500: #999999;
  --grey-600: #666666;
  --grey-700: #333333;
  --grey-800: #161616;
  --text: var(--black);
  --text-muted: var(--black);
  --text-inverse: var(--white);
  --border: var(--grey-400);
  --border-soft: rgba(0, 0, 0, 0.08);
  --surface: var(--white);
  --surface-subtle: var(--grey-100);
  --surface-raised: var(--white);
  --surface-overlay: rgba(224, 224, 224, 0.6);
  --surface-hover: rgba(0, 0, 0, 0.04);
  --positive: #128342;
  --negative: #d53b3b;
  --header-height: 52px;
  --page-margin: 36px;
  --gutter: 36px;
  --radius-small: 4px;
  --radius-medium: 12px;
  --shadow-overlay: 0 24px 70px rgba(0, 0, 0, 0.13);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --text: var(--white);
  --text-muted: var(--white);
  --text-inverse: var(--black);
  --border: var(--grey-600);
  --border-soft: rgba(255, 255, 255, 0.1);
  --surface: var(--grey-800);
  --surface-subtle: var(--grey-700);
  --surface-raised: #202020;
  --surface-overlay: rgba(51, 51, 51, 0.68);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --positive: #73d89b;
  --negative: #ff8585;
  --shadow-overlay: 0 24px 70px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
  color: var(--text);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
}

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

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

button {
  border: 0;
}

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

h1,
h2,
h3,
p,
dl,
dd,
pre {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

svg {
  display: block;
  flex: 0 0 auto;
}

::selection {
  color: var(--white);
  background: var(--blue);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-grid {
  width: min(calc(100% - (var(--page-margin) * 2)), 1752px);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  flex: 0 0 var(--header-height);
  align-items: center;
  height: var(--header-height);
  padding-inline: 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: none;
}

.wordmark {
  display: flex;
  gap: 7px;
  align-items: baseline;
  justify-self: start;
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.wordmark span {
  color: var(--text-muted);
  font-family: "Paradigm SemiMono", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  letter-spacing: 0;
}

.header-center {
  display: flex;
  align-items: center;
  justify-self: center;
}

.surface-switch {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--surface-subtle);
  border-radius: var(--radius-medium);
}

.surface-switch button {
  display: flex;
  gap: 6px;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  color: var(--text-muted);
  background: transparent;
  border-radius: calc(var(--radius-medium) - 2px);
  cursor: pointer;
}

.surface-switch button:hover,
.surface-switch button:focus-visible,
.surface-switch button.is-active {
  color: var(--text);
}

.surface-switch button.is-active {
  background: var(--surface-raised);
}

.surface-switch button span {
  color: var(--text-muted);
  font-size: 9px;
}

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

.text-action,
.button,
.icon-button {
  cursor: pointer;
}

.text-action {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  height: 30px;
  padding: 0 8px;
  background: transparent;
  border-radius: var(--radius-medium);
}

.text-action:hover,
.text-action:focus-visible {
  background: var(--surface-hover);
}

.text-action svg {
  width: 13px;
  height: 13px;
}

.keycap,
.button span,
.detail-tabs span {
  color: var(--text-muted);
}

.button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-medium);
  transition: background-color 120ms ease, color 120ms ease, opacity 120ms ease;
}

.button--medium {
  background: color-mix(in srgb, var(--grey-300) 60%, transparent);
  backdrop-filter: blur(12px);
}

html[data-theme="dark"] .button--medium {
  background: color-mix(in srgb, var(--grey-600) 58%, transparent);
}

.button--medium:hover,
.button--medium:focus-visible {
  background: var(--grey-300);
}

html[data-theme="dark"] .button--medium:hover,
html[data-theme="dark"] .button--medium:focus-visible {
  background: var(--grey-600);
}

.button--high {
  color: var(--text-inverse);
  background: var(--text);
}

.button--high:hover,
.button--high:focus-visible {
  opacity: 0.78;
}

.button:disabled {
  cursor: wait;
}

.eyebrow,
.rail-label {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 7px;
  align-items: center;
}

.eyebrow svg {
  width: 11px;
  height: 11px;
}

.home-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100svh - var(--header-height));
  padding: 48px 24px 72px;
  background: color-mix(in srgb, var(--surface) 96%, var(--text));
}

.home-article {
  width: min(100%, 720px);
  margin: auto;
  font-size: 14px;
  line-height: 1.55;
}

.home-intro {
  max-width: none;
}

.home-intro h1 {
  font-size: 36px;
  line-height: 1.05;
}

.home-intro > p:last-child,
.home-copy {
  color: var(--text-muted);
}

.home-intro > p:last-child {
  margin-top: 10px;
}

.home-copy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 18px;
}

.home-copy h2,
.home-release-section h2,
.home-progress-section > h2 {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.home-copy ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.home-copy li + li {
  margin-top: 6px;
}

.home-release-section {
  margin-top: 30px;
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-medium);
}

.home-release-heading {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
}

.home-release-heading h2 {
  margin-top: 4px;
}

.home-release-heading > a,
.home-release-grid article > a {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.home-release-heading > a {
  padding-bottom: 2px;
  color: var(--text-muted);
  font-size: 11px;
}

.home-release-heading a:hover,
.home-release-heading a:focus-visible,
.home-release-grid article > a:hover,
.home-release-grid article > a:focus-visible {
  color: var(--blue);
}

.home-release-heading svg,
.home-release-grid article > a svg {
  width: 12px;
  height: 12px;
}

.home-install-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 10px 10px 10px 12px;
  background: var(--surface-subtle);
  border-radius: var(--radius-small);
}

.home-install-command code {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-install-command button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
  cursor: pointer;
}

.home-install-command button:hover,
.home-install-command button:focus-visible {
  border-color: var(--border);
}

.home-install-command button svg {
  width: 12px;
  height: 12px;
}

.home-release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.home-release-grid article {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.home-release-grid article > span {
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-release-grid article > code,
.home-release-grid article > a {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-release-grid article > p {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
}

.home-progress-section {
  margin-top: 30px;
}

.home-progress {
  margin-top: 10px;
  padding: 0;
}

.home-progress-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 9px;
}

.home-progress-legend span {
  display: flex;
  gap: 5px;
  align-items: center;
}

.home-progress-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.home-progress-chart {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 0;
}

.home-progress-metric {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.home-progress-metric-heading {
  display: grid;
  gap: 2px;
  font-size: inherit;
  line-height: 1.25;
}

.home-progress-metric-heading small {
  color: var(--text-muted);
  font-size: inherit;
}

.home-progress-metric-heading small b {
  color: var(--text);
  font-weight: 500;
}

.home-progress-bars {
  display: grid;
  gap: 4px;
}

.home-progress-bar-line {
  position: relative;
  height: 7px;
  margin-right: 72px;
  border-radius: 999px;
}

.home-progress-bar-line::before {
  position: absolute;
  inset: 0;
  background: var(--surface-subtle);
  border-radius: inherit;
  content: "";
}

.home-progress-bar-line > span {
  position: relative;
  display: block;
  height: 100%;
  border-radius: inherit;
}

.home-progress-bar-line > strong {
  position: absolute;
  top: 50%;
  color: var(--text);
  font-size: inherit;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
}

.home-progress .is-nano {
  background: var(--blue);
}

.home-progress .is-codex {
  background: var(--text-muted);
}

.icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  background: var(--surface-subtle);
  border-radius: var(--radius-medium);
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--surface-hover);
}

.icon-button svg {
  width: 13px;
  height: 13px;
}

.empty-state {
  padding: 20px 12px;
  color: var(--text-muted);
}

.empty-state button {
  padding: 8px 0;
  color: var(--text);
  text-decoration: underline;
  background: transparent;
  cursor: pointer;
}

.additions {
  color: var(--positive);
}

.deletions {
  color: var(--negative);
}

.detail-tabs {
  display: flex;
  align-items: center;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
}

.detail-tabs button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  align-self: stretch;
  padding: 0 12px;
  color: var(--text-muted);
  background: transparent;
}

.detail-tabs button {
  cursor: pointer;
}

.detail-tabs button:first-child {
  padding-left: 0;
}

.detail-tabs button.is-active {
  color: var(--text);
}

.detail-tabs button.is-active::before {
  content: "•";
  color: var(--text);
}

.overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 92px 20px 32px;
  background: var(--surface-overlay);
  backdrop-filter: blur(12px);
}

.search-dialog,
.proposal-dialog {
  width: min(100%, 666px);
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-overlay);
}

.search-field {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 26px;
  gap: 10px;
  align-items: center;
  height: 56px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}

.search-field > svg,
.search-field button svg {
  width: 14px;
  height: 14px;
}

.search-field input {
  width: 100%;
  height: 100%;
  outline: 0;
  background: transparent;
  border: 0;
}

.search-field input::placeholder {
  color: var(--text-muted);
}

.search-field button {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  background: var(--surface-subtle);
  border-radius: var(--radius-small);
  cursor: pointer;
  place-items: center;
}

.search-results {
  max-height: min(57vh, 480px);
  padding: 6px;
  overflow-y: auto;
}

.search-result {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto 14px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  text-align: left;
  background: transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.search-result:hover,
.search-result:focus-visible,
.search-result.is-first {
  background: var(--surface-subtle);
}

.search-result > span,
.search-result > small {
  color: var(--text-muted);
  font-size: 10px;
}

.search-result > strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result > svg {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
}

.search-empty {
  padding: 32px 10px;
  color: var(--text-muted);
  text-align: center;
}

.search-footer {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  color: var(--text-muted);
  font-size: 10px;
  border-top: 1px solid var(--border-soft);
}

.proposal-dialog {
  position: relative;
  width: min(100%, 560px);
  padding: 28px;
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--surface-subtle);
  border-radius: var(--radius-small);
  cursor: pointer;
  place-items: center;
}

.dialog-close svg {
  width: 13px;
  height: 13px;
}

.proposal-dialog > h2 {
  margin-top: 24px;
  font-size: 44px;
  line-height: 0.96;
}

.proposal-intro {
  max-width: 440px;
  margin-top: 18px;
  color: var(--text-muted);
  line-height: 1.45;
}

.proposal-dialog label {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.proposal-dialog label input {
  height: 42px;
  padding: 0 12px;
  color: var(--text);
  outline: 0;
  background: var(--surface-subtle);
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  text-transform: none;
}

.proposal-dialog label input:focus {
  border-color: var(--border);
}

.proposal-summary {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
  padding: 16px;
  background: var(--surface-subtle);
}

.proposal-summary span,
.proposal-summary strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proposal-summary span {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.proposal-summary strong {
  font-size: 10px;
  font-weight: 400;
}

.proposal-submit {
  width: 100%;
  min-height: 38px;
  margin-top: 16px;
}

.proposal-submit svg {
  width: 12px;
  height: 12px;
}

.payment-required {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 28px;
}

.payment-mark {
  display: grid;
  width: 68px;
  height: 68px;
  color: var(--text-inverse);
  font-family: "Paradigm Serif", Georgia, serif;
  font-size: 24px;
  background: var(--text);
  border-radius: 50%;
  place-items: center;
}

.payment-required h3 {
  margin-top: 24px;
  font-size: 26px;
}

.payment-required p {
  max-width: 440px;
  margin-top: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.payment-required .button {
  margin-top: 24px;
}

.code-surface {
  padding-block: 64px 120px;
}

.code-heading {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr);
  gap: var(--gutter);
  align-items: end;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--border);
}

.code-heading h1 {
  margin-top: 20px;
  font-size: clamp(64px, 8vw, 118px);
  line-height: 0.82;
}

.code-heading > p {
  max-width: 520px;
  color: var(--text-muted);
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.35vw, 22px);
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.code-browser {
  display: grid;
  grid-template-columns: minmax(250px, 3fr) minmax(0, 9fr);
  gap: var(--gutter);
  align-items: start;
  margin-top: 36px;
}

.code-tree-panel {
  position: relative;
  top: auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-subtle);
  border: 0;
  border-right: 1px solid var(--border-soft);
  border-radius: 0;
}

.pierre-file-tree {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  --trees-bg-override: var(--surface-subtle);
  --trees-bg-muted-override: var(--surface-hover);
  --trees-border-color-override: var(--border);
  --trees-border-radius-override: var(--radius-small);
  --trees-fg-override: var(--text);
  --trees-fg-muted-override: var(--text-muted);
  --trees-focus-ring-color-override: var(--text-muted);
  --trees-font-family-override: "Paradigm SemiMono", SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --trees-font-size-override: 11px;
  --trees-input-bg-override: var(--surface-raised);
  --trees-padding-inline-override: 8px;
  --trees-search-bg-override: var(--surface-raised);
  --trees-search-fg-override: var(--text);
  --trees-selected-bg-override: var(--surface-raised);
  --trees-selected-fg-override: var(--text);
}

.pierre-tree-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border-soft);
}

.pierre-tree-heading > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pierre-tree-heading > div:last-child {
  flex-direction: row;
  gap: 8px;
  align-items: center;
}

.pierre-tree-heading strong {
  font-size: 12px;
  font-weight: 500;
}

.pierre-tree-heading span {
  display: flex;
  gap: 5px;
  align-items: center;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pierre-tree-heading span svg {
  width: 10px;
  height: 10px;
}

.pierre-tree-heading button {
  display: none;
  width: 26px;
  height: 26px;
  padding: 0;
  background: transparent;
  border-radius: var(--radius-small);
  place-items: center;
}

.pierre-tree-heading button svg {
  width: 13px;
  height: 13px;
}

.pierre-tree-heading .tree-search-trigger {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: auto;
  padding: 0 6px;
  color: var(--text-muted);
  font-size: 9px;
  border: 1px solid var(--border-soft);
}

.pierre-tree-heading .tree-search-trigger:hover,
.pierre-tree-heading .tree-search-trigger:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
}

.pierre-tree-heading .tree-search-trigger kbd {
  font: inherit;
}

.code-file {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
}

.code-file-header {
  display: flex;
  flex: 0 0 44px;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
}

.file-breadcrumb {
  display: flex;
  min-width: 0;
  overflow: hidden;
}

.file-breadcrumb span {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  color: var(--text-muted);
}

.file-breadcrumb span:last-child {
  color: var(--text);
}

.file-breadcrumb svg {
  width: 10px;
  height: 10px;
  margin-right: 4px;
}

.code-file-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 10px;
}

.code-file-message {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  color: var(--text-muted);
}

.code-file-message svg {
  width: 15px;
  height: 15px;
}

.requests-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
}

.requests-empty > svg {
  width: 22px;
  height: 22px;
  margin-bottom: 28px;
}

.requests-empty h1 {
  margin-top: 22px;
  font-size: clamp(54px, 8vw, 112px);
  line-height: 0.88;
}

.requests-empty > p:last-child {
  max-width: 520px;
  margin-top: 24px;
  color: var(--text-muted);
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.5vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.harbor-loading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
}

.harbor-loading > svg {
  width: 18px;
  height: 18px;
  margin-bottom: 24px;
}

.harbor-loading h1 {
  font-size: clamp(42px, 6vw, 80px);
}

.harbor-loading p {
  max-width: 560px;
  margin-top: 18px;
  color: var(--text-muted);
}

.eval-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  padding-block: 72px 0;
}

.eval-hero-copy {
  grid-column: 1 / span 7;
}

.eval-hero-copy h1 {
  margin-top: 22px;
  font-size: clamp(64px, 8vw, 128px);
  line-height: 0.82;
}

.eval-hero-copy > p:last-child {
  max-width: 620px;
  margin-top: 30px;
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.5vw, 25px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.gate-score {
  grid-column: 9 / -1;
  align-self: end;
  min-height: 206px;
  padding: 24px;
  background: var(--surface-subtle);
}

.gate-score > span,
.gate-score > p {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.gate-score > strong {
  display: block;
  margin-top: 24px;
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(60px, 6vw, 94px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.84;
}

.gate-score > p {
  margin-top: 30px;
}

.eval-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 48px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.eval-strip > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-height: 62px;
  padding: 14px 18px;
  border-right: 1px solid var(--border);
}

.eval-strip > div:first-child {
  padding-left: 0;
}

.eval-strip > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.eval-strip span {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.eval-strip strong {
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.comparison-board {
  padding-top: 64px;
}

.comparison-board > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.comparison-board > header h2 {
  margin-top: 8px;
  font-size: 30px;
}

.comparison-board > header > p,
.comparison-board > footer {
  color: var(--text-muted);
  font-size: 10px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  padding-left: 0;
}

.comparison-table thead th {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
}

.comparison-table tbody th {
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
}

.comparison-table td {
  width: 160px;
}

.comparison-result {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 6px 8px;
  background: var(--surface-subtle);
  border-radius: var(--radius-medium);
  cursor: pointer;
}

.comparison-result:hover,
.comparison-result:focus-visible {
  background: var(--surface-hover);
}

.comparison-result svg {
  width: 10px;
  height: 10px;
}

.comparison-result.passed {
  color: var(--positive);
}

.comparison-result.failed {
  color: var(--negative);
}

.comparison-result.error {
  color: #c07a10;
}

.comparison-board > footer {
  padding-top: 14px;
}

.harbor-layout {
  display: grid;
  grid-template-columns: minmax(175px, 2fr) minmax(260px, 3fr) minmax(0, 7fr);
  gap: var(--gutter);
  padding-block: 36px 120px;
}

.job-column,
.trial-column {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - var(--header-height) - 48px);
}

.mobile-job-picker {
  display: none;
}

.eval-column-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 58px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.eval-column-heading h2 {
  margin-top: 7px;
  font-size: 22px;
}

.eval-column-heading > span {
  color: var(--text-muted);
  font-size: 10px;
}

.eval-scroll-list {
  height: calc(100vh - var(--header-height) - 130px);
  min-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.eval-virtual-inner {
  position: relative;
  width: 100%;
}

.job-row,
.trial-row {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: var(--text);
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.job-row:hover,
.job-row:focus-visible,
.job-row.is-selected,
.trial-row:hover,
.trial-row:focus-visible,
.trial-row.is-selected {
  background: var(--surface-subtle);
}

.job-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 76px;
  padding: 12px 42px 12px 0;
}

.eval-row-meta {
  display: flex;
  gap: 8px;
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.job-row > strong {
  overflow: hidden;
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-score {
  position: absolute;
  right: 5px;
  top: 50%;
  font-size: 10px;
  transform: translateY(-50%);
}

.trial-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 12px;
  gap: 9px;
  align-items: center;
  min-height: 82px;
  padding: 12px 5px 12px 0;
}

.trial-status {
  display: grid;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 50%;
  place-items: center;
}

.trial-status svg {
  width: 9px;
  height: 9px;
}

.trial-row.passed .trial-status,
.eval-detail-header.passed .eyebrow,
.verifier-test.passed > span:first-child,
.trajectory-result .passed {
  color: var(--positive);
}

.trial-row.failed .trial-status,
.eval-detail-header.failed .eyebrow,
.verifier-test.failed > span:first-child,
.trajectory-result .failed {
  color: var(--negative);
}

.trial-row.error .trial-status,
.eval-detail-header.error .eyebrow {
  color: #c07a10;
}

.trial-row-copy {
  min-width: 0;
}

.trial-row-copy strong,
.trial-row-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trial-row-copy strong {
  font-family: "Paradigm Serif", Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.trial-row-copy small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 9px;
}

.trial-reward {
  color: var(--text-muted);
  font-size: 10px;
}

.trial-row > svg {
  width: 11px;
  height: 11px;
  color: var(--text-muted);
}

.eval-detail {
  min-width: 0;
}

.eval-detail-header {
  position: relative;
  min-height: 178px;
  padding: 20px 24px 24px;
  background: var(--surface-subtle);
}

.eval-detail-header h2 {
  max-width: 720px;
  margin-top: 25px;
  font-size: clamp(32px, 3.5vw, 58px);
  line-height: 0.94;
}

.eval-detail-header > p:last-of-type {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 10px;
}

.eval-detail-duration {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 10px;
}

.eval-tabs button:last-child {
  margin-right: auto;
}

.eval-detail-loading {
  display: grid;
  min-height: 380px;
  color: var(--text-muted);
  place-items: center;
}

.eval-overview,
.verifier-view,
.trajectory-view {
  margin-top: 20px;
}

.eval-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface-subtle);
}

.eval-metrics-grid > div {
  min-width: 0;
  min-height: 108px;
  padding: 16px;
  border-right: 1px solid var(--border-soft);
}

.eval-metrics-grid > div:last-child {
  border-right: 0;
}

.eval-metrics-grid svg {
  width: 13px;
  height: 13px;
  margin-bottom: 23px;
  color: var(--text-muted);
}

.eval-metrics-grid span,
.eval-metrics-grid strong {
  display: block;
}

.eval-metrics-grid span {
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.eval-metrics-grid strong {
  margin-top: 6px;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-section,
.eval-text-record {
  margin-top: 38px;
}

.phase-bar {
  display: flex;
  width: 100%;
  height: 22px;
  margin-top: 14px;
  overflow: hidden;
  background: var(--surface-subtle);
}

.phase-bar span:nth-child(1),
.phase-legend i[data-phase="0"] {
  background: var(--grey-400);
}

.phase-bar span:nth-child(2),
.phase-legend i[data-phase="1"] {
  background: var(--grey-600);
}

.phase-bar span:nth-child(3),
.phase-legend i[data-phase="2"] {
  background: var(--blue);
}

.phase-bar span:nth-child(4),
.phase-legend i[data-phase="3"] {
  background: var(--positive);
}

.phase-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 10px;
}

.phase-legend > div {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  font-size: 9px;
}

.phase-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.phase-legend span {
  color: var(--text-muted);
}

.phase-legend strong {
  font-weight: 400;
}

.eval-text-record pre {
  max-height: 300px;
  margin-top: 12px;
  padding: 18px;
  overflow: auto;
  color: var(--text-muted);
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
  background: var(--surface-subtle);
}

.verifier-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: var(--surface-subtle);
}

.verifier-summary > svg {
  width: 28px;
  height: 28px;
  color: var(--positive);
}

.verifier-summary h3,
.trajectory-heading h3 {
  margin-top: 7px;
  font-size: 25px;
}

.verifier-tests {
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.verifier-test {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.verifier-test svg {
  width: 11px;
  height: 11px;
}

.verifier-test strong,
.verifier-test small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verifier-test strong {
  font-size: 10px;
  font-weight: 400;
}

.verifier-test small,
.verifier-test > span:last-child {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 9px;
}

.trajectory-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 22px 24px;
  background: var(--surface-subtle);
}

.trajectory-heading > p {
  max-width: 340px;
  color: var(--text-muted);
  font-size: 9px;
  text-align: right;
}

.trajectory-list {
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.trajectory-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.trajectory-index,
.trajectory-tool,
.trajectory-step small,
.trajectory-result {
  color: var(--text-muted);
  font-size: 9px;
}

.trajectory-step > div:nth-child(2) {
  min-width: 0;
}

.trajectory-tool {
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.trajectory-step strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trajectory-step small {
  display: block;
  margin-top: 5px;
}

.trajectory-result {
  text-align: right;
}

.trajectory-result span,
.trajectory-result small {
  display: block;
}

@media (max-width: 1359px) {
  :root {
    --page-margin: 24px;
    --gutter: 24px;
  }

  .harbor-layout {
    grid-template-columns: minmax(250px, 4fr) minmax(0, 8fr);
  }

  .job-column {
    display: none;
  }

  .eval-hero-copy {
    grid-column: 1 / span 7;
  }

  .gate-score {
    grid-column: 8 / -1;
  }
}

@media (max-width: 1023px) {
  :root {
    --radius-medium: 14px;
  }

  body {
    font-size: 13px;
  }

  .button,
  .text-action {
    min-height: 34px;
  }

  .code-browser {
    grid-template-columns: minmax(230px, 4fr) minmax(0, 8fr);
  }
}

@media (max-width: 740px) {
  :root {
    --page-margin: 16px;
    --gutter: 16px;
    --mobile-header-height: calc(92px + env(safe-area-inset-top));
  }

  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: 48px 44px;
    gap: 0 8px;
    height: var(--mobile-header-height);
    flex-basis: var(--mobile-header-height);
    padding-top: env(safe-area-inset-top);
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .wordmark {
    display: flex;
    grid-row: 1;
    min-height: 44px;
    align-items: center;
    font-size: 18px;
  }

  .header-center {
    grid-row: 2;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    justify-self: start;
    margin-left: 0;
    scrollbar-width: none;
  }

  .header-center::-webkit-scrollbar {
    display: none;
  }

  .surface-switch {
    flex: 0 0 auto;
    min-width: 100%;
  }

  .surface-switch button {
    min-height: 34px;
    padding-inline: 8px;
    font-size: 10px;
    white-space: nowrap;
  }

  .surface-switch button span {
    display: none;
  }

  .text-action > span:not(.keycap),
  .text-action .keycap,
  .header-propose span {
    display: none;
  }

  .header-propose {
    display: none;
  }

  .header-actions .text-action {
    width: 36px;
    min-height: 36px;
    justify-content: center;
    padding: 0;
  }

  .header-actions {
    grid-row: 1;
    grid-column: 2;
  }

  .home-page {
    align-items: flex-start;
    min-height: calc(100svh - var(--mobile-header-height));
    padding: 28px 18px max(48px, calc(30px + env(safe-area-inset-bottom)));
    background: var(--surface);
  }

  .home-article {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .home-intro h1 {
    font-size: clamp(28px, 8vw, 32px);
    line-height: 1.02;
  }

  .home-progress {
    margin-top: 10px;
    padding: 0;
  }

  .home-progress-section {
    margin-top: 30px;
  }

  .home-progress-chart {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
  }

  .home-progress-metric {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 8px;
  }

  .home-progress-bar-line {
    margin-right: 66px;
  }

  .home-copy {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-top: 18px;
  }

  .home-copy h2,
  .home-release-section h2,
  .home-progress-section > h2 {
    font-size: 22px;
  }

  .requests-empty {
    min-height: calc(100svh - var(--mobile-header-height));
    padding-top: 52px;
    padding-bottom: max(52px, calc(28px + env(safe-area-inset-bottom)));
  }

  .requests-empty h1 {
    font-size: clamp(48px, 18vw, 72px);
  }

  .eval-hero {
    display: block;
    padding-top: 50px;
  }

  .eval-hero-copy h1 {
    font-size: clamp(64px, 24vw, 100px);
  }

  .gate-score {
    min-height: 0;
    margin-top: 40px;
    padding: 18px;
  }

  .gate-score > strong {
    font-size: 64px;
  }

  .eval-strip {
    grid-template-columns: 1fr 1fr;
    margin-top: 34px;
  }

  .comparison-board {
    padding-top: 44px;
  }

  .comparison-board > header {
    display: block;
  }

  .comparison-board > header > p {
    margin-top: 12px;
  }

  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr,
  .comparison-table th,
  .comparison-table td {
    display: block;
  }

  .comparison-table thead {
    display: none;
  }

  .comparison-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .comparison-table th,
  .comparison-table td,
  .comparison-table th:first-child,
  .comparison-table td:first-child {
    width: auto;
    padding: 0;
    border: 0;
  }

  .comparison-table td::before {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 9px;
    text-transform: uppercase;
  }

  .comparison-table td:nth-of-type(1)::before {
    content: "Codex";
  }

  .comparison-table td:nth-of-type(2)::before {
    content: "NanoCodex";
  }

  .comparison-table tbody th {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
  }

  .comparison-result {
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .eval-strip > div,
  .eval-strip > div:first-child,
  .eval-strip > div:last-child {
    min-height: 54px;
    padding: 12px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }

  .harbor-layout {
    display: block;
    padding-top: 24px;
    padding-bottom: max(90px, calc(60px + env(safe-area-inset-bottom)));
  }

  .mobile-job-picker {
    display: grid;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
  }

  .mobile-job-picker select {
    width: 100%;
    min-height: 46px;
    padding: 0 38px 0 12px;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    text-transform: none;
    background: var(--surface-subtle);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-small);
  }

  .trial-column {
    position: relative;
    top: 0;
    max-height: none;
  }

  .trial-column .eval-scroll-list {
    height: 42vh;
    min-height: 320px;
  }

  .eval-detail {
    margin-top: 36px;
  }

  .eval-detail-header {
    padding-inline: 16px;
  }

  .eval-detail-header h2 {
    margin-top: 46px;
    font-size: 36px;
    overflow-wrap: anywhere;
  }

  .eval-detail-header > p:last-of-type {
    overflow-wrap: anywhere;
  }

  .eval-detail-duration {
    top: 46px;
    right: auto;
    left: 16px;
  }

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

  .eval-metrics-grid > div:nth-child(2) {
    border-right: 0;
  }

  .eval-metrics-grid > div {
    min-height: 98px;
    border-bottom: 1px solid var(--border-soft);
  }

  .eval-metrics-grid strong {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .eval-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .eval-tabs::-webkit-scrollbar {
    display: none;
  }

  .eval-tabs button {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .phase-legend {
    grid-template-columns: 1fr 1fr;
  }

  .trajectory-heading {
    display: block;
    padding: 18px;
  }

  .trajectory-heading > p {
    margin-top: 12px;
    text-align: left;
  }

  .trajectory-step {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .trajectory-step strong,
  .trajectory-step small {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .trajectory-result {
    grid-column: 2;
    display: flex;
    gap: 10px;
    text-align: left;
  }

  .overlay {
    align-items: flex-start;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .search-dialog {
    max-height: calc(100dvh - 24px);
    margin-top: 0;
    overflow: auto;
  }

  .search-field {
    grid-template-columns: 18px minmax(0, 1fr) 36px;
  }

  .search-field button,
  .dialog-close {
    width: 36px;
    height: 36px;
  }

  .search-field input,
  .proposal-dialog label input {
    font-size: 16px;
  }

  .search-result {
    grid-template-columns: 58px minmax(0, 1fr) 14px;
    min-height: 42px;
  }

  .search-result > small {
    display: none;
  }

  .proposal-dialog {
    max-height: calc(100dvh - 24px);
    padding: 22px 18px;
    overflow: auto;
  }

  .proposal-submit {
    min-height: 44px;
  }

  .proposal-dialog > h2 {
    font-size: 38px;
  }

  .proposal-summary {
    grid-template-columns: 1fr 1fr;
  }

  .proposal-summary > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Compact full-height workspaces for Code and Commits. */
.surface-code,
.surface-commits {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.surface-code > main,
.surface-commits > main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.code-workspace,
.commits-workspace {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.code-workspace {
  position: relative;
  grid-template-columns: 320px minmax(0, 1fr);
}

.commits-workspace {
  position: relative;
  grid-template-columns: 320px minmax(0, 1fr);
  grid-template-rows: 44px minmax(0, 1fr);
  grid-template-areas:
    "sidebar header"
    "sidebar viewer";
  overscroll-behavior: contain;
  contain: strict;
}

.code-file-frame {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  background: var(--surface-subtle);
  border: 0;
  border-radius: 0;
}

.code-file-search {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 26px;
  padding: 0 7px;
  color: var(--text-muted);
  font-size: 10px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
  cursor: pointer;
}

.code-file-search:hover,
.code-file-search:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
}

.code-file-search svg {
  width: 11px;
  height: 11px;
}

.code-file-search kbd {
  color: var(--text-faint);
  font: inherit;
}

.file-search-dialog {
  width: min(100%, 720px);
}

.file-search-result {
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr) 14px;
  min-height: 38px;
}

.file-search-result.is-active {
  background: var(--surface-subtle);
}

.file-search-result > strong,
.file-search-result > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-search-result > small {
  text-align: left;
}

.mobile-tree-toggle,
.workspace-backdrop {
  display: none;
}

.commit-sidebar {
  grid-area: sidebar;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-subtle);
  border-right: 1px solid var(--border-soft);
}

.commit-sidebar-header {
  display: flex;
  flex: 0 0 62px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}

.commit-sidebar-header > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.commit-sidebar-header strong {
  font-size: 12px;
  font-weight: 500;
}

.commit-sidebar-header > div > span {
  display: flex;
  gap: 5px;
  align-items: center;
  color: var(--text-muted);
  font-size: 9px;
}

.commit-sidebar-header > div > span svg {
  width: 10px;
  height: 10px;
}

.commit-sidebar-header .icon-button {
  position: relative;
  display: flex;
  gap: 5px;
  width: auto;
  padding-inline: 8px;
  background: var(--surface-raised);
}

.commit-sidebar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.mobile-drawer-close {
  display: none;
}

.commit-sidebar-header kbd {
  color: var(--text-muted);
  font: inherit;
  font-size: 9px;
}

.commit-scope-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-soft);
  scrollbar-width: none;
}

.commit-scope-tabs button {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  align-items: center;
  min-height: 26px;
  padding: 0 7px;
  color: var(--text-muted);
  background: transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.commit-scope-tabs button:hover,
.commit-scope-tabs button:focus-visible,
.commit-scope-tabs button.is-active {
  color: var(--text);
  background: var(--surface-raised);
}

.commit-scope-tabs button span {
  font-size: 9px;
}

.commit-query {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
  font-size: 9px;
}

.commit-query span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commit-query button {
  padding: 4px;
  background: transparent;
  cursor: pointer;
}

.commit-query svg {
  width: 11px;
  height: 11px;
}

.commit-list {
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.commit-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-height: 108px;
  padding: 14px 34px 14px 12px;
  color: var(--text);
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}

.commit-row:hover,
.commit-row:focus-visible {
  background: var(--surface-hover);
}

.commit-row.is-selected {
  background: var(--surface-raised);
  box-shadow: inset 2px 0 0 var(--text);
}

.commit-meta {
  display: flex;
  gap: 10px;
  color: var(--text-muted);
  font-size: 10px;
}

.commit-row strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.commit-row:hover strong,
.commit-row:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.commit-byline {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commit-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  transform: translateY(-50%);
}

.empty-state {
  padding: 20px 12px;
  color: var(--text-muted);
}

.empty-state button {
  padding: 8px 0;
  color: var(--text);
  text-decoration: underline;
  background: transparent;
  cursor: pointer;
}

.commit-stream-toolbar {
  grid-area: header;
  position: relative;
  z-index: 10;
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-soft);
  contain: layout paint;
}

.commit-stream-toolbar > div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.commit-stream-toolbar strong {
  font-size: 11px;
  font-weight: 500;
}

.commit-stream-toolbar span {
  color: var(--text-muted);
  font-size: 9px;
}

.commit-view-controls {
  margin-left: auto;
}

.commit-view-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
  list-style: none;
  place-items: center;
}

.commit-view-button::-webkit-details-marker {
  display: none;
}

.commit-view-button:hover,
.commit-view-button:focus-visible,
.commit-view-button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface-hover);
}

.commit-view-button svg {
  width: 14px;
  height: 14px;
}

.commit-display-menu {
  z-index: 50;
  display: grid;
  width: 232px;
  margin: 0;
  padding: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow-overlay);
  color: var(--text);
  outline: none;
}

.commit-display-menu-item,
.commit-setting-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.commit-display-menu-item {
  min-height: 32px;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-small);
  outline: none;
}

.commit-display-menu-item[data-highlighted] {
  background: var(--surface-hover);
}

.commit-setting-row {
  width: 100%;
  padding: 6px 8px;
  cursor: pointer;
}

.commit-display-menu span {
  color: var(--text);
  font-size: 11px;
}

.commit-switch {
  display: inline-flex;
  width: 24px;
  height: 16px;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px;
  background: var(--border);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease;
}

.commit-switch[data-state="checked"] {
  background: var(--text);
}

.commit-switch-thumb {
  display: block;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 18%);
  transform: translateX(0);
  transition: transform 120ms ease;
}

.commit-switch-thumb[data-state="checked"] {
  transform: translateX(8px);
}

.commit-indicator-row {
  padding: 4px 8px;
}

.commit-indicator-options {
  display: flex;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-small);
}

.commit-indicator-options button {
  width: 42px;
  height: 28px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  text-transform: capitalize;
}

.commit-indicator-options button + button {
  border-left: 1px solid var(--border-soft);
}

.commit-indicator-options button.is-active {
  color: var(--text);
  background: var(--surface-subtle);
}

.code-view {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  contain: strict;
  overflow-anchor: none;
  will-change: scroll-position;
}

.cv-scrollbar {
  --cv-scrollbar-thumb-bg: light-dark(
    color-mix(in lab, var(--surface-subtle) 85%, black),
    color-mix(in lab, var(--surface-subtle) 80%, white)
  );
  scrollbar-gutter: stable;
}

.cv-scrollbar::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.cv-scrollbar::-webkit-scrollbar-track {
  margin-top: -1px;
  background: transparent;
  border-left: 1px solid var(--border-soft);
}

.cv-scrollbar::-webkit-scrollbar-thumb {
  background-color: var(--cv-scrollbar-thumb-bg);
  background-clip: content-box;
  border: 2px solid transparent;
  border-radius: 6px;
}

@supports (-moz-appearance: none) {
  .cv-scrollbar {
    scrollbar-color: var(--cv-scrollbar-thumb-bg) transparent;
  }
}

.code-view diffs-container {
  overflow: clip;
  contain: layout paint style;
  box-shadow:
    0 -1px 0 var(--border-soft),
    0 1px 0 var(--border-soft);
}

.commit-stream {
  grid-area: viewer;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 0%;
}

.diff-collapse-button {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.diff-collapse-button:hover,
.diff-collapse-button:focus-visible {
  color: var(--text);
  background: var(--surface-hover);
}

.diff-collapse-button:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.diff-collapse-button svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.diff-collapse-button svg.is-collapsed {
  transform: rotate(-90deg);
}

.commit-stream-error {
  grid-area: viewer;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text-muted);
}

.commit-stream-error button {
  padding: 7px 10px;
  color: var(--text);
  background: var(--surface-raised);
  border-radius: var(--radius-small);
  cursor: pointer;
}

@media (max-width: 767px) {
  .commit-stream-toolbar {
    padding-inline: 8px 12px;
  }

  .commit-stream-toolbar .commit-order {
    display: none;
  }
}

@media (max-width: 740px) {
  .surface-code .header-actions,
  .surface-commits .header-actions {
    display: none;
  }

  .surface-code .site-header,
  .surface-commits .site-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .code-workspace {
    display: block;
  }

  .commit-sidebar {
    position: absolute;
    z-index: 22;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 88vw);
    max-height: none;
    border-right: 1px solid var(--border);
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.14);
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-105%);
    transition: transform 160ms ease, visibility 0s linear 160ms;
  }

  .code-tree-panel {
    position: absolute;
    z-index: 22;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(320px, 88vw);
    max-height: none;
    border-right: 1px solid var(--border);
    border-radius: 0;
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.14);
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-105%);
    transition: transform 160ms ease, visibility 0s linear 160ms;
  }

  .code-tree-panel.is-mobile-open,
  .commit-sidebar.is-mobile-open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition-delay: 0s;
  }

  .code-workspace > .workspace-backdrop,
  .commits-workspace > .workspace-backdrop {
    position: absolute;
    z-index: 21;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
  }

  .code-workspace > .workspace-backdrop.is-visible,
  .commits-workspace > .workspace-backdrop.is-visible {
    display: block;
  }

  .pierre-tree-heading button {
    display: grid;
    width: 36px;
    height: 36px;
  }

  .pierre-tree-heading .tree-search-trigger {
    display: inline-flex;
  }

  .mobile-tree-toggle {
    display: grid;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--surface-subtle);
    border-radius: var(--radius-small);
    cursor: pointer;
    place-items: center;
  }

  .mobile-tree-toggle svg {
    width: 13px;
    height: 13px;
  }

  .commit-sidebar-header .icon-button,
  .commit-scope-tabs button {
    min-height: 36px;
  }

  .mobile-drawer-close {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--surface-raised);
    border-radius: var(--radius-small);
    cursor: pointer;
    place-items: center;
  }

  .mobile-drawer-close svg {
    width: 13px;
    height: 13px;
  }

  .code-file {
    width: 100%;
    height: 100%;
  }

  .code-file-header {
    gap: 8px;
    padding-inline: 8px;
  }

  .code-file-search span,
  .code-file-search kbd,
  .code-file-meta > span:last-child {
    display: none;
  }

  .code-file-search {
    justify-content: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
  }

  .file-search-result {
    grid-template-columns: minmax(0, 1fr) 14px;
  }

}

@media (max-width: 740px) {
  .site-header {
    flex-basis: var(--mobile-header-height);
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }
}

@media (max-width: 420px) {
  .site-header {
    gap: 0 6px;
    padding-right: max(8px, env(safe-area-inset-right));
    padding-left: max(8px, env(safe-area-inset-left));
  }

  .wordmark {
    gap: 5px;
    font-size: 17px;
  }

  .wordmark span {
    font-size: 8px;
  }

  .surface-switch button {
    padding-inline: 6px;
    font-size: 9px;
  }

  .home-page {
    padding: 24px 16px max(42px, calc(26px + env(safe-area-inset-bottom)));
  }

  .home-intro h1 {
    font-size: 28px;
  }

  .home-intro > p:last-child {
    line-height: 1.5;
  }

  .home-progress-section {
    margin-top: 26px;
  }

  .home-progress-metric {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .home-progress-metric-heading {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
  }

  .home-progress-metric-heading small {
    white-space: nowrap;
  }

  .home-progress-bar-line {
    margin-right: 60px;
  }

  .home-progress-legend {
    margin-top: 9px;
  }

  .home-copy {
    gap: 24px;
  }

  .home-release-section {
    padding: 15px;
  }

  .home-release-heading {
    align-items: flex-start;
  }

  .home-release-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-install-command code {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
