:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202124;
  background: #f6f7f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 28px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.toolbar p {
  margin-bottom: 0;
  color: #62666d;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #202124;
  border-radius: 6px;
  background: #202124;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.upload-button input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.workspace {
  min-height: 66vh;
  padding: 28px;
  border: 1px solid #d8dbe0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgb(32 33 36 / 8%);
}

.preview {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
}

.preview h1,
.preview h2,
.preview h3 {
  margin: 1.2em 0 0.35em;
  line-height: 1.15;
}

.preview h1:first-child,
.preview h2:first-child,
.preview h3:first-child {
  margin-top: 0;
}

.preview a {
  color: #0b57d0;
}

.preview code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #eef1f5;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.preview pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 6px;
  background: #15171a;
  color: #f5f7fa;
}

.preview pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

@media (max-width: 680px) {
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .upload-button {
    width: 100%;
    justify-content: center;
  }

  .workspace {
    padding: 20px;
  }
}
