@font-face {
  font-family: Space Mono;
  src: url(/space-mono.woff2);
}
:root {
  color-scheme: dark;
  --bg: #0b0b0f;
  --panel: #15151b;
  --raised: #202027;
  --frame: #5a303a;
  --line: #3b3037;
  --fg: #f5ebed;
  --muted: #b8a9af;
  --faint: #978890;
  --red: #ff304f;
  --bright: #ff5e77;
  --aside: 260px;
  --console: 205px;
  --vh: 100dvh;
  font:
    14px "Space Mono",
    monospace;
  color: var(--fg);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: var(--vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 7px 12px;
  cursor: pointer;
  touch-action: manipulation;
}
button:hover,
button:focus-visible {
  border-color: var(--bright);
  color: #fff;
}
button:disabled {
  opacity: 0.45;
}
input,
textarea,
select {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px;
  max-width: 100%;
}
button.primary {
  background: #cb1737;
  color: white;
  border-color: #ff304f;
}
header,
.projectbar,
footer,
.sectiontitle,
.consolehead,
#tabs,
.dashfoot,
.row,
#mobile {
  display: flex;
  align-items: center;
  gap: 8px;
}
header {
  height: 58px;
  flex: none;
  padding: 0 clamp(12px, 3vw, 48px);
  border-bottom: 1px solid var(--frame);
  background: #101015;
}
.brand {
  border: 0;
  padding: 0;
  background: none;
  font: bold 25px system-ui;
  letter-spacing: -1.4px;
}
.brand span,
.red,
h1 span {
  color: var(--red);
}
.brand .mark {
  margin-right: 9px;
  font: 32px monospace;
  vertical-align: middle;
}
header i {
  height: 18px;
  border-left: 1px solid var(--line);
  margin: 0 10px;
}
.grow {
  flex: 1;
}
.micro,
.rail,
h3,
.dashfoot,
footer {
  font-size: 10px;
  letter-spacing: 1.3px;
  color: var(--muted);
}
.micro.red {
  color: var(--bright);
}
.rail {
  margin: 0 0 24px;
  color: var(--faint);
}
#dashboard {
  flex: 1;
  overflow: auto;
  padding: clamp(24px, 6vw, 85px) max(5vw, calc((100vw - 1120px) / 2));
  background: linear-gradient(135deg, #151017, transparent 58%);
}
.hero,
.dashpanel {
  border: 1px solid var(--frame);
  background: var(--panel);
  position: relative;
}
.hero {
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(22px, 4vw, 55px);
  background: linear-gradient(100deg, #18151b, #15151b 55%, #25131a);
}
.hero:before,
.dashpanel:before {
  content: "";
  position: absolute;
  left: -1px;
  top: -1px;
  width: 45px;
  border-top: 3px solid var(--red);
}
h1,
h2 {
  font-family: system-ui, sans-serif;
  margin: 0;
  font-weight: 620;
}
h1 {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.15;
  letter-spacing: -0.055em;
  margin-top: 10px;
}
p {
  color: var(--muted);
  line-height: 1.55;
}
.circuit {
  width: 27%;
  color: #a94353;
}
.circuit svg {
  width: 100%;
  stroke-dasharray: 260;
  animation: trace 6s ease-in-out infinite alternate;
}
@keyframes trace {
  from {
    stroke-dashoffset: 120;
  }
  to {
    stroke-dashoffset: 0;
  }
}
.dashpanel {
  margin-top: 24px;
  padding: 20px;
}
.sectiontitle {
  justify-content: space-between;
  margin-bottom: 10px;
}
h2 {
  font-size: 21px;
}
.repo,
.empty,
.recovery {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.repo {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.repo small,
.muted {
  color: var(--muted);
}
.repo strong {
  display: block;
  font: 600 18px system-ui;
}
.empty p {
  margin: 0 0 15px;
}
.recovery:empty {
  display: none;
}
.dashfoot {
  justify-content: space-between;
  margin-top: 20px;
}
#ide {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.projectbar {
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}
.projectbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.work {
  display: flex;
  flex: 1;
  min-height: 0;
}
aside {
  width: var(--aside);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px;
}
h3 {
  text-transform: uppercase;
  margin: 0;
}
#filter {
  width: 100%;
}
#tree {
  overflow: auto;
  flex: 1;
  padding-top: 8px;
}
details > summary {
  cursor: pointer;
  color: var(--muted);
  padding: 5px 0;
}
#tree details {
  padding-left: 10px;
}
#tree button,
.tab,
.key,
#tabs button {
  border: 0;
  background: transparent;
  white-space: nowrap;
}
#tree button {
  display: block;
  text-align: left;
  padding: 5px 9px;
}
#tree button.active,
#tabs .active,
.selected {
  color: var(--bright);
  background: #2a1a22;
}
#center {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}
.split {
  flex: none;
  background: var(--line);
  touch-action: none;
}
#vsplit {
  width: 4px;
  cursor: col-resize;
}
#hsplit {
  height: 4px;
  cursor: row-resize;
}
#tabs,
#keys,
#mobile {
  overflow: auto;
  flex: none;
  scrollbar-width: thin;
}
#tabs {
  min-height: 38px;
  background: var(--panel);
  gap: 0;
}
#tabs button {
  height: 37px;
  border-right: 1px solid var(--line);
  border-radius: 0;
}
#tabs button.active {
  box-shadow: inset 0 2px var(--red);
}
#filepath {
  padding: 5px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--line);
}
#editor {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.cm-editor {
  height: 100%;
  font-size: var(--editor-size, 15px);
}
.cm-editor.cm-focused {
  outline: none !important;
}
.cm-scroller {
  overscroll-behavior: contain;
}
#keys {
  display: none;
}
#bottom {
  height: var(--console);
  min-height: 65px;
  display: flex;
  flex-direction: column;
  background: #111115;
}
.consolehead {
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
}
#problems,
#buildpane {
  padding: 10px;
  overflow: auto;
}
.problem,
.menuaction {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 4px;
}
.problem {
  font: 12px monospace;
}
.problem.error,
.logerror {
  color: #ff8290;
}
.logwarn {
  color: #edc778;
}
#runButtons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 8px 0;
}
#logs {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.5 monospace;
}
#logs details {
  margin: 4px 0;
}
footer {
  border-top: 1px solid var(--frame);
  background: #1b141a;
  justify-content: space-between;
  padding: 5px 12px;
  letter-spacing: 0.3px;
}
#mobile {
  display: none;
}
dialog {
  width: min(470px, 96vw);
  max-height: 85dvh;
  color: var(--fg);
  background: var(--panel);
  border: 1px solid var(--frame);
  padding: 22px;
  overflow: auto;
}
dialog::backdrop {
  background: #07070bc9;
}
label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin: 10px 0;
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
}
#notice {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 650px);
  width: max-content;
  padding: 12px 16px;
  background: #301922;
  border: 1px solid var(--bright);
  z-index: 10;
  white-space: pre-wrap;
}
* {
  scrollbar-color: #62404a #15151b;
  scrollbar-width: thin;
}
.quiet *,
body.typing * {
  animation-play-state: paused !important;
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 800px), (max-height: 540px) and (pointer: coarse) {
  header {
    height: 45px;
    padding: 0 10px;
  }
  header i,
  header .micro,
  .circuit,
  #vsplit,
  #hsplit,
  #branch {
    display: none;
  }
  .brand {
    font-size: 22px;
  }
  .rail {
    margin-bottom: 12px;
  }
  #dashboard {
    padding: 22px 12px;
  }
  .hero {
    padding: 22px 16px;
  }
  .dashpanel {
    padding: 14px;
  }
  .repo .grow {
    min-width: 45%;
  }
  .projectbar {
    padding: 3px 8px;
  }
  .projectbar strong {
    font-size: 13px;
  }
  button,
  #tree button,
  summary {
    min-height: 40px;
  }
  .work {
    position: relative;
  }
  .work aside {
    display: none;
    width: 100%;
  }
  #bottom {
    display: none;
  }
  .work #center {
    width: 100%;
  }
  #mobile {
    display: flex;
    border-top: 1px solid var(--line);
    background: var(--panel);
    gap: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #mobile button {
    flex: 1;
    font-size: 11px;
    padding: 4px 1px;
    border: 0;
    border-radius: 0;
  }
  #mobile .active {
    box-shadow: inset 0 2px var(--red);
    color: var(--bright);
  }
  #keys {
    display: flex;
    gap: 2px;
    padding: 2px;
    background: #19191f;
    overscroll-behavior-x: contain;
  }
  #keys button {
    min-width: 42px;
    min-height: 39px;
    flex: none;
  }
  #ide[data-panel="Files"] aside {
    display: flex;
  }
  #ide[data-panel="Files"] #center {
    display: none;
  }
  #ide:is([data-panel="Problems"], [data-panel="Builds"])
    :is(#editor, #tabs, #keys, #filepath) {
    display: none;
  }
  #ide:is([data-panel="Problems"], [data-panel="Builds"]) #bottom {
    display: flex;
    height: 100%;
  }
  footer {
    font-size: 9px;
  }
  .cm-editor {
    font-size: var(--editor-size, 16px);
  }
  #filepath {
    padding: 2px 8px;
  }
  body.keyboard header,
  body.keyboard #mobile,
  body.keyboard footer {
    display: none;
  }
}
#runInfo strong {
  color: var(--bright);
}
#ide.busy #runInfo strong:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--red);
  border-radius: 100%;
  margin-right: 8px;
  animation: pulse 1.3s infinite alternate;
}
@keyframes pulse {
  to {
    opacity: 0.35;
  }
}
#tree details > button:before {
  content: "· ";
  color: var(--faint);
}
#repoList .repo:first-child {
  margin-top: 14px;
}

#panes {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#secondary {
  width: 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--frame);
}
#secondEditor {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
#secondPath {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#panes #editor {
  min-width: 0;
}
#paletteFilter {
  width: 100%;
  margin-bottom: 8px;
}
@media (max-width: 800px), (max-height: 540px) and (pointer: coarse) {
  #secondary {
    display: none;
  }
  #ide:is([data-panel="Problems"], [data-panel="Builds"]) #panes {
    display: none;
  }
}
