* {
  box-sizing: border-box;
}
html, body {
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #fff;
}
/* ace hides its real input in a 1x1px box; a font-size under 16px there
   makes iOS Safari zoom the whole page in on focus. The box is invisible
   either way, so bumping the font size costs nothing visually. */
.ace_text-input {
  font-size: 16px !important;
}
#all {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: 1fr auto;
}
.toolbar-left {
  grid-area: 1 / 1 / 2 / 2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
}
.toolbar-right {
  grid-area: 1 / 2 / 2 / 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
}
.toolbar-left h1 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 6px 0 0;
}
.toolbar-left button,
.toolbar-right button {
  font: inherit;
  padding: 6px 14px;
  border: 1px solid #c9d1d9;
  border-radius: 6px;
  background: #f6f8fa;
  cursor: pointer;
}
#run {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
  font-weight: 600;
}
#run:hover {
  background: #1a5fd0;
}
.toolbar-left button:focus-visible,
.toolbar-right button:focus-visible {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}
.timing {
  font-size: 0.8rem;
  color: #57606a;
}
#layout {
  grid-area: 2 / 1 / 3 / 3;
  border-top: 1px solid #d0d7de;
  border-bottom: 1px solid #d0d7de;
}
.sitefoot {
  grid-area: 3 / 1 / 4 / 3;
  padding: 8px 12px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #57606a;
  background: #f6f8fa;
  max-height: 30vh;
  overflow-y: auto;
}
.sitefoot p {
  margin: 4px 0;
}
.sitefoot a {
  color: #0969da;
}
.canvas {
  object-fit: contain;
  width: 100%;
  height: 100%;
}
.font-size {
  float: left;
  padding: 0 1em;
  font-size: small;
}
.hidden {
  display: none;
}
@media (max-width: 700px) {
  /* golden-layout's side-by-side row does not reflow at phone widths (panes
     end up squeezed to a sliver each); web.js switches the layout config to
     GoldenLayout's own 'column' type below this same breakpoint, so editor
     and terminal stack top/bottom instead. This block only handles the
     surrounding page chrome. */
  #all {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
  }
  .toolbar-left {
    grid-area: 1 / 1 / 2 / 2;
  }
  .toolbar-right {
    grid-area: 2 / 1 / 3 / 2;
  }
  #layout {
    grid-area: 3 / 1 / 4 / 2;
  }
  .sitefoot {
    grid-area: 4 / 1 / 5 / 2;
    max-height: 14vh;
  }
  .toolbar-left h1 {
    font-size: 0.9rem;
  }
  .sitefoot {
    font-size: 0.72rem;
  }
  /* 44x44 CSS px minimum touch target (WCAG 2.5.5 / Apple HIG) */
  .toolbar-left button,
  .toolbar-right button {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 16px;
    font-size: 16px;
  }
  .timing input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
  /* keep controls clear of a notch or the home-indicator bar */
  .toolbar-left {
    padding-left: max(10px, env(safe-area-inset-left));
  }
  .toolbar-right {
    padding-right: max(10px, env(safe-area-inset-right));
  }
  .sitefoot {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}
