@import url("../source-panel.css");

:root {
  --page: #f2f5f3;
  --surface: #ffffff;
  --ink: #17251d;
  --muted: #495b50;
  --line: #c5d2c8;
  --brand: #174f2d;
  --brand-dark: #0e351d;
  --accent: #d97706;
  --success: #15803d;
  --danger: #b91c1c;
  --soft: #e5ede7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.page { width: min(56rem, 100%); margin: 0 auto; }

.page-header {
  margin: 0 0 20px;
  padding: 22px;
  background: var(--brand);
  color: #fff;
  border-radius: 14px;
  text-align: center;
}

.page-header h1,
.page-header p { margin: 0 0 8px; }

.page-header p { color: #dceade; }

.card {
  margin: 0 0 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.card h2 { margin: 0 0 10px; color: var(--brand); }

.help {
  margin: 0 0 12px;
  color: var(--muted);
}

.field { margin: 14px 0; }

.field label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
}

.field .inline {
  display: inline;
  font-weight: 400;
}

input,
select,
button,
textarea {
  font: inherit;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #789383;
  border-radius: 0.5rem;
  background: #fff;
}

.field textarea {
  min-height: 5rem;
  resize: vertical;
}

.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
  min-height: auto;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: #fff;
  border-color: #789383;
  color: var(--ink);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 12px;
}

.message {
  margin: 12px 0 0;
  padding: 0.65rem 0.8rem;
  background: var(--soft);
  border-radius: 0.5rem;
}

.message.ok {
  background: #dcfce7;
  color: var(--success);
}

.message.bad {
  background: #fee2e2;
  color: var(--danger);
}

.meter {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 8px 0;
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 12px 0;
}

@media (max-width: 640px) {
  .loop-grid {
    grid-template-columns: 1fr;
  }
}

.loop-col {
  min-height: 8rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--soft);
}

.loop-col h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.loop-col ul {
  margin: 0;
  padding-left: 1.1rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
}

.loop-col li {
  margin: 0.2rem 0;
}

.timeline {
  margin: 12px 0 0;
  padding: 0.75rem;
  background: #0f1f16;
  color: #dceade;
  border-radius: 0.5rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  min-height: 4rem;
}

.result-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.result-list li {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  margin: 0 0 0.4rem;
  background: #fff;
}

.result-list li.is-muted {
  opacity: 0.55;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--soft);
  color: var(--brand-dark);
}

.badge.warn {
  background: #ffedd5;
  color: #9a3412;
}

.badge.ok {
  background: #dcfce7;
  color: var(--success);
}

.badge.bad {
  background: #fee2e2;
  color: var(--danger);
}

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

@media (max-width: 640px) {
  .split-two {
    grid-template-columns: 1fr;
  }
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 12px 0;
}

@media (max-width: 640px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

.compare-panel {
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--soft);
}

.compare-panel h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.pipeline {
  margin: 12px 0;
  padding: 0.75rem 1rem;
  background: var(--soft);
  border-radius: 0.5rem;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95rem;
}
