:root {
  --paper: #fff;
  --ink: #000;
  --rule: 1px;
  --status-height: 42px;
  --command-height: 31px;
  --header-height: 28px;
  --device-pixel: 1px;
  --stipple-cell: 2px;
  --gray-33-cell: 3px;
  --hatch-period: 3px;
  color-scheme: light;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

::selection {
  color: var(--paper);
  background: var(--ink);
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}

body {
  font-family: "Genera CPTFONT", ui-monospace, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.25;
}

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

button {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  padding: 2px 7px;
}

button:hover,
button:focus-visible,
a:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 1px;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -40px;
  left: 4px;
  border: 1px solid;
  background: #fff;
  padding: 5px 8px;
}

.skip-link:focus {
  top: 4px;
}

.machine-screen {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-rows: var(--header-height) minmax(0, 1fr) var(--command-height) var(--status-height);
  background: var(--paper);
}

.machine-header {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--ink);
  padding: 2px 5px;
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
  white-space: nowrap;
}

.system-key,
.search-key {
  padding: 1px 7px;
}

.machine-name {
  font-weight: 700;
  text-decoration: none;
}

.activity-name {
  overflow: hidden;
  text-align: center;
  font-style: italic;
  text-overflow: ellipsis;
}

.program-frame {
  --document-left: 240px;
  position: relative;
  display: grid;
  min-height: 0;
  grid-template-columns: 226px 14px minmax(0, 1fr);
  grid-template-rows: 20px minmax(0, 1fr) 14px;
  border: 1px solid var(--ink);
  margin: 4px 5px 3px;
}

.program-label {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--ink);
  padding: 1px 5px;
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
  font-style: italic;
  text-align: center;
}

.navigator-pane {
  grid-column: 1;
  grid-row: 2 / 4;
  min-width: 0;
  overflow: auto;
  border-right: 1px solid var(--ink);
  scrollbar-width: none;
}

.pane-title {
  border-bottom: 1px solid var(--ink);
  padding: 3px 5px 2px;
  font-family: "Genera Swiss 14", "Genera JESS", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.navigator-list {
  display: grid;
}

.navigator-item {
  border-bottom: 1px solid transparent;
  padding: 5px 7px;
  text-decoration: none;
}

.navigator-item:hover,
.navigator-item:focus-visible,
.navigator-item.is-current {
  border-color: var(--ink);
  outline: 0;
}

.navigator-item.is-current {
  font-weight: 700;
}

.navigator-help {
  margin: 14px 7px;
  border-top: 1px solid;
  padding-top: 6px;
  font-size: 11px;
}

.navigator-help p {
  margin: 2px 0;
}

kbd,
code,
pre {
  font-family: "Genera CPTFONT", ui-monospace, monospace;
}

kbd {
  border: 1px solid;
  padding: 0 2px;
  font-weight: 400;
}

.document-pane {
  grid-column: 3;
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  outline: 0;
  scrollbar-width: none;
  scroll-behavior: auto;
}

.breadcrumb-pane {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  padding: 3px 7px;
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumb-pane a {
  text-decoration: none;
}

.breadcrumb-separator {
  margin: 0 5px;
}

.museum-article {
  max-width: 1040px;
  padding: 11px 20px 28px;
}

.museum-article > :first-child {
  margin-top: 0;
}

.museum-article h1,
.museum-article h2,
.museum-article h3 {
  font-family: "Genera Swiss 14", "Genera Swiss", "Genera JESS", sans-serif;
  line-height: 1.05;
}

.museum-article h1 {
  font-family: "Genera Swiss Display", "Genera Swiss 14", "Genera Swiss", sans-serif;
  margin: 8px 0 14px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  font-size: 20px;
  font-weight: 700;
}

.museum-article h2 {
  margin: 22px 0 8px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  font-size: 15px;
}

.museum-article h3 {
  margin: 17px 0 6px;
  font-size: 15px;
  font-style: italic;
}

.museum-article h4 {
  font-family: "Genera Swiss", "Genera JESS", sans-serif;
  margin: 14px 0 5px;
  font-size: 14px;
  line-height: 1.05;
}

.museum-article p,
.museum-article ul,
.museum-article ol {
  max-width: 88ch;
}

.museum-article p {
  margin: 7px 0;
}

.museum-article ul,
.museum-article ol {
  margin: 6px 0;
  padding-left: 24px;
}

.museum-article li {
  margin: 2px 0;
}

.museum-article a {
  font-weight: 700;
}

.museum-article a:hover,
.museum-article a:focus-visible {
  color: var(--paper);
  background: var(--ink);
  outline: 0;
  text-decoration: none;
}

.museum-article blockquote {
  max-width: 86ch;
  margin: 10px 0 10px 10px;
  border-left: 4px double var(--ink);
  padding: 1px 10px;
}

.museum-article details {
  max-width: 88ch;
  margin: 6px 0;
  border: 1px solid var(--ink);
}

.museum-article summary {
  cursor: pointer;
  padding: 3px 5px;
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
  font-weight: 700;
}

.museum-article details[open] summary {
  border-bottom: 1px solid var(--ink);
}

.museum-article details img {
  margin: 5px;
}

.museum-article pre {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--ink);
  background:
    linear-gradient(var(--paper), var(--paper)) padding-box,
    repeating-linear-gradient(
      135deg,
      #000 0 var(--device-pixel),
      #fff var(--device-pixel) var(--hatch-period)
    ) border-box;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.25;
  tab-size: 2;
}

.museum-article :not(pre) > code {
  border: 1px solid;
  padding: 0 2px;
}

.museum-article table {
  width: max-content;
  min-width: min(100%, 500px);
  max-width: 100%;
  margin: 10px 0 14px;
  border-collapse: collapse;
  font-size: 11px;
}

.museum-article th,
.museum-article td {
  border: 1px solid var(--ink);
  padding: 3px 5px;
  text-align: left;
  vertical-align: top;
}

.museum-article th {
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 12px;
  font-weight: 700;
}

.museum-article img {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  margin: 12px 0 5px;
  border: 1px solid var(--ink);
  image-rendering: pixelated;
}

.museum-article em {
  font-family: "Genera Dutch", "Genera CPTFONT", serif;
}

.document-footer {
  border-top: 1px solid var(--ink);
  padding: 5px 20px 15px;
  font-size: 11px;
}

.scroll-margin {
  display: grid;
  grid-column: 2;
  grid-row: 2;
  grid-template-rows: 14px 1fr 14px;
  border-right: 1px solid var(--ink);
}

.scroll-margin button,
.horizontal-scroll-margin button {
  align-self: center;
  justify-self: center;
  width: 10px;
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--ink);
  padding: 0;
  cursor: pointer;
  background: var(--paper);
}

