:root {
  --navy: #1c2b4a;
  --navy-dark: #13203a;
  --accent: #2f6fed;
  --accent-dark: #1e4fbd;
  --green: #1f9d55;
  --red: #d64545;
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #e1e6f0;
  --text: #1f2937;
  --muted: #6b7280;
}

* { box-sizing: border-box; }

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

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

header.app-header {
  background: var(--navy);
  color: #fff;
  padding: 20px 20px;
}

header.app-header .inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.app-header h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

header.app-header .sub {
  font-size: 13px;
  color: #b9c3dd;
  margin-top: 2px;
}

.card {
  background: var(--card);
  border: 5px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(20, 30, 60, 0.05);
}

h2 { margin-top: 0; font-size: 20px; }

label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--navy);
}

input[type=text], input[type=email] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}

input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--accent-dark); }

.btn.secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn.danger { background: var(--red); }

.question-block {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.question-block:last-child { border-bottom: none; }

.q-num {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

.q-text { font-weight: 600; margin: 6px 0 12px; }

.options label {
  font-weight: 400;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  color: var(--text);
}
.options label:hover { border-color: var(--accent); background: #f7f9ff; }
.options input { margin-top: 3px; }

.tf-options { display: flex; gap: 12px; }
.tf-options label {
  flex: 1;
  justify-content: center;
  font-weight: 600;
}

.fill-blank input {
  max-width: 260px;
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar .fill { height: 100%; background: var(--accent); }

.notice {
  background: #fff7e6;
  border: 1px solid #f2d78a;
  color: #13203a;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.error {
  background: #fdecec;
  border: 1px solid #f5b5b5;
  color: #9b1c1c;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
th { background: #f0f3fa; font-weight: 700; color: var(--navy); }
tr:hover td { background: #fafbff; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.badge.pass { background: #e6f7ec; color: var(--green); }
.badge.fail { background: #fdecec; color: var(--red); }

.score-circle {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 8px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto 20px;
}
.score-circle .pct { font-size: 28px; font-weight: 800; color: var(--navy); }
.score-circle .lbl { font-size: 11px; color: var(--muted); }

.review-item.correct { border-left: 4px solid var(--green); padding-left: 12px; }
.review-item.incorrect { border-left: 4px solid var(--red); padding-left: 12px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px;}

footer.app-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0;
}

a { color: var(--accent); }
