@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;

  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-muted: #f6f8fa;
  --color-border: #d4dae2;
  --color-text: #203b4f;
  --color-text-muted: #5d6b75;
  --color-field: #ffffff;
  --color-field-border: #72838f;
  --color-accent: #005ff9;
  --color-accent-hover: #0054bc;
  --color-accent-pressed: #003f8f;
  --color-accent-contrast: #ffffff;
  --color-focus: #0076ff;
  --color-danger: #b3261e;
  --color-danger-text: #b3261e;
  --color-add-bg: #e9f5ee;
  --color-add-text: #1a5e3a;
  --color-del-bg: #fbeaea;
  --color-del-text: #8c1d18;
  --color-backdrop: rgb(32 59 79 / 0.4);

  --font-sans: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-md: 0.9375rem;
  --font-size-xl: 1.5rem;
  --line-height: 1.6;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  --radius-sm: 2px;

  --gutter: 1.5rem;
  --header-height: 3rem;
  --row-height: 2.75rem;
  --sidebar-width: 15rem;
  --content-width: 70rem;
  --doc-gutter: 3.5rem;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height);
  font-synthesis: small-caps;
  font-variant-numeric: tabular-nums;
  font-variant-ligatures: none;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1,
h2,
p {
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 2rem;
  letter-spacing: -0.01em;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration: underline;
}

a:active {
  color: var(--color-accent-pressed);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-text);
  color: var(--color-bg);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

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

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

.mono {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

.ver {
  font-family: var(--font-mono);
  font-weight: 500;
}

.label,
.caption,
.ledger thead th,
.ledger-prompts td[data-label]::before,
.meta dt,
.spec dt {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 500;
  line-height: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.caption {
  margin-bottom: var(--space-3);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-height);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--color-border);
}

.brand {
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-user {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}

.site-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-accent);
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.link-button:active {
  color: var(--color-accent-pressed);
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  text-decoration: underline var(--color-border);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  cursor: pointer;
}

.text-button:hover {
  text-decoration-color: var(--color-field-border);
}

.shell--nav {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--header-height));
}

.main {
  padding: var(--space-8) var(--space-8) var(--space-12);
}

.shell--nav .main {
  max-width: calc(var(--content-width) + 2 * var(--space-8));
  border-left: 1px solid var(--color-border);
}

.index {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  padding: var(--space-6) var(--space-4) var(--space-8) var(--gutter);
  overflow-y: auto;
}

.index-all,
.index-link {
  display: block;
  padding: var(--space-1) var(--space-3);
  border-left: 2px solid transparent;
  line-height: 1.5rem;
  overflow-wrap: anywhere;
}

.index-all[aria-current="page"],
.index-link[aria-current="page"] {
  border-left-color: var(--color-accent);
  color: var(--color-text);
  font-weight: 500;
}

.index-group {
  margin-top: var(--space-6);
}

