:root {
  color-scheme: light;
  --paper: #f8f7f3;
  --paper-strong: #fdfcf8;
  --sidebar: #eeeee9;
  --inspector: #f5f4ef;
  --ink: #202824;
  --muted: #6b746f;
  --subtle: #8b938e;
  --line: #dedfd9;
  --line-strong: #c3c8c1;
  --green: #285f4e;
  --green-dark: #18483a;
  --mint: #e2ece6;
  --amber: #b86a35;
  --amber-soft: #f7e9dc;
  --red: #a64b3f;
  --code: #14221d;
  --code-ink: #dcece4;
  --shadow: 0 16px 44px rgb(31 43 37 / 8%);
  --focus-ring: 0 0 0 2px rgb(40 95 78 / 18%);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --serif: Iowan Old Style, Charter, "Palatino Linotype", Palatino, Georgia,
    serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
}

.boot {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.boot-wordmark {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 680;
  letter-spacing: -0.03em;
  line-height: 1;
}

.workspace {
  --sidebar-width: 160px;
  --inspector-width: 340px;
  --active-inspector-width: var(--inspector-width);
  --dox-main-left-width: var(--sidebar-width);
  --dox-main-right-width: var(--active-inspector-width);
  --dox-document-left-inset: 40px;
  --dox-main-right-inset: 18px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  background: var(--paper);
}

.button {
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 6px 10px;
  background: var(--paper-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 640;
  line-height: 1.2;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.button:hover {
  border-color: #9fb2aa;
}

.button:focus-visible {
  border-color: #8da99e;
  outline: 0;
  box-shadow: var(--focus-ring);
}

.button.primary {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary-action {
  border-color: transparent;
  background: rgb(248 247 243 / 78%);
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.button.secondary-action:hover,
.button.secondary-action.active {
  border-color: var(--line);
  background: rgb(253 252 248 / 92%);
  color: var(--green-dark);
}

.button:disabled {
  opacity: 0.45;
  cursor: default;
}

.body-grid {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(420px, 1fr);
}

.workspace.document-context .body-grid {
  grid-template-columns:
    var(--sidebar-width) minmax(360px, 1fr)
    var(--active-inspector-width);
}

.workspace.inspector-expanded {
  --active-inspector-width: calc(100vw - var(--sidebar-width) - 280px);
}

.workspace.inspector-expanded .body-grid {
  grid-template-columns:
    var(--sidebar-width) minmax(240px, 1fr)
    var(--active-inspector-width);
}

.inspector {
  min-height: 0;
  overflow: auto;
  background: var(--inspector);
  scrollbar-width: thin;
  scrollbar-color: #a7ada8 transparent;
}

.sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 19px 0 0 8px;
  background: var(--sidebar);
  color: #34443d;
}

.sidebar-brand {
  margin: 0 11px 19px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 680;
  letter-spacing: -0.025em;
  line-height: 1;
}

.inspector {
  display: none;
  padding: 22px 20px 36px;
  color: #303a35;
  font-size: 12px;
  line-height: 1.45;
}

.pane-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 6;
  width: 9px;
  cursor: col-resize;
  touch-action: none;
}

.pane-resizer-left {
  left: calc(var(--sidebar-width) - 4px);
}

.pane-resizer-right {
  right: calc(var(--active-inspector-width) - 4px);
}

.pane-resizer::after {
  position: absolute;
  top: 50%;
  right: 4px;
  left: 4px;
  height: 38px;
  border-radius: 999px;
  content: "";
  background: transparent;
  transform: translateY(-50%);
  transition:
    right 100ms ease,
    left 100ms ease,
    background 100ms ease;
}

.pane-resizer:hover::after,
.pane-resizer:focus-visible::after {
  right: 3px;
  left: 3px;
  background: rgb(90 126 112 / 40%);
}

.pane-resizer:focus-visible {
  outline: 0;
}

.pane-resizer-right {
  display: none;
}

.workspace.document-context .pane-resizer-right {
  display: block;
}

.inspector-width-toggle {
  position: absolute;
  right: 9px;
  bottom: 9px;
  z-index: 7;
  display: none;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  padding: 0;
  background: rgb(248 247 243 / 72%);
  color: #818b85;
  cursor: pointer;
  font: 14px/1 var(--sans);
  backdrop-filter: blur(6px);
  transition: color 100ms ease, background-color 100ms ease;
}

.workspace.document-context .inspector-width-toggle {
  display: grid;
}

.inspector-width-toggle:hover,
.inspector-width-toggle:focus-visible,
.inspector-width-toggle[aria-pressed="true"] {
  background: rgb(253 252 248 / 92%);
  color: var(--green-dark);
}

.inspector-width-toggle:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.resizing-panes {
  cursor: col-resize;
  user-select: none;
}

.workspace.document-context .inspector {
  display: block;
}

.module-outline-host {
  min-height: 0;
  flex: 1;
  margin: 0;
}

.module-outline-host .cm-editor,
.module-outline-host .cm-scroller {
  height: 100%;
}

.cm-ySelection {
  border-radius: 2px;
  opacity: 0.28;
}

.cm-ySelectionCaret {
  border-left-width: 1.5px;
}

/* CodeMirror's editable-widget buffer inherits heading metrics and changes the line box. */
.workspace .cm-editor .cm-md-heading .cm-widgetBuffer:has(+ .cm-ySelectionCaret) {
  display: none;
}

.cm-ySelectionInfo {
  border-radius: 4px 4px 4px 0;
  padding: 2px 5px;
  font: 600 10px/1.25 var(--sans);
  transform: translate(-1px, -100%);
}

.sidebar-controls {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 2px;
  margin: 8px 10px 13px 5px;
}

.evaluation-engine-toggle,
.editing-mode-toggle {
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: 7px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  color: #66736d;
  background: transparent;
  font: 500 11px/1.2 var(--sans);
  cursor: pointer;
}

.evaluation-engine-toggle:hover,
.evaluation-engine-toggle:focus-visible,
.editing-mode-toggle:hover,
.editing-mode-toggle:focus-visible {
  color: #34443d;
  background: rgb(255 255 255 / 42%);
  outline: none;
}

.evaluation-engine-dot,
.editing-mode-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9ca6a1;
}

.evaluation-engine-toggle[aria-pressed="true"] .evaluation-engine-dot {
  background: #4f806b;
}

.editing-mode-toggle[aria-pressed="true"] .editing-mode-dot {
  background: #6682a2;
}

.module-context {
  display: grid;
  gap: 13px;
  transition: opacity 120ms ease;
}

.module-context.stale {
  opacity: 0.48;
}

.execution-panel {
  min-width: 0;
  display: grid;
  grid-template-columns:
    minmax(6ch, 0.9fr) 1ch minmax(4ch, 0.35fr)
    minmax(8ch, 1.35fr);
  column-gap: 5px;
  margin: -5px 0 19px;
  padding: 0 0 16px;
}

.execution-panel.activation-only {
  grid-template-columns:
    minmax(6ch, 0.9fr) 1ch minmax(4ch, 0.35fr)
    minmax(8ch, 1.35fr);
}

.execution-panel > * {
  grid-column: 1 / -1;
}

.execution-panel.stale > * {
  opacity: 0.42;
}

.execution-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--muted);
}

