:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --text: #1f2522;
  --muted: #68716d;
  --border: #d9ded9;
  --accent: #206a5d;
  --accent-strong: #164b42;
  --danger: #a73535;
  --success: #286b3f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

p {
  color: var(--muted);
}

.login-panel,
.script-card,
.result {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.login-panel {
  width: min(420px, 100%);
  margin: 12vh auto 0;
  padding: 28px;
}

.form,
.run-form {
  display: grid;
  gap: 14px;
}

.form {
  margin-top: 24px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
input:not([type]) {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
}

button,
.link-button {
  border: 0;
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.link-button:hover {
  background: var(--accent-strong);
}

.script-grid {
  display: grid;
  gap: 16px;
}

.script-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
}

.script-card p {
  margin-top: 8px;
}

code {
  display: inline-block;
  max-width: 100%;
  margin-top: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.checkbox {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.result {
  margin-bottom: 20px;
  overflow: hidden;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.result-heading span {
  color: var(--muted);
  font-weight: 700;
}

.result-success .result-heading span {
  color: var(--success);
}

.result-error .result-heading span,
.error {
  color: var(--danger);
}

pre {
  margin: 0;
  max-height: 520px;
  overflow: auto;
  padding: 18px;
  background: #111816;
  color: #edf7f1;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

  .topbar,
  .script-card,
  .result-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .run-form {
    justify-items: start;
  }
}
