:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #1f2933;
}

* {
  box-sizing: border-box;
}

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

button {
  border: 1px solid #9aa6b2;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2933;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  min-height: 44px;
  padding: 0 18px;
}

button:disabled {
  color: #8b95a1;
  cursor: not-allowed;
  opacity: 0.7;
}

button:first-child {
  background: #175cd3;
  border-color: #175cd3;
  color: #ffffff;
}

.app {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(280px, 440px) minmax(320px, 1fr);
  max-width: 1120px;
  min-height: 100vh;
  padding: 40px;
  margin: 0 auto;
}

.panel,
.log-panel {
  align-self: start;
  background: #ffffff;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(31, 41, 51, 0.08);
}

.panel {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.eyebrow {
  color: #5f6b7a;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 2.2rem;
  line-height: 1.05;
}

h2 {
  font-size: 1rem;
}

.summary {
  color: #536171;
  line-height: 1.55;
  margin-top: 12px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.options {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
}

.options label {
  color: #667585;
  display: grid;
  font-size: 0.78rem;
  gap: 6px;
}

.options select {
  appearance: none;
  background: #ffffff;
  border: 1px solid #bcc7d3;
  border-radius: 8px;
  color: #1f2933;
  font: inherit;
  min-height: 40px;
  padding: 0 10px;
}

.status-grid {
  display: grid;
  gap: 10px;
}

.status-grid div {
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 14px;
}

.status-grid span {
  color: #667585;
  font-size: 0.78rem;
}

.status-grid strong {
  font-size: 0.95rem;
}

.log-panel {
  min-height: 520px;
  overflow: hidden;
}

.log-header {
  align-items: center;
  border-bottom: 1px solid #e2e7ee;
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

#clearLog {
  min-height: 34px;
  padding: 0 12px;
}

#events {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  max-height: 70vh;
  overflow: auto;
  padding: 18px;
}

#events li {
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  white-space: pre-wrap;
}

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  h1 {
    font-size: 1.85rem;
  }
}
