:root {
  color: #172033;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: #f7f8fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

button {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin-bottom: 22px;
}

.eyebrow {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #eef2ff;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

h2 {
  color: #111827;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

h3 {
  color: #0f172a;
  font-size: 1rem;
}

.hero p,
.panel p {
  color: #64748b;
  line-height: 1.65;
}

.hero-link {
  width: fit-content;
}

.hero-link:hover {
  text-decoration: underline;
}

.hero-link::after {
  content: '↗';
}

.clear-button,
.runner-card button {
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(15 23 42 / 6%);
}

.controls-panel,
.section-heading {
  display: grid;
  gap: 16px;
}

.runner-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.runner-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-height: 180px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.runner-card.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.runner-card p {
  margin-top: 8px;
  font-size: 0.92rem;
}

.runner-card button {
  width: fit-content;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: #2563eb;
  border-color: #2563eb;
}

.runner-card button:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.runner-card button:disabled,
.clear-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.clear-button {
  width: fit-content;
  color: #9f1239;
  font-weight: 800;
  cursor: pointer;
}

.results-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.badge {
  align-self: start;
  padding: 6px 10px;
  border-radius: 8px;
  color: #166534;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  background: #dcfce7;
}

.badge.running {
  color: #92400e;
  background: #fef3c7;
}

.badge.error {
  color: #991b1b;
  background: #fee2e2;
}

.alert,
.success {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.alert {
  color: #991b1b;
  background: #fee2e2;
}

.success {
  color: #166534;
  background: #dcfce7;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

th {
  color: #475569;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f8fafc;
}

td {
  color: #1f2937;
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: 0;
}

.empty {
  padding: 40px 14px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 980px) {
  .runner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding: 28px 0;
  }

  .panel {
    padding: 16px;
  }

  .runner-grid,
  .results-header {
    grid-template-columns: 1fr;
  }

  .results-header {
    display: grid;
  }
}
