* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #e9ede8;
  color: #26352e;
  font:
    14px -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #cbd7c7;
  border-radius: 7px;
  background: #fff;
  padding: 10px 12px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #528367;
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
#app {
  height: 100dvh;
  max-width: 800px;
  margin: auto;
  background: #fbfaf7;
  display: flex;
  flex-direction: column;
}
header {
  padding: 15px 18px;
  border-bottom: 1px solid #dce3d8;
}
.brand {
  font:
    23px Georgia,
    serif;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}
.brand small {
  font: 10px sans-serif;
  letter-spacing: 2px;
  align-self: center;
  color: #788279;
}
#branch-pill {
  width: 100%;
  text-align: left;
  background: #edf3eb;
  border-color: #bed0bf;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
h1 {
  font:
    26px Georgia,
    serif;
  margin: 0;
}
h2 {
  font-size: 16px;
  font-weight: 550;
}
main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
}
.muted {
  font-size: 12px;
  line-height: 1.5;
  color: #788279;
}
.card {
  background: #fff;
  border: 1px solid #dce2d8;
  border-radius: 11px;
  padding: 14px;
  margin-bottom: 12px;
}
.card.selected {
  background: #f0f5ed;
  border-color: #7b9c7c;
}
.card .name {
  border: 0;
  padding: 0;
  background: none;
  font-weight: 600;
  text-align: left;
  overflow-wrap: anywhere;
}
.card .counts {
  font-size: 19px;
  margin: 14px 0;
}
.card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.primary {
  background: #365d47;
  color: white;
  border-color: #365d47;
}
.command {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 13px 0;
  font:
    12px ui-monospace,
    monospace;
  overflow-wrap: anywhere;
}
.command input[type="text"],
#custom-command {
  min-width: 0;
  flex: 1;
  padding: 8px;
  border: 1px solid #dce2d8;
  border-radius: 5px;
}
#build {
  width: 100%;
  margin: 8px 0 15px;
}
#source {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
#file-picker {
  text-align: left;
  overflow-wrap: anywhere;
}
#editor {
  flex: 1;
  min-height: 100px;
  resize: none;
  border: 1px solid #dce2d8;
  background: #fffefb;
  padding: 12px;
  font:
    13px/1.65 ui-monospace,
    SFMono-Regular,
    monospace;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
}
.actions {
  display: flex;
  gap: 6px;
}
.actions button {
  flex: 1;
  padding: 12px 5px;
  font-size: 12px;
}
nav {
  display: flex;
  flex-shrink: 0;
  padding: 6px 8px max(6px, env(safe-area-inset-bottom));
  border-top: 1px solid #dce3d8;
  background: #f4f6f0;
}
nav button {
  flex: 1;
  border: 0;
  background: none;
  font-size: 23px;
  color: #7c8c7c;
}
nav button span {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
nav button.active {
  background: #e3ecdf;
  color: #335a42;
}
#preview {
  padding: 0;
  display: flex;
  flex-direction: column;
}
#preview .heading {
  padding: 8px 12px;
}
#preview-meta {
  flex: 1;
}
#frame {
  border: 0;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: white;
}
#preview-empty {
  padding: 20px;
}
#notice {
  margin: 0;
  padding: 10px 16px;
  background: #faeee8;
  border-bottom: 1px solid #e2beb1;
  color: #854f40;
  font-size: 12px;
  white-space: pre-wrap;
  max-height: 130px;
  overflow: auto;
}
pre {
  font:
    11px/1.5 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 200px;
  overflow: auto;
}
dialog {
  width: calc(100% - 28px);
  max-width: 600px;
  max-height: 85dvh;
  border: 1px solid #cbd7c7;
  border-radius: 14px;
  padding: 18px;
  background: #fbfaf7;
  color: inherit;
}
dialog::backdrop {
  background: #26352e66;
}
dialog .heading {
  margin-bottom: 15px;
}
dialog input[type="search"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #cbd7c7;
  border-radius: 6px;
}
#tree details {
  padding-left: 13px;
}
#tree summary {
  padding: 8px 0;
  cursor: pointer;
  font-size: 13px;
}
#tree button,
#recents button {
  border: 0;
  background: none;
  display: block;
  padding: 9px 6px;
  text-align: left;
  font:
    12px ui-monospace,
    monospace;
  overflow-wrap: anywhere;
  width: 100%;
}
#recents {
  border-bottom: 1px solid #dce2d8;
}
#decision button {
  display: block;
  width: 100%;
  margin: 9px 0;
}
#login {
  padding: 25px;
}
#login input {
  width: 100%;
  padding: 12px;
  margin: 15px 0;
}
#login button {
  width: 100%;
}
body.busy {
  cursor: progress;
}
@media (min-width: 700px) {
  #app {
    border-inline: 1px solid #dce2d8;
  }
  main {
    padding: 24px;
  }
}

/* Two independently tappable wedges; the seam is 30 degrees from vertical. */
nav {
  position: relative;
}
#preview-tools {
  position: absolute;
  bottom: 100%;
  right: 8px;
  width: calc((100% - 16px) / 3);
  height: 64px;
  border: 1px solid #bdcdb9;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  background: #f4f6f0;
  box-shadow: 0 -3px 10px #203d2312;
}
#preview-tools button {
  position: absolute;
  inset: 0;
  width: 100%;
  border-radius: 0;
  padding: 0;
  color: #50664f;
  background: #f4f6f0;
}
#preview-tools button span {
  font-size: 25px;
  margin: 0;
}
#follow {
  clip-path: polygon(
    0 0,
    calc(50% + 18.5px) 0,
    calc(50% - 18.5px) 100%,
    0 100%
  );
}
#goggles {
  clip-path: polygon(
    calc(50% + 18.5px) 0,
    100% 0,
    100% 100%,
    calc(50% - 18.5px) 100%
  );
}
#follow span {
  transform: translateX(-25%);
}
#goggles span {
  transform: translateX(25%);
}
#preview-tools::after {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 50%;
  width: 1px;
  background: #aabda5;
  transform: rotate(30deg);
  pointer-events: none;
}
#preview-tools button[aria-pressed="true"] {
  background: #cce3b8;
}
#preview-tools button:disabled {
  opacity: 1;
  background: #eeeee8;
}
#preview-tools button:disabled span {
  opacity: 0.3;
  filter: grayscale(1);
}
#preview-tools button:focus-visible {
  outline: none;
  background: #f3dea1;
}
#source .actions {
  padding-right: calc((100% - 16px) / 3);
}

#follow::after {
  content: "";
  position: absolute;
  left: 12px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #51734a;
}
#follow[data-tracking="off"]::after {
  display: none;
}
#follow[data-tracking="locked"]::after {
  background: #51734a;
}
#follow[data-tracking="searching"]::after {
  border-right-color: transparent;
  animation: snail-search 0.7s linear infinite;
}
@keyframes snail-search {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  #follow[data-tracking="searching"]::after {
    animation: none;
    border-style: dotted;
  }
}
