:root {
  color-scheme: light;
  --border: #3335;
  --accent: #4a7dff;
}
body {
  font-family: system-ui, sans-serif;
  max-width: min(1000px, 92vw);
  margin: 2rem auto;
  padding: 0 1rem;
  line-height: 1.5;
  background: #ffffff;
  color: #1a1a1a;
}
header .subtitle { opacity: 0.8; }
.hint { font-size: 0.9rem; opacity: 0.75; }
select {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: Canvas;
  color: CanvasText;
  margin-bottom: 0.5rem;
}
input[type="text"] {
  display: block;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.checkbox-label input[type="checkbox"] {
  margin: 0;
}
button {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  background: transparent;
  cursor: pointer;
}
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button:disabled { cursor: not-allowed; opacity: 0.5; }
pre {
  background: #0002;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
}
.banner {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
}
.banner.success { background: #1a7f3722; border: 1px solid #1a7f37; }
.banner.failed { background: #cf222e22; border: 1px solid #cf222e; }
.hidden { display: none !important; }

.account-list { padding-left: 1.2rem; }
.account-list li { margin-bottom: 0.25rem; }

/* --- Linear flow (v4): one step section at a time, stacked top to bottom --- */
main section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
main section h2 { margin: 0 0 0.5rem; font-size: 1.05rem; }
main section h3 {
  margin: 1rem 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
}
main section h3:first-of-type { margin-top: 0.5rem; }

/* --- Step 10: metric catalog --- */
.rules-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1rem;
  font-size: 0.85rem;
}
.rules-list li { margin-bottom: 0.3rem; }
.metrics-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
table.metrics-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; white-space: nowrap; }
table.metrics-table th, table.metrics-table td {
  text-align: left;
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
table.metrics-table thead th {
  position: sticky;
  top: 0;
  background: Canvas;
}
.adv-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: #4a7dff22;
  border: 1px solid var(--accent);
}