.index-title {
  margin-bottom: var(--space-1);
  padding-left: calc(var(--space-3) + 2px);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 500;
  line-height: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.index-list {
  padding: 0;
  list-style: none;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  margin-bottom: var(--space-8);
}

.page-head-main {
  min-width: 0;
}

.crumbs {
  margin-bottom: var(--space-2);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  line-height: 1rem;
}

.crumbs a {
  text-decoration: underline;
}

.crumbs-sep {
  padding-inline: var(--space-1);
}

.page-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.block {
  margin-top: var(--space-8);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.page-head + .block,
.notice + .block {
  margin-top: 0;
}

.notice {
  margin-bottom: var(--space-6);
  padding: var(--space-1) 0 var(--space-1) var(--space-3);
  border-left: 2px solid var(--color-accent);
}

.notice--error {
  border-left-color: var(--color-danger);
}

.notice-title {
  font-weight: 500;
}

.notice--error .notice-title {
  color: var(--color-danger-text);
}

.empty {
  color: var(--color-text-muted);
}

.empty a {
  text-decoration: underline;
}

.empty-value {
  color: var(--color-text-muted);
}

.project + .project {
  margin-top: var(--space-8);
}

.table-scroll {
  position: relative;
  margin-inline: calc(var(--space-1) * -1);
  padding-inline: var(--space-1);
  overflow-x: auto;
  container-type: inline-size;
}

.ledger {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.ledger th,
.ledger td {
  height: var(--row-height);
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-weight: 400;
  text-align: left;
  vertical-align: middle;
}

.ledger thead th {
  height: 2.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  white-space: nowrap;
}

.ledger tbody th {
  position: relative;
}

.ledger tbody tr:hover > * {
  background: var(--color-surface-muted);
}

.ledger-prompts {
  min-width: 54rem;
  table-layout: fixed;
}

.ledger-prompts thead th:nth-child(1) {
  width: 34%;
}

.ledger-prompts thead th:nth-child(2) {
  width: 34%;
}

.ledger-prompts th,
.ledger-prompts td {
  padding-block: var(--space-3);
  vertical-align: top;
}

.ledger-prompts td p {
  line-height: 1.5rem;
}

.ledger-prompts td p > * {
  white-space: nowrap;
}

.ledger-prompts .cell-note {
  overflow: hidden;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-history {
  min-width: 56rem;
}

.ledger-history td {
  overflow-wrap: anywhere;
}

.ledger-history .cell-fit {
  white-space: nowrap;
}

.ledger-history .cell-comment {
  min-width: 14rem;
  color: var(--color-text-muted);
}

.ledger-history th:last-child,
.ledger-history .cell-actions {
  text-align: right;
}

.ledger-changes {
  max-width: 44rem;
}

.ledger-changes th,
.ledger-changes td {
  height: 2.25rem;
  padding-block: var(--space-1);
}

.ledger-changes thead th {
  height: 2rem;
}

.ledger-changes tbody th {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

.ledger-files th,
.ledger-files td {
  height: 2.25rem;
  padding-block: var(--space-1);
}

.ledger-files thead th {
  position: sticky;
  top: 0;
  height: 2rem;
}

.ledger-files td:first-child {
  overflow-wrap: anywhere;
}

.ledger-files th:last-child,
.ledger-files td:last-child {
  text-align: right;
  white-space: nowrap;
}

.ledger-files tbody tr:last-child > * {
  border-bottom: 0;
}

.change-old {
  color: var(--color-del-text);
}

.change-new {
  color: var(--color-add-text);
}

.act-summary > * + * {
  margin-top: var(--space-3);
}

.act-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.is-active > th:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -1px;
  left: 0;
  width: 2px;
  background: var(--color-accent);
}

.active-version {
  color: var(--color-accent);
  font-weight: 500;
}

.active-version::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: var(--space-2);
  background: var(--color-accent);
  vertical-align: middle;
}

.state-active {
  color: var(--color-accent);
  font-size: var(--font-size-md);
  font-weight: 600;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
}

.live {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5rem;
}

.block > .live,
.project > .live {
  margin-bottom: var(--space-3);
}

.live--stale {
  padding-left: var(--space-2);
  border-left: 2px solid var(--color-accent);
  color: var(--color-text);
}

.row-actions {
  display: grid;
  grid-template-columns: 5.75rem 4.75rem 6.25rem;
  align-items: center;
  justify-content: end;
  gap: var(--space-4);
  text-align: left;
  white-space: nowrap;
}

.row-actions .act-open,
.row-actions .state-active {
  grid-column: 3;
}

.row-actions .button {
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.25rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
}

.button--primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

.button--primary:hover {
  border-color: var(--color-accent-hover);
  background: var(--color-accent-hover);
  color: var(--color-accent-contrast);
}

.button--primary:active {
  border-color: var(--color-accent-pressed);
  background: var(--color-accent-pressed);
  color: var(--color-accent-contrast);
}

.button--outline {
  border-color: var(--color-text);
  background: var(--color-surface);
  color: var(--color-text);
}

.button--outline:hover,
.button--outline:active {
  background: var(--color-text);
  color: var(--color-bg);
}

.button--sm {
  min-height: 1.75rem;
  padding: 0 var(--space-3);
  font-size: var(--font-size-sm);
}

.spec {
  display: grid;
  grid-template-columns: repeat(6, auto);
  width: fit-content;
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
  background: var(--color-surface-muted);
}

.spec-item {
  padding: var(--space-2) var(--space-3);
}

.spec-item + .spec-item {
  border-left: 1px solid var(--color-border);
}

.spec dt {
  white-space: nowrap;
}

.spec dd {
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  font-weight: 500;
  line-height: 1.5rem;
}

.spec-version {
  color: var(--color-accent);
}

.doc {
  max-height: min(60vh, 36rem);
  overflow: auto;
  border: 1px solid var(--color-border);
  counter-reset: line;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  tab-size: 4;
}

.doc-line {
  position: relative;
  min-height: 1.6em;
  padding: 0 var(--space-4) 0 calc(var(--doc-gutter) + var(--space-4));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.doc-line::before {
  content: counter(line);
  counter-increment: line;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--doc-gutter);
  padding-right: var(--space-3);
  border-right: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
  text-align: right;
}

.doc-line:first-child {
  padding-top: var(--space-3);
}

.doc-line:first-child::before {
  padding-top: var(--space-3);
}

.doc-line:last-child {
  padding-bottom: var(--space-3);
}

.meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2) var(--space-8);
  margin-top: var(--space-4);
}

.meta dd {
  margin: 0;
  line-height: 1.5rem;
  overflow-wrap: anywhere;
}

.field {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  min-width: 0;
}

.control {
  width: 100%;
  min-height: 2.5rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-field);
  color: var(--color-text);
  line-height: 1.5rem;
}