.scroll-shaft,
.horizontal-scroll-shaft {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  outline: 0;
  touch-action: none;
  background-color: var(--paper);
}

.scroll-shaft::before,
.scroll-shaft::after,
.horizontal-scroll-shaft::before,
.horizontal-scroll-shaft::after {
  position: absolute;
  z-index: 0;
  content: "";
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' viewBox='0 0 2 2' shape-rendering='crispEdges'%3E%3Cpath d='M1 0h1v1H1zM0 1h1v1H0z'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: var(--stipple-cell) var(--stipple-cell);
}

.scroll-shaft {
  margin: 0;
}

.scroll-shaft::before,
.scroll-shaft::after {
  top: 0;
  bottom: 0;
  width: var(--device-pixel);
}

.scroll-shaft::before {
  left: 2px;
}

.scroll-shaft::after {
  right: 2px;
}

.scroll-shaft:focus-visible,
.horizontal-scroll-shaft:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: -2px;
}

#scroll-car,
#horizontal-scroll-car {
  z-index: 1;
  position: absolute;
  min-height: 8px;
  border: 1px solid var(--ink);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3' viewBox='0 0 3 3' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h1v1H0zM1 1h1v1H1zM2 2h1v1H2z'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: var(--gray-33-cell) var(--gray-33-cell);
  cursor: grab;
  touch-action: none;
}

#scroll-car {
  top: 0;
  right: 2px;
  left: 2px;
}

#scroll-car.is-dragging,
#horizontal-scroll-car.is-dragging {
  cursor: grabbing;
}

.horizontal-scroll-margin {
  display: grid;
  grid-column: 3;
  grid-row: 3;
  grid-template-columns: 14px 1fr 14px;
  border-top: 1px solid var(--ink);
}

.horizontal-scroll-shaft {
  margin: 0;
}

.horizontal-scroll-shaft::before,
.horizontal-scroll-shaft::after {
  right: 0;
  left: 0;
  height: var(--device-pixel);
}

.horizontal-scroll-shaft::before {
  top: 2px;
}

.horizontal-scroll-shaft::after {
  bottom: 2px;
}

#horizontal-scroll-car {
  top: 2px;
  bottom: 2px;
  left: 0;
  min-width: 8px;
  min-height: 0;
}

.ragged-edge {
  position: absolute;
  z-index: 4;
  display: none;
  pointer-events: none;
  background-color: var(--paper);
}

.ragged-edge.is-active {
  display: block;
}

.ragged-edge--top,
.ragged-edge--bottom {
  left: var(--document-left);
  right: 0;
  height: calc(4 * var(--device-pixel));
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='4' viewBox='0 0 10 4' shape-rendering='crispEdges'%3E%3Cpath d='M0 0L5 3L10 0' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size:
    calc(10 * var(--device-pixel))
    calc(4 * var(--device-pixel));
}

.ragged-edge--top {
  top: 19px;
}

.ragged-edge--bottom {
  bottom: 13px;
  transform: scaleY(-1);
}

.ragged-edge--left,
.ragged-edge--right {
  top: 20px;
  bottom: 14px;
  width: calc(4 * var(--device-pixel));
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='10' viewBox='0 0 4 10' shape-rendering='crispEdges'%3E%3Cpath d='M0 0L3 5L0 10' fill='none' stroke='black' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-size:
    calc(4 * var(--device-pixel))
    calc(10 * var(--device-pixel));
}

.ragged-edge--left {
  left: calc(var(--document-left) - 1px);
}

