:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17201c;
  background: #eef2ed;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(205, 226, 207, 0.75), transparent 34rem),
    #eef2ed;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #557266;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  letter-spacing: -0.04em;
}

.subtitle {
  margin: 10px 0 0;
  color: #607069;
  line-height: 1.55;
}

.environment {
  border: 1px solid #a9c3b4;
  border-radius: 999px;
  padding: 7px 13px;
  color: #315b48;
  background: rgba(236, 248, 240, 0.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.panel {
  overflow: hidden;
  border: 1px solid rgba(46, 67, 57, 0.16);
  border-radius: 18px;
  background: rgba(250, 252, 249, 0.94);
  box-shadow: 0 24px 70px rgba(29, 48, 39, 0.1);
}

.toolbar,
.filename-row,
.actions,
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid #dde5df;
}

.file-tabs {
  display: flex;
  gap: 7px;
}

.file-tab {
  border: 0;
  border-radius: 9px;
  padding: 9px 13px;
  color: #5b6962;
  background: transparent;
  cursor: pointer;
}

.file-tab:hover {
  background: #edf2ee;
}

.file-tab.is-active {
  color: #f7fbf8;
  background: #244f3b;
}

.file-tab:focus-visible,
.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(59, 130, 95, 0.3);
  outline-offset: 2px;
}

.dirty-indicator {
  border-radius: 999px;
  padding: 5px 9px;
  color: #805418;
  background: #fff1cf;
  font-size: 0.78rem;
  font-weight: 700;
}

.filename-row {
  padding: 13px 20px;
  color: #67736d;
  font-size: 0.82rem;
}

.filename-row code {
  color: #33433b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.filename-row a {
  color: #2f6c50;
  text-underline-offset: 3px;
}

textarea {
  display: block;
  width: calc(100% - 40px);
  min-height: 52vh;
  margin: 0 20px;
  resize: vertical;
  border: 1px solid #cfdad2;
  border-radius: 12px;
  padding: 18px;
  color: #dcebe1;
  background: #15231d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.65;
  tab-size: 2;
}

.actions {
  align-items: flex-end;
  padding: 18px 20px 14px;
}

.token-field {
  display: grid;
  width: min(440px, 100%);
  gap: 7px;
  color: #506159;
  font-size: 0.8rem;
  font-weight: 650;
}

.token-field input {
  width: 100%;
  border: 1px solid #cbd7cf;
  border-radius: 10px;
  padding: 10px 12px;
  color: #24312b;
  background: #fff;
}

.buttons {
  display: flex;
  gap: 9px;
}

.button {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.button:disabled,
.file-tab:disabled {
  opacity: 0.55;
  cursor: wait;
}

.button-secondary {
  border-color: #cbd7cf;
  color: #405047;
  background: #fff;
}

.button-primary {
  color: #fff;
  background: #286343;
}

.button-primary:hover:not(:disabled) {
  background: #1e5437;
}

.status-row {
  align-items: baseline;
  padding: 0 20px 18px;
}

.status,
.hint {
  margin: 0;
  font-size: 0.8rem;
}

.status {
  color: #4e6157;
  font-weight: 650;
}

.status[data-kind="success"] {
  color: #217044;
}

.status[data-kind="error"] {
  color: #a23f35;
}

.hint {
  color: #7c8882;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 24px 0;
  }

  .page-header,
  .actions,
  .status-row {
    align-items: stretch;
    flex-direction: column;
  }

  .environment {
    align-self: flex-start;
  }

  .toolbar {
    align-items: flex-start;
  }

  .file-tabs {
    flex-direction: column;
  }

  .filename-row {
    align-items: flex-start;
    flex-direction: column;
  }

  textarea {
    min-height: 48vh;
  }

  .buttons {
    justify-content: flex-end;
  }

  .hint {
    text-align: left;
  }
}
