:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --brand: #1677a8;
  --brand-strong: #0d526f;
  --ink: #102a36;
  --ink-2: #465e68;
  --paper: #f1f5f4;
  --surface: #fbfdfc;
  --line: #d3dedb;
  --green: #157f52;
  --bar-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); }
.sr { position: absolute; left: -9999px; }
a.home { color: var(--ink-2); text-decoration: none; font-size: 13px; margin-right: 12px; }

.app-bar {
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}
.hint { margin: 0; color: var(--ink-2); font-size: 13px; }

.page { max-width: 960px; margin: 0 auto; padding: 32px 20px 80px; }
.lede h1 { font-size: 28px; line-height: 1.25; margin: 8px 0 12px; font-weight: 650; }
.eyebrow { letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-strong); font-size: 12px; margin: 0; }
.note { color: var(--ink-2); margin: 0 0 24px; line-height: 1.55; }

.rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.rail li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.rail span { display: block; color: var(--ink-2); font-size: 11px; }
.rail.on { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(22, 119, 168, 0.12); }
.rail.done { border-color: var(--green); }

.composer {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 16px;
  margin-bottom: 24px;
}
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font: inherit;
  resize: vertical;
  background: var(--surface);
}
.run-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  justify-content: center;
}
button#go {
  font: inherit;
  background: var(--brand);
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 650;
  cursor: pointer;
}
button#go:disabled { opacity: 0.55; cursor: wait; }
.meta { margin: 0; font-size: 12px; color: var(--ink-2); min-height: 1.4em; }

.tabs { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.tab, .ghost {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.tab.on { background: var(--brand-strong); color: white; border-color: var(--brand-strong); }
.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 280px;
  padding: 48px 56px 48px 20px;
}
.copy-btn {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(16, 42, 54, 0.06);
}
.copy-btn svg { width: 15px; height: 15px; display: block; }
.copy-tr { top: 10px; right: 10px; }
.copy-bl { bottom: 10px; left: 10px; }
.copy-btn:hover { border-color: var(--brand); color: var(--brand-strong); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
.body { display: none; white-space: pre-wrap; margin: 0; font: inherit; line-height: 1.6; }
.body.show { display: block; }

@media (max-width: 800px) {
  .composer, .rail { grid-template-columns: 1fr; }
}