.control::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.control:hover {
  border-color: var(--color-text);
}

.control[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.control--mono {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
}

.control--text {
  min-height: 12rem;
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  resize: vertical;
  tab-size: 4;
}

.control--number {
  appearance: textfield;
}

.control--number::-webkit-outer-spin-button,
.control--number::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.control--select {
  padding-right: 2.25rem;
  background-image: url("../img/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  appearance: none;
  text-overflow: ellipsis;
}

.field-hint {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.25rem;
}

.field-error {
  color: var(--color-danger-text);
  font-size: var(--font-size-sm);
  line-height: 1.25rem;
}

.form {
  display: grid;
  gap: var(--space-6);
}

.params {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-params {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.compare {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

.compare .field {
  min-width: 9rem;
}

.diff {
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  line-height: 1.5rem;
}

.diff-row {
  display: grid;
  grid-template-columns: 3.5rem 3.5rem 1.5rem minmax(0, 1fr);
}

.diff-row--hunk {
  display: block;
  padding: 0 var(--space-4);
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

.diff-row--add {
  background: var(--color-add-bg);
  color: var(--color-add-text);
}

.diff-row--del {
  background: var(--color-del-bg);
  color: var(--color-del-text);
}

.diff-n {
  padding-inline: var(--space-2);
  color: var(--color-text-muted);
  text-align: right;
}

.diff-n::before {
  content: attr(data-n);
}

.diff-sign {
  text-align: center;
}

.diff-row--add .diff-sign::before {
  content: "+";
}

.diff-row--del .diff-sign::before {
  content: "\2212";
}

.diff-text {
  padding-right: var(--space-4);
  text-decoration: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.modal {
  position: fixed;
  inset: 0;
  width: 44rem;
  height: fit-content;
  max-width: calc(100% - 2 * var(--gutter));
  max-height: min(40rem, 100% - 2 * var(--gutter));
  margin: auto;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
}

.modal[open] {
  display: flex;
  flex-direction: column;
}

.modal::backdrop {
  background: var(--color-backdrop);
}

.modal-head {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: last baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-4);
}

.modal-head .label {
  margin-bottom: var(--space-1);
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  line-height: 2rem;
  letter-spacing: -0.01em;
}

.modal-meta {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.modal-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-body:focus-visible {
  outline-offset: -2px;
}

.modal-foot {
  display: flex;
  flex: none;
  justify-content: flex-end;
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border);
}

@media (prefers-reduced-motion: no-preference) {
  .modal[open],
  .modal[open]::backdrop {
    animation: fade-in 120ms ease-out;
  }

  .text-button {
    transition: text-decoration-color 120ms ease-out;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (width < 1200px) {
  .form-params {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (width < 900px) {
  :root {
    --gutter: 1rem;
  }

  .shell--nav {
    display: block;
  }

  .shell--nav .main {
    max-width: none;
    border-left: 0;
  }

  .main {
    padding: var(--space-6) var(--gutter) var(--space-12);
  }

  .index {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: var(--space-6);
    max-height: none;
    padding: 0 var(--gutter);
    overflow: auto hidden;
    border-bottom: 1px solid var(--color-border);
    scrollbar-width: none;
  }

  .index-group {
    display: flex;
    flex: none;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
  }

  .index-title {
    margin: 0;
    padding: 0;
    white-space: nowrap;
  }

  .index-list {
    display: flex;
  }

  .index-all,
  .index-link {
    display: flex;
    flex: none;
    align-items: center;
    height: var(--row-height);
    padding: 0 var(--space-3);
    border-bottom: 2px solid transparent;
    border-left: 0;
    white-space: nowrap;
  }

  .index-all[aria-current="page"],
  .index-link[aria-current="page"] {
    border-bottom-color: var(--color-accent);
  }

  .index-all:focus-visible,
  .index-link:focus-visible {
    outline-offset: -2px;
  }

  .page-head {
    margin-bottom: var(--space-6);
  }

  .block {
    margin-top: var(--space-6);
  }

  .meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-user-name {
    max-width: 8rem;
  }

  .form-actions .button {
    flex: 1 1 auto;
  }

  .doc {
    max-height: 50vh;
  }

  .control--text {
    max-height: 70svh;
  }
}

@media (width < 600px) {
  .form-params {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec {
    grid-template-columns: repeat(3, auto);
    width: auto;
  }

  .spec-item {
    padding-inline: var(--space-2);
  }

  .spec-item:nth-child(3n + 1) {
    border-left: 0;
  }

  .spec-item:nth-child(n + 4) {
    border-top: 1px solid var(--color-border);
  }
}

@container (width < 54rem) {
  .ledger-prompts {
    min-width: 0;
  }

  .ledger-prompts thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .ledger-prompts,
  .ledger-prompts tbody {
    display: block;
  }

  .ledger-prompts tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
  }

  .ledger-prompts tbody tr:hover {
    background: var(--color-surface-muted);
  }

  .ledger-prompts tbody tr:hover > * {
    background: transparent;
  }

  .ledger-prompts th,
  .ledger-prompts td {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
  }

  .ledger-prompts td[data-label]::before {
    content: attr(data-label);
    display: block;
  }
}

@container (width < 56rem) {
  .ledger-history {
    min-width: 0;
  }

  .ledger-history thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .ledger-history,
  .ledger-history tbody {
    display: block;
  }

  .ledger-history tr {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--space-1) var(--space-3);
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
  }

  .ledger-history tr.is-active {
    padding-left: calc(var(--space-3) - 2px);
    border-left: 2px solid var(--color-accent);
  }

  .ledger-history tbody tr:hover {
    background: var(--color-surface-muted);
  }

  .ledger-history tbody tr:hover > * {
    background: transparent;
  }

  .ledger-history th,
  .ledger-history td {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
  }

  .ledger-history td:nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  .ledger-history td:nth-child(2) {
    color: var(--color-text-muted);
  }

  .ledger-history .cell-comment {
    min-width: 0;
  }

  .ledger-history .cell-actions {
    margin-top: var(--space-2);
    text-align: left;
  }

  .ledger-history .row-actions {
    justify-content: start;
  }

  .ledger-history .is-active > th:first-child::before {
    content: none;
  }
}
