/* ==========================================================================
   eligible-script.css
   ========================================================================== */

/* ---------- Scope: variables, base font, box-sizing, layout ---------- */
.kpoint {
  --text: #111827;
  --text-muted: #374151;
  --text-soft: #4b5563;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --card-bg: #ffffff;
  --page-bg: #ffffff;
  --accent: #2563eb;
  --accent-soft: #eaf2ff;
  --accent-ring: rgba(37, 99, 235, 0.15);
  --shadow: 0 1px 3px rgba(17, 24, 39, 0.08);
  --font-display: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Noto Sans KR", "Figtree", system-ui, -apple-system, sans-serif;

  font-family: var(--font-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;

  max-width: 722px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.kpoint,
.kpoint *,
.kpoint *::before,
.kpoint *::after {
  box-sizing: border-box;
}

/* ---------- Header ---------- */
.kpoint h1 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text);
}


.kpoint p {
  color: #000000;
  margin: 18px 0;
  line-height: 24px;
  letter-spacing: 0.2%;
}



.kpoint .kpoint__form {
  display: flex;
  flex-direction: column;
  gap: 42px;
}

/* ---------- Section card ---------- */
.kpoint .kpoint__form .section {
  margin: 0;
  padding: 20px 20px 20px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.03);
}

.kpoint .section__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  margin-bottom: 14px;
  float: left;
  /* lets legend sit inside the padded card */
  width: 100%;
}

.kpoint .section__head+* {
  clear: both;
}

.kpoint .section__badge {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

.kpoint .section__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.kpoint .section__desc {
  margin: 0 0 26px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Radio options ---------- */
.kpoint .options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.kpoint .option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 0 18px 0 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.kpoint .option:hover {
  border-color: var(--border-strong);
}

.kpoint .option input,
.kpoint .check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.kpoint .option__text {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.kpoint .option__radio {
  position: relative;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border: 1.5px solid #9ca3af;
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.kpoint .option__radio::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.kpoint .option input:checked~.option__radio {
  border-color: var(--accent);
}

.kpoint .option input:checked~.option__radio::after {
  transform: scale(1);
}

.kpoint .option:has(input:checked) {
  border-color: var(--accent);
  background: #f8fbff;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.kpoint .option input:focus-visible~.option__radio {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Checkboxes ---------- */
.kpoint .checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpoint .check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.kpoint .check:hover {
  border-color: var(--border-strong);
}

.kpoint .check__box {
  position: relative;
  width: 26px;
  height: 26px;
  margin-top: 4px;
  border: 1.5px solid #9ca3af;
  border-radius: 5px;
  background: #fff;
  flex-shrink: 0;
  transition: background-color 0.15s, border-color 0.15s;
}

.kpoint .check__box::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.kpoint .check input:checked~.check__box {
  background: var(--accent);
  border-color: var(--accent);
}

.kpoint .check input:checked~.check__box::after {
  transform: rotate(45deg) scale(1);
}

.kpoint .check input:focus-visible~.check__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.kpoint .check:has(input:checked) {
  border-color: var(--accent);
  background: #f8fbff;
}

.kpoint .check__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpoint .check__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.kpoint .check__sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ---------- Deductions ---------- */
.kpoint .deductions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kpoint .deduction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  min-height: 84px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s, background-color 0.15s;
}

.kpoint .deduction.is-active {
  border-color: #fca5a5;
  background: #fffafa;
}

.kpoint .deduction__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.kpoint .deduction__title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

.kpoint .deduction__sub {
  font-size: 15px;
  color: var(--text-muted);
}

.kpoint .select {
  position: relative;
  width: 250px;
  flex-shrink: 0;
}

.kpoint .select::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 7px;
  height: 7px;
  border: solid var(--text);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.kpoint .select select {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-soft);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.kpoint .select select:hover {
  border-color: var(--border-strong);
}

.kpoint .select select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* ---------- Actions ---------- */
.kpoint .actions {
  display: flex;
  gap: 12px;
  margin-top: -12px;
}

.kpoint .btn-calc,
.kpoint .btn-reset {
  height: 54px;
  padding: 0 28px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
}

.kpoint .btn-calc {
  flex: 1;
  border: none;
  background: var(--accent);
  color: #fff;
}

.kpoint .btn-calc:hover {
  background: #1d4ed8;
}

.kpoint .btn-calc:active,
.kpoint .btn-reset:active {
  transform: translateY(1px);
}

.kpoint .btn-reset {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
}

.kpoint .btn-reset:hover {
  border-color: var(--border-strong);
}

.kpoint .btn-calc:focus-visible,
.kpoint .btn-reset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-ring);
}

/* ---------- Result ---------- */
.kpoint .result {
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  animation: kpointResultIn 0.25s ease;
}

.kpoint .result--pass {
  border-color: #86efac;
  background: #f6fef9;
}

.kpoint .result--fail {
  border-color: #fca5a5;
  background: #fffafa;
}

.kpoint .result--error {
  border-color: #fcd34d;
  background: #fffdf5;
}

@keyframes kpointResultIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.kpoint .result__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.kpoint .result__label {
  font-size: 15px;
  color: var(--text-muted);
}

.kpoint .result__score {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--text);
}

.kpoint .result__score small {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-soft);
}

.kpoint .result__status {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

.kpoint .result--pass .result__status {
  background: #dcfce7;
  color: #166534;
}

.kpoint .result--fail .result__status {
  background: #fee2e2;
  color: #991b1b;
}

.kpoint .result__bar {
  height: 8px;
  border-radius: 999px;
  background: #eef0f3;
  overflow: hidden;
  margin-bottom: 18px;
}

.kpoint .result__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.4s ease;
}

.kpoint .result--pass .result__bar span {
  background: #16a34a;
}

.kpoint .result--fail .result__bar span {
  background: #dc2626;
}

.kpoint .result__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.kpoint .result__rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-muted);
}

.kpoint .result__rows li b {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.kpoint .result__rows li.neg b {
  color: #b91c1c;
}

.kpoint .result__note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}

.kpoint .result__error {
  margin: 0;
  font-size: 16px;
  color: #92400e;
}

.kpoint .kpoint__form .section.has-error {
  border-color: #fcd34d;
  box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.25);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .kpoint .kpoint__title {
    font-size: 21px;
  }

  .kpoint .kpoint__intro {
    font-size: 15px;
    margin-bottom: 36px;
  }

  .kpoint .kpoint__form {
    gap: 28px;
  }

  .kpoint .kpoint__form .section {
    padding: 18px 14px;
  }

  .kpoint .section__title {
    font-size: 17px;
  }

  .kpoint .section__desc {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .kpoint .options {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .kpoint .option {
    min-height: 58px;
    padding: 0 14px;
  }

  .kpoint .option__text {
    font-size: 16px;
  }

  .kpoint .check__title,
  .kpoint .deduction__title {
    font-size: 16px;
  }

  .kpoint .check__sub,
  .kpoint .deduction__sub {
    font-size: 14px;
  }

  .kpoint .deduction {
    flex-direction: column;
    align-items: stretch;
  }

  .kpoint .select {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .kpoint .options {
    grid-template-columns: 1fr;
  }
}