:root {
  --bg: #f7f8f3;
  --ink: #16221f;
  --muted: #65736d;
  --line: #d9dfd2;
  --surface: #ffffff;
  --teal: #0d6b5f;
  --teal-dark: #0a4d45;
  --amber: #b56b13;
  --red: #b23b38;
  --yellow: #fff3bf;
  --mint: #dff4ea;
  --shadow: 0 20px 45px rgba(19, 44, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(13, 107, 95, 0.12), transparent 32rem),
    linear-gradient(180deg, #fbfcf8 0%, var(--bg) 44%, #eef2ea 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
textarea {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand,
.nav a {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.98rem;
  font-weight: 760;
}

.brand-mark {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 0.45rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2.2rem;
  align-items: end;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.55rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 660px;
  margin: 1.3rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

button {
  min-height: 2.75rem;
  border: 1px solid var(--teal);
  border-radius: 0.45rem;
  padding: 0.7rem 1rem;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--teal-dark);
}

button.secondary {
  background: var(--surface);
  color: var(--teal-dark);
}

.signal-board,
.editor-column,
.metrics > div,
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.signal-board {
  padding: 1rem;
}

.board-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.board-row strong {
  color: var(--teal-dark);
  font-size: 1.45rem;
}

.board-row.warning strong {
  color: var(--amber);
}

.board-row.danger strong {
  color: var(--red);
}

.signal-board p {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.workbench {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}

.editor-column {
  padding: 1rem;
}

label {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
}

.field-note {
  margin: 0.25rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.86rem;
}

textarea {
  width: 100%;
  min-height: 18rem;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  padding: 0.85rem;
  background: #fbfcf8;
  color: var(--ink);
  line-height: 1.55;
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
}

.report-band {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}

.report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-head h2,
.boundaries h2 {
  margin: 0;
  font-size: 1.65rem;
}

#statusText {
  max-width: 720px;
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metrics > div {
  padding: 1rem;
  box-shadow: none;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 2rem;
}

.table-wrap {
  overflow-x: auto;
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f0f5ef;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.severity {
  display: inline-block;
  min-width: 5.2rem;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.severity.fail {
  background: #f8dddd;
  color: var(--red);
}

.severity.warn {
  background: var(--yellow);
  color: var(--amber);
}

.severity.pass {
  background: var(--mint);
  color: var(--teal-dark);
}

.boundaries {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
}

.boundaries ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.boundaries li {
  border-left: 4px solid var(--teal);
  background: rgba(255, 255, 255, 0.72);
  padding: 1rem;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .hero,
  .workbench,
  .metrics,
  .boundaries ul {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 2.2rem;
  }

  .report-head,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
