/* Kynovatix People Assessment: candidate portal. */
:root {
  /* Kynovatix brand: wordmark navy, brand blue, and the X gradient (cyan > blue > violet). */
  --ink: #071629;
  --text2: #3a4a63;
  --mute: #5b6b82;
  --line: #dce6f1;
  --bg: #f4f8fc;
  --card: #ffffff;
  --accent: #0b5fd0;
  --accent-soft: #eaf2fd;
  --least: #071629;
  --least-soft: #e9edf3;
  --gradient: linear-gradient(90deg, #00a6f5 0%, #087bfa 48%, #5428f5 100%);
  --error: #a4262c;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
main.wrap { flex: 1; padding-top: 36px; padding-bottom: 56px; }

.bar { background: var(--card); border-bottom: 1px solid var(--line); position: relative; }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gradient); }
.bar-in { max-width: 760px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.brand { height: 14px; width: auto; display: block; }
.product { color: var(--mute); font-size: 13px; letter-spacing: .04em; border-left: 1px solid var(--line); padding-left: 16px; line-height: 1; }
.foot { border-top: 1px solid var(--line); color: var(--mute); font-size: 12px; padding: 16px 0; }

h1 { font-family: Sora, Inter, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 600; }
h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 32px 0 12px; font-weight: 650; }
p { margin: 0 0 14px; }
.muted { color: var(--mute); }
.small { font-size: 13px; }
.lead { font-size: 17px; color: var(--text2); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.stack > * + * { margin-top: 16px; }

label.field { display: block; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
label.field span.hint { font-weight: 400; color: var(--mute); }
input[type=text], input[type=email], input[type=tel] {
  display: block; width: 100%; margin-top: 6px; padding: 12px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #c3c9d4; border-radius: var(--radius);
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.code { font-size: 24px; letter-spacing: .4em; text-align: center; max-width: 240px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }

button { font: inherit; cursor: pointer; border-radius: var(--radius); }
.btn { padding: 12px 22px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; min-height: 48px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: #c3c9d4; }
.btn.link { background: none; border: none; color: var(--accent); padding: 12px 0; min-height: 0; font-weight: 600; text-decoration: underline; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 24px; flex-wrap: wrap; }
.actions .right { margin-left: auto; display: flex; gap: 12px; }

.alert { border-left: 3px solid var(--error); background: #fdf3f3; color: var(--error); padding: 12px 14px; font-size: 14px; border-radius: var(--radius); }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 14px; font-size: 14px; border-radius: var(--radius); }

/* Progress */
.progress-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--mute); margin-bottom: 8px; }
.progress-row strong { color: var(--ink); letter-spacing: .04em; }
progress { width: 100%; height: 4px; border-radius: 2px; overflow: hidden; appearance: none; -webkit-appearance: none; border: none; background: var(--line); display: block; margin-bottom: 28px; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--gradient); }
progress::-moz-progress-bar { background: var(--gradient); }

/* Question */
.scenario { font-size: 18px; line-height: 1.5; margin: 0 0 8px; }
.howto { font-size: 13px; color: var(--mute); margin-bottom: 20px; }
.options { list-style: none; margin: 0; padding: 0; }
.option { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.option.is-most { border-color: var(--accent); background: var(--accent-soft); }
.option.is-least { border-color: var(--least); background: var(--least-soft); }
.option p { margin: 0 0 12px; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick button { min-height: 44px; padding: 8px 10px; background: #fff; border: 1px solid #c3c9d4; color: var(--ink); font-size: 14px; font-weight: 600; }
.pick button.most[aria-pressed=true] { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick button.least[aria-pressed=true] { background: var(--least); border-color: var(--least); color: #fff; }
.save { font-size: 12px; color: var(--mute); min-height: 18px; }
.save.err { color: var(--error); }

/* Review */
.review { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.review li { border-bottom: 1px solid var(--line); }
.review button { width: 100%; text-align: left; background: none; border: none; padding: 14px 0; display: flex; gap: 14px; align-items: baseline; color: var(--ink); }
.review .n { font-weight: 700; font-size: 13px; width: 28px; flex: none; color: var(--mute); }
.review .t { flex: 1; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.review .s { font-size: 12px; font-weight: 600; flex: none; color: var(--accent); }
.howto { color: var(--mute); }
.review .s.todo { color: var(--error); }

@media (min-width: 640px) {
  main.wrap { padding-top: 56px; }
  h1 { font-size: 34px; }
  .card { padding: 36px; }
  .option { display: grid; grid-template-columns: 1fr 250px; gap: 20px; align-items: center; padding: 18px 20px; }
  .option p { margin: 0; }
}
@media (max-width: 420px) {
  .actions .btn { flex: 1; }
  .actions .right { flex: 1; }
}
