:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111210;
  color: #eceee8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #111210;
}

button {
  font: inherit;
}

.topbar {
  min-height: 78px;
  padding: 14px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid #30322d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #171815;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid #a7ff3f;
  display: grid;
  place-items: center;
  color: #a7ff3f;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 800;
}

h1,
.brand p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.1;
}

.brand p {
  margin-top: 4px;
  color: #8e9189;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #bdc1b8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7ff3f;
  box-shadow: 0 0 12px rgb(167 255 63 / 50%);
}

main {
  width: min(100%, 1800px);
  min-height: calc(100vh - 118px);
  margin: 0 auto;
}

.toolbar {
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid #292b27;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tabs {
  height: 36px;
  padding: 3px;
  border: 1px solid #383a35;
  display: flex;
  background: #181a17;
}

.tab,
.update-button {
  min-height: 28px;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 700;
}

.tab {
  min-width: 92px;
  padding: 0 14px;
  color: #8e9189;
  background: transparent;
}

.tab:hover,
.tab:focus-visible {
  color: #eceee8;
}

.tab.active {
  color: #111210;
  background: #eceee8;
}

.update-button {
  min-width: 116px;
  height: 36px;
  padding: 0 15px;
  border: 1px solid #a7ff3f;
  color: #a7ff3f;
  background: transparent;
}

.update-button:hover,
.update-button:focus-visible {
  color: #111210;
  background: #a7ff3f;
}

.update-button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.metadata {
  min-height: 38px;
  padding: 9px clamp(16px, 4vw, 52px);
  border-bottom: 1px solid #292b27;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  color: #777b72;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

.metadata strong,
.metadata time {
  color: #bdc1b8;
  font-weight: 500;
}

.viewer {
  min-height: calc(100vh - 220px);
  overflow: auto;
  background: #0d0e0c;
}

.code-view {
  min-width: max-content;
  min-height: calc(100vh - 220px);
  margin: 0;
  padding: 26px clamp(16px, 4vw, 52px) 64px;
  tab-size: 2;
}

.code-view code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.hljs {
  color: #d6d9d1;
  background: transparent;
}

.hljs-comment,
.hljs-quote {
  color: #72766d;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-meta {
  color: #ff6b7a;
}

.hljs-string,
.hljs-regexp,
.hljs-symbol {
  color: #e9c46a;
}

.hljs-number,
.hljs-literal,
.hljs-built_in {
  color: #79d9ff;
}

.hljs-title,
.hljs-function,
.hljs-section {
  color: #a7ff3f;
}

.hljs-variable,
.hljs-params,
.hljs-attribute {
  color: #d9a7ff;
}

footer {
  min-height: 40px;
  padding: 0 clamp(16px, 4vw, 52px);
  border-top: 1px solid #30322d;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: #6f736a;
  background: #171815;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  .topbar {
    min-height: 68px;
  }

  .status {
    align-self: flex-start;
    margin-top: 7px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tabs,
  .update-button {
    width: 100%;
  }

  .tab {
    flex: 1;
  }

  .code-view code {
    font-size: 12px;
  }

  footer {
    justify-content: space-between;
  }
}
