:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #566074;
  --border: #d5d9e4;
  --primary: #2f4bd8;
  --analytical: #2b6cb0;
  --driver: #c0392b;
  --amiable: #2f855a;
  --expressive: #b7791f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

main {
  max-width: 680px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(20, 30, 60, 0.08);
}

@media (max-width: 720px) {
  main {
    margin: 0;
    border-radius: 0;
    min-height: 100vh;
  }
}

[hidden] {
  display: none !important;
}

h1,
h2 {
  line-height: 1.25;
  margin-top: 0;
}

h1:focus,
h2:focus {
  outline: none;
}

button {
  font: inherit;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

button:focus-visible,
.option:focus-within {
  outline: 3px solid #9db0ff;
  outline-offset: 2px;
}

.progress {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 0.2s;
}

.progress-label {
  color: var(--muted);
  font-size: 0.9rem;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

legend {
  padding: 0;
}

legend h2 {
  font-size: 1.3rem;
}

.options {
  display: grid;
  gap: 0.6rem;
}

.option {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.option:hover {
  border-color: var(--primary);
  background: #f2f4ff;
}

.option input {
  margin-top: 0.3rem;
}

.reminder {
  background: #eef2ff;
  border-left: 4px solid var(--primary);
  padding: 0.7rem 1rem;
  border-radius: 4px;
}

.note {
  color: var(--muted);
}

.chart {
  display: grid;
  gap: 0.7rem;
  margin: 1.5rem 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 6.5rem 1fr 3rem;
  align-items: center;
  gap: 0.6rem;
}

.bar-row.lead .bar-label {
  font-weight: 700;
}

.bar-track {
  background: #e8ebf3;
  border-radius: 6px;
  height: 22px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  min-width: 2px;
}

.bar-fill.analytical {
  background: var(--analytical);
}
.bar-fill.driver {
  background: var(--driver);
}
.bar-fill.amiable {
  background: var(--amiable);
}
.bar-fill.expressive {
  background: var(--expressive);
}

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.synopsis {
  border-top: 4px solid var(--border);
  padding-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.synopsis.analytical {
  border-color: var(--analytical);
}
.synopsis.driver {
  border-color: var(--driver);
}
.synopsis.amiable {
  border-color: var(--amiable);
}
.synopsis.expressive {
  border-color: var(--expressive);
}

.synopsis h4 {
  margin-bottom: 0.2rem;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
}