.ragged-edge--right {
  right: -1px;
  transform: scaleX(-1);
}

.command-pane {
  display: grid;
  grid-template-columns: auto minmax(100px, 1fr) auto minmax(0, 2fr);
  align-items: center;
  gap: 5px;
  border-top: 1px solid var(--ink);
  padding: 3px 6px;
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
}

.command-pane input,
.search-query input {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: 0;
  background: transparent;
  padding: 1px 3px;
}

input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
}

#command-hint {
  overflow: hidden;
  font-family: "Genera Dutch", "Genera CPTFONT", serif;
  font-size: 11px;
  font-style: italic;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.who-line {
  display: grid;
  grid-template-rows: 21px 21px;
  color: var(--ink);
  background: var(--paper);
  font-size: 11px;
}

.pointer-documentation,
.machine-status {
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  padding: 2px 7px;
  white-space: nowrap;
}

.pointer-documentation {
  color: var(--paper);
  background: var(--ink);
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
}

.machine-status span:nth-child(2) {
  flex: 1;
}

.transient-layer {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
}

.transient-layer[hidden] {
  display: none;
}

.genera-menu,
.search-window,
.help-window {
  position: relative;
  max-width: calc(100vw - 30px);
  border: 1px solid var(--ink);
  background: var(--paper);
}

.genera-menu::after,
.search-window::after,
.help-window::after {
  position: absolute;
  z-index: -1;
  content: "";
  top: 5px;
  right: -6px;
  bottom: -6px;
  left: 5px;
  background:
    repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 /
      var(--stipple-cell) var(--stipple-cell);
}

.genera-menu-title {
  border-bottom: 1px solid var(--ink);
  padding: 3px 7px 2px;
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 14px;
  font-style: italic;
  text-align: center;
}

.menu-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 1px;
}

.menu-columns section {
  display: grid;
  align-content: start;
  padding: 3px;
}

.menu-columns section + section {
  border-left: 1px solid var(--ink);
}

.menu-columns h2 {
  margin: 0 0 3px;
  font-family: "Genera Swiss", "Genera JESS", sans-serif;
  font-size: 13px;
  text-align: center;
}

.menu-columns a,
.menu-columns button {
  min-height: 22px;
  border: 1px solid transparent;
  background: transparent;
  padding: 3px 6px;
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
}

.menu-columns a:hover,
.menu-columns a:focus-visible,
.menu-columns button:hover,
.menu-columns button:focus-visible {
  border-color: var(--ink);
  outline: 0;
}

.search-window {
  width: min(720px, calc(100vw - 30px));
}

.search-query {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid;
  padding: 7px;
}

.search-results {
  min-height: 190px;
  max-height: min(56vh, 460px);
  overflow: auto;
  padding: 4px;
}

.search-result {
  display: grid;
  border: 1px solid transparent;
  padding: 4px 6px;
  text-decoration: none;
}

.search-result strong {
  font-family: "Genera JESS", "Genera CPTFONT", monospace;
  font-size: 13px;
}

.search-result span {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-result.is-selected,
.search-result:hover,
.search-result:focus-visible {
  border-color: var(--ink);
  outline: 0;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid;
  padding: 5px 7px;
}

.help-window {
  width: min(600px, calc(100vw - 30px));
  padding-bottom: 8px;
}

.help-window > :not(.genera-menu-title) {
  margin-right: 10px;
  margin-left: 10px;
}

.help-window table {
  border-collapse: collapse;
}

.help-window th,
.help-window td {
  border: 1px solid;
  padding: 3px 5px;
  text-align: left;
}

.noscript-note {
  position: fixed;
  z-index: 50;
  right: 10px;
  bottom: 50px;
  max-width: 500px;
  border: 1px solid;
  background: white;
  padding: 8px;
}

@media (max-width: 760px) {
  :root {
    --header-height: 27px;
    --command-height: 50px;
  }

  .machine-header {
    grid-template-columns: auto 1fr auto;
  }

  .activity-name {
    display: none;
  }

  .program-frame {
    --document-left: 14px;
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .navigator-pane {
    display: none;
  }

  .document-pane {
    grid-column: 2;
  }

  .scroll-margin {
    grid-column: 1;
  }

  .horizontal-scroll-margin {
    grid-column: 2;
  }

  .museum-article {
    padding: 8px 10px 24px;
  }

  .museum-article table {
    display: block;
    overflow-x: auto;
  }

  .command-pane {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 22px 18px;
  }

  #command-hint {
    grid-column: 1 / -1;
  }

  .menu-columns {
    grid-template-columns: 1fr;
    max-height: 75vh;
    overflow: auto;
  }

  .menu-columns section + section {
    border-top: 1px solid var(--ink);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

@media print {
  html,
  body {
    height: auto;
    overflow: visible;
  }

  .machine-screen {
    display: block;
  }

  .machine-header,
  .navigator-pane,
  .scroll-margin,
  .horizontal-scroll-margin,
  .ragged-edge,
  .command-pane,
  .who-line {
    display: none;
  }

  .program-frame {
    display: block;
    border: 0;
    margin: 0;
  }

  .document-pane {
    overflow: visible;
  }
}
