:root {
  --blue: #007fc4;
  --deep-blue: #07546d;
  --cyan: #10a7ba;
  --yellow: #ffd400;
  --ink: #17313b;
  --muted: #5f7580;
  --line: #d6e8ed;
  --paper: #ffffff;
  --soft: #edf9fb;
  --danger: #c73b3b;
  --success: #16825d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 212, 0, 0.26), transparent 26%),
    linear-gradient(135deg, #e6f7fa 0%, #f8fcfd 52%, #fff8d8 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 28px;
  min-height: 340px;
  padding: 34px;
  border: 1px solid rgba(7, 84, 109, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 70px rgba(7, 84, 109, 0.13);
  overflow: hidden;
}

.brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 44px;
  background: var(--yellow);
  color: var(--blue);
  font-weight: 800;
  letter-spacing: 0;
  border-radius: 6px;
  box-shadow: inset 0 -5px 0 rgba(0, 127, 196, 0.11);
}

.brand-kicker {
  color: var(--deep-blue);
  font-size: 0.9rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--deep-blue);
  font-weight: 700;
}

.hero-stats strong {
  color: var(--blue);
}

.hero-visual {
  align-self: stretch;
  min-height: 260px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(7, 84, 109, 0.16);
  background: var(--soft);
}

.hero-visual img,
.material-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.quiz-panel {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.identity-card,
.question-card,
.result-panel {
  border: 1px solid rgba(7, 84, 109, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 42px rgba(7, 84, 109, 0.09);
}

.identity-card {
  padding: 22px;
}

.identity-card h2 {
  font-size: 1.15rem;
}

.identity-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--deep-blue);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 127, 196, 0.14);
}

.material-card {
  height: 210px;
  margin-top: 22px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.question-card {
  min-height: 520px;
  padding: 26px;
}

.progress-row {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  color: var(--deep-blue);
  font-size: 0.92rem;
  font-weight: 800;
}

.progress-track {
  height: 10px;
  border-radius: 99px;
  background: #dceff3;
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--cyan), var(--blue));
  border-radius: inherit;
  transition: width 180ms ease;
}

.question-text {
  margin-bottom: 20px;
  font-size: clamp(1.25rem, 2.2vw, 1.85rem);
  line-height: 1.35;
}

.option-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.option-btn {
  width: 100%;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.option-btn:hover,
.option-btn:focus-visible {
  border-color: var(--blue);
  background: #f1fbfd;
  transform: translateY(-1px);
  outline: none;
}

.option-btn.selected {
  border-color: var(--blue);
  background: #e2f8fc;
  box-shadow: inset 5px 0 0 var(--yellow);
  font-weight: 800;
}

.actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}

button.primary,
button.secondary {
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

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

button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--deep-blue);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.result-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  margin-top: 22px;
  padding: 26px;
}

.result-panel[hidden] {
  display: none;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #e9fff7;
  color: var(--success);
  font-weight: 800;
}

.result-badge.retry {
  background: #fff0f0;
  color: var(--danger);
}

.result-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 4vw, 3rem);
  letter-spacing: 0;
}

.result-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.score-grid div {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfeff;
}

.score-grid strong,
.score-grid span {
  display: block;
}

.score-grid strong {
  color: var(--blue);
  font-size: 1.45rem;
}

.score-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.certificate {
  position: relative;
  min-height: 260px;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(0, 127, 196, 0.96), rgba(7, 84, 109, 0.96)),
    url("assets/peran-pegawai.png") center / cover;
  overflow: hidden;
}

.certificate::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  pointer-events: none;
}

.cert-label {
  display: block;
  margin-bottom: 42px;
  color: var(--yellow);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.certificate h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-size: 1.7rem;
}

.certificate p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.cert-seal {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 5px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--yellow);
  color: var(--deep-blue);
  font-weight: 900;
}

@media (max-width: 900px) {
  .hero,
  .quiz-panel,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 24px;
  }

  .hero-visual {
    min-height: 220px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero,
  .identity-card,
  .question-card,
  .result-panel {
    padding: 18px;
  }

  .progress-row,
  .score-grid {
    grid-template-columns: 1fr;
  }

  .actions,
  .result-actions {
    justify-content: stretch;
  }

  button.primary,
  button.secondary {
    width: 100%;
  }
}