.execution-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  animation: execution-pulse 900ms ease-in-out infinite alternate;
}

@keyframes execution-pulse {
  to {
    opacity: 0.3;
    transform: scale(0.72);
  }
}

.execution-occurrence-heading {
  min-width: 0;
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
  column-gap: 5px;
  margin-bottom: 10px;
  padding: 0 8px;
  font: 11px/1.4 var(--mono);
}

.execution-occurrence-heading.activation-only .execution-activation-heading,
.execution-occurrences.activation-only .execution-occurrence-activation {
  grid-column: 1 / -1;
}

.execution-occurrences.activation-only
  .execution-occurrence.no-value
  .execution-choice-result {
  grid-column: 3;
}

.execution-occurrence-heading code {
  min-width: 0;
  overflow: hidden;
  color: #374a41;
  font: inherit;
  font-weight: 590;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-activation-heading {
  grid-column: 1 / 4;
}

.execution-arguments-heading {
  overflow: hidden;
  color: #87908b;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-heading-arrow {
  color: #a17a60;
  text-align: center;
}

.execution-result-heading {
  text-align: left;
}

.execution-expression-heading {
  grid-column: 4;
  min-width: 0;
  display: flex;
  align-items: baseline;
  padding-left: 8px;
}

.execution-expression-heading code {
  color: #8b5938;
}

.execution-runtime-neutral {
  color: inherit;
}

.execution-runtime-shape {
  color: #737f79;
}

.execution-runtime-literal {
  color: #955f3f;
}

.execution-runtime-constructor {
  color: #3f6d59;
}

.execution-runtime-variable {
  color: #476d87;
}

.execution-occurrences {
  display: grid;
  grid-template-columns: subgrid;
  column-gap: 5px;
  row-gap: 4px;
}

.execution-occurrence {
  min-width: 0;
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
  column-gap: 5px;
  border-radius: 7px;
  padding: 2px 3px;
  transition: background-color 120ms ease;
}

.execution-occurrence:hover {
  background: rgb(40 95 78 / 4%);
}

.execution-occurrence.selected {
  background: rgb(40 95 78 / 7.5%);
}

.execution-occurrence.program.selected {
  background: transparent;
}

.execution-occurrence-activation,
.execution-occurrence-value {
  min-width: 0;
  display: grid;
  grid-template-columns: subgrid;
  align-items: baseline;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  padding: 3px 5px;
  background: transparent;
  color: #526159;
  cursor: pointer;
  font: 11.25px/1.45 var(--mono);
  text-align: left;
  white-space: nowrap;
}

.execution-occurrence-activation {
  grid-column: 1 / 4;
}

.execution-occurrence.no-value .execution-occurrence-activation {
  grid-column: 1 / -1;
}

.execution-occurrence-activation:hover {
  color: #283c33;
}

.execution-occurrence-value:hover {
  background: rgb(184 106 53 / 5%);
  color: #744425;
}

.execution-occurrence-activation:focus-visible,
.execution-occurrence-value:focus-visible {
  outline: 0;
  background: rgb(40 95 78 / 6%);
  box-shadow: inset 0 0 0 1px rgb(40 95 78 / 18%);
}

.execution-occurrence-value:focus-visible {
  background: rgb(184 106 53 / 7%);
  box-shadow: inset 0 0 0 1px rgb(184 106 53 / 18%);
}

.execution-occurrence-value {
  grid-column: 4;
  display: block;
  border-radius: 5px;
  padding: 3px 6px 3px 8px;
  color: #8b5938;
}

.execution-occurrence-value code {
  display: block;
  width: 100%;
}

.execution-occurrence-status {
  grid-column: 1 / -1;
  padding: 1px 6px 3px;
  color: #858f89;
  font: 9.5px/1.45 var(--mono);
}

.execution-choice-inputs {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  text-align: right;
}

.execution-choice-arrow,
.execution-heading-arrow {
  width: 1ch;
}

.execution-choice-result {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  overflow: hidden;
}

.execution-occurrence.no-value .execution-choice-result {
  grid-column: 3 / 5;
}

.execution-choice-inputs code,
.execution-occurrence-outcome,
.execution-occurrence-value code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-choice-separator {
  color: #8b938e;
}

.execution-occurrence code {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-choice-arrow {
  flex: 0 0 auto;
  color: #9a6847;
}

.execution-occurrence-outcome {
  color: #3e554a;
}

.execution-occurrence.selected .execution-occurrence-outcome {
  color: #253d32;
}

.execution-occurrence-value[aria-current="true"] {
  background: rgb(184 106 53 / 8%);
  color: #744425;
}

.execution-choice-arrow.raised,
.execution-occurrence .raised {
  color: var(--red) !important;
}

.execution-value-lens {
  position: fixed;
  z-index: 30;
  max-width: min(560px, calc(100vw - 24px));
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid rgb(52 75 65 / 13%);
  border-radius: 7px;
  padding: 7px 9px;
  background: rgb(253 252 248 / 97%);
  box-shadow: 0 8px 24px rgb(36 48 42 / 10%), 0 1px 3px rgb(36 48 42 / 7%);
  color: #4b5b53;
  scrollbar-width: thin;
}

.execution-value-lens[hidden] {
  display: none;
}

.execution-value-lens code {
  display: block;
  font: 11.25px/1.5 var(--mono);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: text;
}

.execution-value-lens-note {
  display: block;
  margin-top: 5px;
  color: #8b938e;
  font: 9.5px/1.3 var(--mono);
}

.execution-whole-trace {
  display: block;
}

.execution-trace-list {
  display: grid;
  gap: 1px;
}

.execution-trace-more {
  margin: 5px 5px 0;
  border: 0;
  padding: 3px 5px;
  background: transparent;
  color: #7d8983;
  font: 10.5px/1.4 var(--mono);
  cursor: pointer;
}

.execution-trace-more:hover,
.execution-trace-more:focus-visible {
  color: #315f4e;
}

.execution-trace-more:focus-visible {
  outline: 1px solid rgb(40 95 78 / 20%);
  outline-offset: 1px;
}

.execution-trace-row {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  padding: 3px 5px 3px calc(5px + var(--trace-indent));
  background: transparent;
  color: #526159;
  font: 11.25px/1.45 var(--mono);
  text-align: left;
  white-space: nowrap;
}

button.execution-trace-row {
  cursor: pointer;
}

button.execution-trace-row:hover {
  background: rgb(40 95 78 / 5%);
  color: #283c33;
}

button.execution-trace-row:focus-visible {
  outline: 0;
  background: rgb(40 95 78 / 6%);
  box-shadow: inset 0 0 0 1px rgb(40 95 78 / 18%);
}

.execution-trace-name {
  flex: none;
  color: #315f4e;
  font-weight: 620;
}

.execution-trace-inputs {
  min-width: 0;
  display: flex;
  overflow: hidden;
}

.execution-trace-inputs code,
.execution-trace-result,
.execution-trace-output code {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  text-overflow: ellipsis;
  white-space: pre;
}

.execution-trace-argument-gap,
.execution-trace-arrow {
  flex: none;
}

.execution-trace-arrow {
  color: #9a6847;
}

.execution-trace-result {
  color: #3e554a;
}

.execution-trace-output {
  color: #637069;
}

.execution-trace-output-marker {
  flex: none;
  width: 1ch;
  color: #9da6a1;
  text-align: center;
}

.execution-trace-output-label {
  flex: none;
  color: #7d8983;
}

.execution-trace-output-label::after {
  content: "·";
  margin-left: 5px;
  color: #adb4b0;
}

.execution-trace-output-type {
  flex: none;
  color: #8b938e;
  font-size: 0.9em;
}

.execution-trace-output-stderr,
.execution-trace-output-stderr .execution-trace-output-marker,
.execution-trace-row .raised {
  color: var(--red);
}

.execution-occurrence-index {
  flex: none;
  color: #87918b;
  font-size: 9.5px;
}

.execution-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9.5px;
}

.inspect-section.module-context h3 {
  margin-bottom: 1px;
  overflow-wrap: anywhere;
  color: #4f5b55;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.module-relations {
  display: grid;
  gap: 4px;
}

.module-relations > span {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 680;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.module-boundary {
  margin: -2px 0 0;
  color: var(--subtle);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
}

.module-compiler-error {
  margin-top: 10px;
  color: var(--red);
  font-size: 12px;
  line-height: 1.45;
}

.module-compiler-error p {
  margin: 0 0 6px;
}

.module-relations button {
  border: 0;
  border-radius: 6px;
  padding: 4px 6px;
  background: transparent;
  color: var(--green-dark);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.35;
  text-align: left;
}

.module-relations button:hover,
.module-relations button:focus-visible {
  background: var(--mint);
  outline: none;
}

.module-relations button:focus-visible {
  box-shadow: var(--focus-ring);
}

.mini-button {
  border: 0;
  border-radius: 6px;
  padding: 4px 7px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}

.mini-button:hover {
  background: var(--mint);
}

.pane-toggle {
  display: none;
}

.files-toggle {
  width: 29px;
  height: 29px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  padding: 0;
  background: transparent;
  color: #77817b;
  cursor: pointer;
  transition:
    color 120ms ease,
    background-color 120ms ease,
    transform 160ms ease;
}

.files-toggle:hover {
  background: rgb(32 40 36 / 5%);
  color: var(--ink);
}

.files-toggle:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.files-toggle-icon {
  position: relative;
  width: 15px;
  height: 13px;
  display: block;
  border: 1.25px solid currentColor;
  border-radius: 3px;
}

.files-toggle-icon::before {
  position: absolute;
  top: -1.25px;
  bottom: -1.25px;
  left: 4px;
  width: 1.25px;
  content: "";
  background: currentColor;
}

.file-button {
  width: 100%;
  display: block;
  align-items: start;
  border: 0;
  border-radius: 8px;
  padding: 8px 7px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.file-button:hover {
  background: #eeeee6;
}

.file-button.active {
  background: var(--mint);
  color: var(--green-dark);
}

.file-title {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-path {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outline {
  margin: 5px 0 12px 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.outline-details {
  margin: 3px 7px 14px;
  color: var(--muted);
  font-size: 10px;
}

.outline-details summary {
  cursor: pointer;
  user-select: none;
}

.outline button {
  width: 100%;
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  text-align: left;
}

.outline button:hover {
  color: var(--green);
}

.main {
  position: relative;
  min-height: 0;
  overflow: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #a7ada8 transparent;
}

.main::-webkit-scrollbar:horizontal {
  height: 0;
}

.main-actions {
  position: sticky;
  top: 0;
  z-index: 7;
  width: 100%;
  height: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 14px 18px 0;
  pointer-events: none;
}

.main-actions .button {
  pointer-events: auto;
}

.main-actions .secondary-action {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  backdrop-filter: none;
  box-shadow: none;
  transition: color 120ms ease;
}

.main-actions .secondary-action:hover {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.main-actions .secondary-action.active {
  border-color: transparent;
  background: transparent;
  color: var(--green-dark);
}

.main-actions .secondary-action.active:hover {
  color: var(--ink);
}

.main-actions .secondary-action:focus-visible {
  border-color: transparent;
  background: transparent;
  color: var(--green-dark);
  outline: none;
  box-shadow: none;
}

.document-shell {
  width: min(820px, calc(100% - 80px));
  margin: 45px auto 120px 40px;
}

.workspace.source-context .document-shell {
  width: min(1040px, calc(100% - 56px));
  margin-right: 28px;
  margin-left: 28px;
  margin-top: 28px;
}

.source-mode .literate-document-editor .cm-editor,
.source-mode .literate-document-editor .cm-scroller {
  font-family: var(--mono);
}

.prose-block {
  position: relative;
  padding: 2px 0;
  border-left: 2px solid transparent;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.64;
}

.prose-block:hover {
  border-left-color: #c8cec7;
  background: transparent;
}

.prose-block.selected {
  border-left-color: var(--amber);
}

.prose-block h1 {
  margin: 7px 0 21px;
  font-size: clamp(34px, 4.5vw, 50px);
  font-weight: 670;
  letter-spacing: -0.043em;
  line-height: 1;
}

.prose-block h2 {
  margin: 38px 0 11px;
  font-size: 25px;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.prose-block h3 {
  margin: 30px 0 8px;
  font-size: 19px;
}

.prose-block p {
  margin: 11px 0;
}

.prose-block ul {
  padding-left: 25px;
}

.prose-block code {
  border-radius: 4px;
  padding: 1px 4px;
  background: #ecece6;
  color: var(--green-dark);
  font-family: var(--mono);
  font-size: 0.82em;
}

.prose-block a {
  color: var(--green);
  text-decoration-color: #93b4a7;
  text-underline-offset: 3px;
}

.code-block {
  position: relative;
  margin: 22px 8px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  padding: 1px 0 2px 16px;
  background: transparent;
  box-shadow: none;
}

.code-block.selected {
  background: linear-gradient(90deg, rgb(213 120 44 / 5%), transparent 52%);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 0 5px;
  border: 0;
  color: #8a948e;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.code-name {
  color: #53645d;
  font-weight: 650;
}

.code-detail {
  margin-left: 7px;
  color: #9ba39f;
}

.code-block pre {
  margin: 0;
  overflow: auto;
  padding: 2px 28px 4px 0;
  color: #34443d;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  tab-size: 2;
}

.embedded-editor {
  min-width: 0;
}

.embedded-editor .cm-editor {
  min-width: 0;
}

.markdown-embedded-editor .cm-editor {
  font-family: var(--serif);
}

.code-embedded-editor .cm-editor,
.code-embedded-editor .cm-scroller {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
}

.code-embedded-editor .cm-line {
  padding-right: 28px;
  padding-left: 0;
}

.code-embedded-editor .cm-activeLine {
  background: transparent;
}

.code-embedded-editor .cm-focused .cm-activeLine {
  background: rgb(19 95 75 / 4%);
}

.embedded-editor .cm-tooltip {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.literate-document-editor {
  min-width: 0;
}

.literate-document-editor .cm-editor {
  min-width: 0;
  font-family: var(--serif);
}

.literate-document-editor .cm-content {
  min-height: 62vh;
}

.document-outputs {
  margin-top: 30px;
  padding-top: 8px;
}

.example-badge {
  color: #d5b88d;
}

.runtime-view {
  position: relative;
  margin: 8px 8px 26px;
  overflow: hidden;
  border: 1px solid #cbd9d1;
  border-radius: 9px;
  background: var(--paper-strong);
  box-shadow: 0 6px 20px rgb(24 52 42 / 5%);
}

.runtime-content {
  padding: 15px;
}

.runtime-frame {
  display: block;
  width: 100%;
  min-height: 165px;
  border: 0;
  background: var(--paper-strong);
}

.runtime-trace {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
}

.runtime-trace span {
  color: var(--muted);
}

.runtime-content.value {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  font-family: var(--mono);
  font-size: 13px;
}

.runtime-type {
  color: var(--muted);
}

.runtime-link {
  color: var(--green);
  font-weight: 700;
}

.inspector-title {
  margin: 0 0 3px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
}

.inspector-title code {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 650;
}

.cursor-type {
  margin-top: 2px;
}

.cursor-type .type-card {
  margin-top: 10px;
}

.context-empty {
  max-width: 220px;
  margin: 5px 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.definition-peek {
  margin: 0 -8px 17px;
}

.definition-peek button {
  display: grid;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 12px;
  background: rgb(255 254 250 / 72%);
  text-align: left;
  cursor: pointer;
}

.definition-peek button:hover,
.definition-peek button:focus-visible {
  border-color: #9bb9ad;
  background: var(--paper-strong);
  outline: 0;
}

.definition-peek-label,
.definition-peek-location,
.definition-peek-action {
  color: var(--muted);
  font-size: 9.5px;
}

.definition-peek-label {
  margin-bottom: 4px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.definition-peek strong {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.definition-peek-location {
  margin-top: 3px;
}

.definition-peek pre {
  max-height: 142px;
  margin: 9px 0 7px;
  overflow: hidden;
  color: #35463f;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.definition-peek code {
  font: inherit;
}

.definition-peek-more {
  color: var(--muted);
}

.definition-peek-action {
  justify-self: end;
}

.completion-popup {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgb(205 210 203 / 88%);
  border-radius: 8px;
  padding: 3px;
  background: rgb(251 250 246 / 98%);
  box-shadow:
    0 8px 24px rgb(35 45 40 / 12%),
    0 1px 3px rgb(35 45 40 / 7%);
  color: var(--ink);
}

.completion-list {
  max-height: inherit;
  overflow: auto;
  scrollbar-width: thin;
}

.completion-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 8px;
  border: 0;
  border-radius: 5px;
  padding: 5px 7px 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.completion-row:hover,
.completion-row.selected {
  background: var(--mint);
}

.completion-name {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completion-kind {
  color: #8b958f;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.completion-type {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #6f7c75;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completion-empty {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
}

.completion-empty {
  padding: 8px 7px;
}

.inspect-section {
  margin: 22px 0;
}

.inspect-section h3 {
  margin: 0 0 9px;
  color: #77817c;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.type-card,
.inspect-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--paper-strong);
  font-size: 12px;
  line-height: 1.5;
}

.type-card {
  color: var(--green-dark);
  font-family: var(--mono);
}

.dependency {
  display: inline-block;
  margin: 0 5px 5px 0;
  border-radius: 5px;
  padding: 3px 6px;
  background: var(--mint);
  color: var(--green-dark);
  font-family: var(--mono);
  font-size: 10px;
}

.diagnostic {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  border: 0;
  border-left: 3px solid var(--red);
  border-radius: 6px;
  padding: 9px 10px;
  background: #f7e9e6;
  color: #722c22;
  font-family: var(--mono);
  font-size: 10.5px;
  white-space: pre-wrap;
  cursor: pointer;
  text-align: left;
}

.diagnostic-section {
  padding-bottom: 12px;
}

.last-successful-execution {
  padding-top: 4px;
  border-top: 1px solid rgb(47 67 58 / 8%);
}

.last-successful-execution-label {
  margin: 8px 12px 7px;
  color: #87918c;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.stdout {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
}

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

.project-view,
.changes-view {
  width: min(1000px, calc(100% - 70px));
  margin: 40px auto 90px;
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 0 0 7px;
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: -0.035em;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px;
  background: var(--paper-strong);
  box-shadow: 0 5px 20px rgb(27 55 44 / 5%);
}

.project-card[data-project-path] {
  cursor: pointer;
}

.project-card[data-project-path]:hover,
.project-card[data-project-path]:focus {
  border-color: #94b4a5;
  outline: 0;
  transform: translateY(-1px);
}

.project-card h2 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 21px;
}

.project-card-path {
  margin-bottom: 15px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.entity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid #edf0eb;
  font-family: var(--mono);
  font-size: 11px;
}

.entity-kind {
  color: var(--muted);
}

.change-card {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 15px 17px;
  background: var(--paper-strong);
}

.change-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.change-block {
  border-radius: 5px;
  padding: 4px 7px;
  background: #eeeeea;
  font-family: var(--mono);
  font-size: 9px;
}

.change-block.added {
  background: #dcece3;
  color: var(--green-dark);
}

.change-block.removed {
  background: #f5dfdb;
  color: var(--red);
}

.source-diff {
  margin-top: 13px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.source-diff summary {
  cursor: pointer;
  color: var(--green);
  font-size: 11px;
  font-weight: 750;
}

.diff-lines {
  max-height: 430px;
  margin-top: 9px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfbf7;
}

.diff-line {
  display: grid;
  grid-template-columns: 34px 34px 18px minmax(0, 1fr);
  min-height: 24px;
  border-bottom: 1px solid #eeeeea;
  font-size: 10px;
  line-height: 24px;
}

.diff-line:last-child {
  border-bottom: 0;
}

.diff-line.added {
  background: #e5f2e9;
}

.diff-line.removed {
  background: #f8e7e3;
}

.diff-number,
.diff-marker {
  color: #8d958f;
  font-family: var(--mono);
  text-align: right;
}

.diff-marker {
  padding-right: 5px;
}

.diff-line code {
  overflow: hidden;
  padding: 0 7px;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: pre;
}

.artifact-section {
  margin-top: 38px;
}

.artifact-section h2 {
  font-family: var(--serif);
}

.artifact-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--paper-strong);
  font-size: 11px;
}

.artifact-card code {
  color: var(--green);
}

.change-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
}

.change-path {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.change-time {
  color: var(--muted);
  font-size: 10px;
}

.change-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.change-column {
  border-radius: 7px;
  padding: 9px 10px;
  background: #f3f3ed;
}

.change-column strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.statusbar {
  min-height: 30px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 6px 14px;
  background: var(--inspector);
  color: #66716b;
  font-size: 11px;
  line-height: 1.4;
}

.statusbar:empty,
.statusbar[aria-hidden="true"] {
  display: none;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-ok {
  color: var(--green);
}

.statusbar.status-error {
  border-top-color: #ead0ca;
  background: #f8ece9;
}

.status-error {
  color: var(--red);
}

.dirty {
  color: var(--amber);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 20;
  max-width: 360px;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--ink);
  color: white;
  box-shadow: 0 10px 35px rgb(0 0 0 / 22%);
  font-size: 11.5px;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1000px) {
  .workspace {
    --dox-main-left-width: 0px;
    --dox-main-right-width: 260px;
    --dox-document-left-inset: 40px;
    --dox-main-right-inset: 18px;
  }

  .pane-resizer {
    display: none !important;
  }

  .inspector-width-toggle {
    display: none !important;
  }

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

  .workspace.document-context .body-grid {
    grid-template-columns: minmax(320px, 1fr) 260px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    width: min(280px, 88vw);
    transform: translateX(-102%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 50px rgb(25 45 37 / 14%);
  }

  .workspace.show-files .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 11;
    display: block;
    border: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    background: rgb(29 40 35 / 10%);
    transition: opacity 180ms ease;
  }

  .workspace.show-files .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .pane-toggle.files-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 14;
    display: grid;
  }

  .workspace.show-files .files-toggle {
    transform: translateX(calc(min(280px, 88vw) - 49px));
  }
}

@media (max-width: 700px) {
  .workspace {
    --dox-main-right-width: 0px;
    --dox-document-left-inset: 14px;
    --dox-main-right-inset: 14px;
    grid-template-rows: minmax(0, 1fr) auto;
  }

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

  .workspace.document-context .body-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .main,
  .workspace {
    min-width: 0;
  }

  .sidebar {
    top: 0;
    bottom: 0;
  }

  .main-actions {
    padding: 10px 11px 0;
  }

  .inspector {
    max-height: 34vh;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 16px 17px 20px;
  }

  .document-shell,
  .project-view,
  .changes-view {
    width: calc(100% - 28px);
    margin-right: 14px;
    margin-left: 14px;
    margin-top: 54px;
  }
}

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