:root {
  color: #16221b;
  background: #edf2ec;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --ink: #16221b;
  --muted: #66736b;
  --line: #d6ded7;
  --paper: #fbfdf9;
  --green: #176840;
  --green-dark: #0d4d2e;
  --green-soft: #e0f1e6;
  --amber-soft: #fff3d6;
  --red: #a22d25;
  --red-soft: #fce8e5;
  --shadow: 0 18px 42px rgba(30, 53, 39, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0%, rgba(105, 171, 126, 0.16), transparent 28rem),
    linear-gradient(180deg, #f6f8f3 0, #edf2ec 34rem);
}

button,
input,
select { font: inherit; }

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(23, 104, 64, 0.24);
  outline-offset: 2px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.3rem max(1.25rem, calc((100vw - 1180px) / 2));
  color: #f6fbf6;
  background: #173b29;
  border-bottom: 4px solid #7cb487;
}

h1, h2, p { margin: 0; }

h1 {
  margin-top: 0.25rem;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.28rem;
  letter-spacing: -0.012em;
}

.eyebrow,
.step {
  color: #9fc7a9;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.step {
  margin-bottom: 0.38rem;
  color: var(--green);
}

.badge {
  flex: 0 0 auto;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.badge-on { color: #123c25; background: #bce1c5; }
.badge-off { color: #f8e8d0; background: rgba(94, 52, 31, 0.42); }

main {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 1.6rem auto 4rem;
}

.notice {
  display: flex;
  gap: 0.85rem;
  align-items: baseline;
  margin-bottom: 1rem;
  padding: 0.9rem 1.05rem;
  color: #704b0e;
  background: var(--amber-soft);
  border: 1px solid #ead29d;
  border-radius: 12px;
  font-size: 0.92rem;
}

.card {
  margin-bottom: 1rem;
  padding: 1.35rem;
  background: rgba(251, 253, 249, 0.94);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card-wide { grid-column: 1 / -1; }

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.1rem;
}

.section-heading > p {
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.section-heading.compact { margin-bottom: 1rem; }

label {
  display: block;
  margin: 0.8rem 0 0.35rem;
  color: #39483f;
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-width: 0;
  padding: 0.72rem 0.8rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bdc9bf;
  border-radius: 9px;
}

input::placeholder { color: #98a39b; }

select {
  appearance: auto;
  cursor: pointer;
}

select:disabled { cursor: not-allowed; }

.field-row,
.button-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.field-row input,
.field-row select { flex: 1 1 24rem; }
.button-row { margin-top: 1rem; flex-wrap: wrap; }

.button {
  min-height: 2.55rem;
  padding: 0.62rem 0.9rem;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid #a8b9ad;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 750;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--green);
}

.button:disabled { opacity: 0.46; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--green); border-color: var(--green); }
.button-primary:hover:not(:disabled) { background: var(--green-dark); }
.button-quiet { color: #5b675f; background: #f4f6f2; }
.button-danger { color: var(--red); border-color: #d9aaa5; background: #fff8f7; }

.output-box {
  display: grid;
  gap: 0.28rem;
  margin-top: 1.15rem;
  padding: 0.85rem;
  background: #f2f6f0;
  border: 1px solid #dbe4da;
  border-radius: 10px;
}

.output-label,
.current-command span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
  word-break: break-all;
}

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

.field-help {
  display: block;
  margin-top: 0.42rem;
  line-height: 1.45;
}

.current-command {
  display: grid;
  justify-items: end;
  gap: 0.28rem;
}

.current-command .button { margin-top: 0.3rem; }

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  padding: 0.72rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid #e1e7e1;
  vertical-align: top;
}

th {
  color: #536159;
  background: #f3f6f1;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr:last-child td { border-bottom: 0; }
.selected-row td { background: #edf7ef; }
.empty { padding: 1.25rem; color: var(--muted); text-align: center; }

.status-pill {
  display: inline-flex;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  color: #46534b;
  background: #e9eeea;
  font-size: 0.74rem;
  font-weight: 800;
}

.status-running { color: #75500e; background: #fff0c9; }
.status-ok { color: #125231; background: #dcefe2; }
.status-bad { color: #8a241e; background: var(--red-soft); }

.result-panel h3 {
  margin: 0 0 0.8rem;
  font-size: 1rem;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.result-note {
  margin: 0.7rem 0 1rem;
  padding: 0.75rem;
  color: #655018;
  background: #fff7df;
  border-radius: 8px;
}

.toast {
  position: sticky;
  bottom: 1rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  color: #eef8f0;
  background: #233d2d;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(23, 45, 31, 0.22);
  font-size: 0.86rem;
}

.toast-warn { color: #5e3c08; background: #ffe5a8; }
.toast-error { color: #fff; background: #962f28; }

@media (max-width: 820px) {
  .grid-two { grid-template-columns: 1fr; }
  .section-heading { flex-direction: column; gap: 0.7rem; }
  .current-command { justify-items: start; }
}

@media (max-width: 600px) {
  .topbar { align-items: flex-start; padding: 1.5rem 1.25rem; }
  main { width: min(100% - 1rem, 1180px); }
  .card { padding: 1rem; border-radius: 12px; }
  .notice { flex-direction: column; gap: 0.3rem; }
  .field-row { align-items: stretch; flex-direction: column; }
  .field-row .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
