:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1a1f2e;
  --muted: #5c6578;
  --accent: #5b6fd6;
  --border: #e2e6ef;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 1rem 1.25rem 3rem; }

header.site {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.logo { font-weight: 600; color: var(--text); }

nav.tabs { display: flex; flex-wrap: wrap; gap: 0.35rem; }
nav.tabs a {
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}
nav.tabs a.active { background: #eef1ff; color: var(--accent); font-weight: 600; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
}

h1 { font-size: 1.45rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; }

.meta { color: var(--muted); font-size: 0.9rem; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none !important;
}
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: #e8ebf5; color: var(--text) !important; }

input[type=text], input[type=password], textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

textarea { min-height: 120px; }

.error { color: #b42318; margin-top: 0.5rem; }
.status { padding: 0.75rem; border-radius: 8px; background: #f0f4ff; margin: 1rem 0; }
.status.failed { background: #fef3f2; color: #b42318; }
.status.running { background: #fffaeb; }

.concept {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem 0;
}

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { border-bottom: 1px solid var(--border); padding: 0.5rem; text-align: left; vertical-align: top; }

.copy-box {
  background: #f3f4f8;
  border-radius: 8px;
  padding: 1rem;
  white-space: pre-wrap;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  header.site .inner { flex-direction: column; align-items: flex-start; }
  nav.tabs { width: 100%; }
}
