:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #66727f;
  --line: #e2e6ea;
  --accent: #2f6fed;
  --accent-ink: #ffffff;
  --true: #1f9d57;
  --false: #c2410c;
  --max: 720px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
.subtitle { color: var(--muted); margin: 0 0 1.5rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

label.statement {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
label.statement:last-child { border-bottom: none; }
label.statement input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; flex: none; }

input[type="text"], input[type="password"] {
  width: 100%;
  padding: .6rem .7rem;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

button {
  font-size: 1rem;
  font-weight: 600;
  padding: .65rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: default; }

.note { color: var(--muted); font-size: .9rem; }
.error { color: var(--false); font-size: .9rem; min-height: 1.2em; }
.hidden { display: none !important; }

.gate {
  max-width: 380px;
  margin: 4rem auto;
}

.confirm {
  text-align: center;
  padding: 2rem 1rem;
}
.confirm .score {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

/* Results bar chart */
.chart { display: flex; flex-direction: column; gap: .6rem; }
.bar-row { display: flex; align-items: center; gap: .75rem; }
.bar-name {
  flex: 0 0 9rem;
  text-align: right;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track {
  flex: 1 1 auto;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 1.7rem;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  min-width: 1.6rem;
  background: var(--accent);
  border-radius: 6px 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: width .35s ease;
}
.bar-value {
  color: var(--accent-ink);
  font-weight: 700;
  font-size: .85rem;
  padding: 0 .5rem;
}
.axis { display: flex; align-items: flex-start; gap: .75rem; margin-top: .2rem; }
.axis-spacer { flex: 0 0 9rem; }
.axis-scale { position: relative; flex: 1 1 auto; height: 1.4rem; }
.tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tick-line { width: 1px; height: .4rem; background: var(--muted); }
.tick-num { font-size: .75rem; color: var(--muted); margin-top: .15rem; }

@media (max-width: 480px) {
  .bar-name, .axis-spacer { flex-basis: 5.5rem; }
  .bar-name { font-size: .9rem; }
}
/* Demo-mode banner */
.demo-banner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
  justify-content: center;
  background: #fff6e0;
  border-bottom: 1px solid #f0d98a;
  color: #6b4e00;
  padding: .6rem 1rem;
  font-size: .9rem;
}
.demo-banner code {
  background: #fdeec0;
  padding: .05rem .35rem;
  border-radius: 4px;
}
.demo-reset {
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .7rem;
  background: #6b4e00;
  border-radius: 6px;
}
