/* =========================================================
   Kalkulator Hukum AI - MyJPN
   Semua selector diawali .kh- agar tidak mengganggu halaman lain.
   ========================================================= */

.kh-page {
  --kh-navy: #0b2b5b;
  --kh-blue: #1d4ed8;
  --kh-blue-2: #2563eb;
  --kh-blue-soft: #e8f1ff;
  --kh-border: #d9e3f0;
  --kh-muted: #64748b;
  --kh-text: #17233d;
  --kh-green: #16a34a;
  --kh-yellow: #f59e0b;
  --kh-red: #dc2626;
  background: linear-gradient(180deg, #dcebff 0%, #eef5ff 38%, #f7faff 100%);
  color: var(--kh-text);
}

.kh-hero {
  margin-top: 80px;
  padding: 46px 0 26px;
  background: linear-gradient(135deg, #cfe2ff 0%, #e7f0ff 52%, #f3f8ff 100%);
}

.kh-hero-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.kh-hero-badge {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 38px;
  background: linear-gradient(145deg, #1d4ed8, #60a5fa);
  box-shadow: 0 14px 30px rgba(29, 78, 216, .28);
}

.kh-hero h1 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--kh-navy);
  line-height: 1.15;
}

.kh-hero h1 span {
  display: inline;
  font-weight: 500;
  color: #1e3a8a;
}

.kh-hero p {
  margin: 10px 0 0;
  max-width: 780px;
  color: #33507a;
  font-size: 15px;
  line-height: 1.6;
}

.kh-main {
  padding: 10px 0 70px;
  background: linear-gradient(180deg, #eef5ff 0%, #f7faff 100%);
}

.kh-card {
  background: #fff;
  border: 1px solid rgba(217, 227, 240, .9);
  border-radius: 20px;
  box-shadow: 0 18px 45px rgba(15, 40, 80, .09);
  padding: 26px;
  height: auto;
}

.kh-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.kh-card-head .kh-head-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--kh-blue);
  background: #eaf1ff;
}

.kh-card-head h2 {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--kh-navy);
  text-transform: uppercase;
}

.kh-label {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #243552;
}

.kh-help {
  margin-top: 6px;
  font-size: 12px;
  color: var(--kh-muted);
  line-height: 1.5;
}

.kh-page .form-control,
.kh-page .form-select {
  border: 1px solid #c9d6e7;
  border-radius: 11px;
  min-height: 46px;
  font-size: 14px;
  color: #17233d;
  box-shadow: none;
}

.kh-page .form-control:focus,
.kh-page .form-select:focus {
  border-color: var(--kh-blue);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .12);
}

.kh-page textarea.form-control {
  min-height: 132px;
  resize: vertical;
}

.kh-seg {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 13px;
  background: #f1f5fb;
  border: 1px solid #e3eaf5;
}

.kh-seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kh-seg label {
  flex: 1;
  margin: 0;
  padding: 11px 12px;
  border-radius: 9px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #53647f;
  cursor: pointer;
  transition: all .18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.kh-seg label i {
  font-size: 17px;
}

.kh-seg input:checked + label {
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  color: #fff;
  box-shadow: 0 8px 18px rgba(29, 78, 216, .28);
}

.kh-seg input:focus-visible + label {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.kh-input-group .input-group-text {
  border: 1px solid #c9d6e7;
  border-right: 0;
  border-radius: 11px 0 0 11px;
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
}

.kh-input-group .form-control {
  border-radius: 0 11px 11px 0;
}

.kh-counter {
  text-align: right;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.kh-drop {
  border: 1.6px dashed #8bb8f8;
  border-radius: 14px;
  background: #f5f9ff;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .18s ease;
}

.kh-drop:hover,
.kh-drop.kh-dragover {
  border-color: var(--kh-blue);
  background: #eaf3ff;
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, .08);
}

.kh-drop-icon {
  font-size: 34px;
  color: var(--kh-blue);
  line-height: 1;
  margin-bottom: 8px;
}

.kh-drop-title {
  font-size: 13.5px;
  color: #334155;
  margin-bottom: 9px;
}

.kh-drop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 8px 18px;
  border: 1.5px solid #7fb0f5;
  border-radius: 9px;
  background: #fff;
  color: #1d4ed8;
  font-weight: 700;
  font-size: 13.5px;
}

.kh-drop-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: #7c8ba1;
}

.kh-file-list {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.kh-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid #e1e9f5;
  border-radius: 10px;
  background: #fbfdff;
  font-size: 12.5px;
}

.kh-file i {
  color: var(--kh-blue);
  font-size: 17px;
}

.kh-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
}

.kh-file-size {
  color: #8a99ad;
  font-size: 11px;
  white-space: nowrap;
}

.kh-file-remove {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-size: 16px;
  line-height: 1;
  padding: 2px 4px;
}

.kh-advanced {
  margin: 16px 0 18px;
  border: 1px solid #e3eaf5;
  border-radius: 12px;
  padding: 10px 13px;
  background: #fbfdff;
}

.kh-advanced summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: #31527f;
  list-style: none;
}

.kh-advanced summary::-webkit-details-marker {
  display: none;
}

.kh-advanced summary i {
  margin-right: 5px;
}

.kh-btn-primary {
  width: 100%;
  border: 0;
  border-radius: 13px;
  padding: 15px 20px;
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .6px;
  box-shadow: 0 12px 24px rgba(29, 78, 216, .28);
  transition: transform .15s ease, box-shadow .15s ease;
}

.kh-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(29, 78, 216, .34);
  color: #fff;
}

.kh-btn-primary:disabled {
  opacity: .75;
  transform: none;
}

.kh-privacy {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: #7c8ba1;
}

.kh-privacy i {
  color: var(--kh-green);
}

/* -------------------- hasil -------------------- */
.kh-result-card {
  min-height: 560px;
  height: 100%;
}

.kh-empty {
  text-align: center;
  padding: 60px 20px;
}

.kh-empty-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
  background: linear-gradient(145deg, #60a5fa, #1d4ed8);
  box-shadow: 0 16px 32px rgba(29, 78, 216, .24);
}

.kh-empty h3 {
  font-family: "Poppins", sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--kh-navy);
}

.kh-empty p {
  max-width: 380px;
  margin: 8px auto 18px;
  color: var(--kh-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.kh-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1.5px solid #b9cce6;
  border-radius: 10px;
  background: #fff;
  color: #1e3a8a;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  text-decoration: none;
  transition: all .15s ease;
}

.kh-btn-ghost:hover {
  border-color: var(--kh-blue);
  color: var(--kh-blue);
  background: #f4f8ff;
}

.kh-score-box {
  border: 1px solid #dbe6f5;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
  padding: 16px 16px 18px;
  text-align: center;
}

.kh-score-label {
  font-size: 13px;
  font-weight: 700;
  color: #31527f;
}

.kh-gauge {
  position: relative;
  width: 250px;
  max-width: 100%;
  margin: 4px auto 0;
}

.kh-gauge svg {
  width: 100%;
  display: block;
}

.kh-gauge-center {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.kh-score-number {
  font-family: "Poppins", sans-serif;
  font-size: 46px;
  font-weight: 800;
  color: var(--kh-navy);
}

.kh-score-den {
  margin-top: 4px;
  font-size: 12px;
  color: #7c8ba1;
}

.kh-gauge-scale {
  display: flex;
  justify-content: space-between;
  margin: -4px 16px 0;
  font-size: 10.5px;
  color: #94a3b8;
}

.kh-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid currentColor;
  background: #fff;
}

.kh-breakdown {
  margin-top: 18px;
}

.kh-breakdown-title {
  font-size: 13px;
  font-weight: 800;
  color: #243552;
  margin-bottom: 10px;
}

.kh-metric {
  margin-bottom: 10px;
}

.kh-metric-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: #475569;
  margin-bottom: 4px;
}

.kh-metric-top small {
  color: #94a3b8;
  font-size: 10.5px;
}

.kh-metric-top b {
  color: #1e293b;
  font-size: 12px;
}

.kh-metric .progress {
  height: 8px;
  border-radius: 999px;
  background: #e6edf7;
}

.kh-metric .progress-bar {
  border-radius: 999px;
}

.kh-formula {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #eef5ff;
  color: #4b6283;
  font-size: 10.5px;
  line-height: 1.5;
}

.kh-analysis {
  border: 1px solid #dbe7f7;
  border-radius: 14px;
  padding: 15px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.kh-analysis-lead {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #334155;
  text-align: justify;
}

.kh-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kh-analysis-item {
  border: 1px solid #e2eaf6;
  border-radius: 11px;
  padding: 11px 12px;
  background: #fff;
}

.kh-analysis-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--kh-navy);
  text-transform: uppercase;
  letter-spacing: .3px;
}

.kh-analysis-label i {
  color: var(--kh-blue);
  font-size: 14px;
}

.kh-analysis-item ul {
  margin: 0;
  padding-left: 16px;
}

.kh-analysis-item li {
  margin-bottom: 3px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #475569;
}

.kh-analysis-strategy {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef5ff;
  font-size: 11.5px;
  line-height: 1.55;
  color: #334155;
}

.kh-analysis-strategy b {
  color: var(--kh-navy);
}

.kh-analysis-strategy i {
  color: var(--kh-blue);
}

.kh-analysis-basis {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.5;
  color: #64748b;
}

.kh-rekomendasi {
  display: grid;
  gap: 14px;
}

.kh-rekomendasi-group {
  border: 1px solid #e2eaf6;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.kh-rekomendasi-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.kh-rekomendasi-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf1ff;
  color: var(--kh-blue);
  font-size: 15px;
}

.kh-rekomendasi-head b {
  display: block;
  font-size: 13px;
  color: var(--kh-navy);
}

.kh-rekomendasi-head small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: #7c8ba1;
}

.kh-todo-basis {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: #94a3b8;
}

@media (max-width: 575.98px) {
  .kh-analysis-grid {
    grid-template-columns: 1fr;
  }
}

.kh-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 12px;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--kh-navy);
}

.kh-section-title i {
  color: var(--kh-blue);
  font-size: 19px;
}

.kh-articles {
  display: grid;
  gap: 10px;
}

.kh-article {
  display: flex;
  gap: 11px;
  border: 1px solid #e2eaf6;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.kh-article-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kh-blue);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.kh-article-code {
  font-size: 13px;
  font-weight: 800;
  color: #1e3a8a;
}

.kh-article-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-top: 1px;
}

.kh-article p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: #52627a;
}

.kh-article-rel {
  margin-top: 5px;
  font-size: 11px;
  color: #64748b;
  font-style: italic;
}

.kh-link {
  border: 0;
  background: transparent;
  padding: 0;
  margin-top: 6px;
  color: var(--kh-blue);
  font-size: 11.5px;
  font-weight: 700;
}

.kh-link:hover {
  text-decoration: underline;
}

.kh-todos {
  display: grid;
  gap: 8px;
}

.kh-todo {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #e2eaf6;
  border-radius: 10px;
  background: #fbfdff;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.5;
  color: #334155;
}

.kh-todo input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kh-check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #a9c4e8;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 13px;
  margin-top: 1px;
}

.kh-todo input:checked + .kh-check {
  background: var(--kh-green);
  border-color: var(--kh-green);
  color: #fff;
}

.kh-todo input:checked ~ span:last-child {
  text-decoration: line-through;
  color: #94a3b8;
}

.kh-juris {
  display: grid;
  gap: 8px;
}

.kh-juris a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #e2eaf6;
  border-radius: 10px;
  background: #fbfdff;
  color: #1e3a8a;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

.kh-juris a:hover {
  border-color: #93c5fd;
  background: #eef5ff;
}

.kh-juris a span {
  flex: 1;
}

.kh-note {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: #7c8ba1;
}

.kh-exposure {
  border: 1px solid #dbe6f5;
  border-radius: 12px;
  overflow: hidden;
}

.kh-exposure > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  font-size: 12.5px;
  border-bottom: 1px solid #e8eef8;
  background: #fbfdff;
}

.kh-exposure > div:last-child {
  border-bottom: 0;
}

.kh-exposure span {
  color: #52627a;
}

.kh-exposure b {
  color: #1e293b;
  white-space: nowrap;
}

.kh-exposure .kh-exposure-total {
  background: #eef5ff;
}

.kh-exposure .kh-exposure-total b {
  color: #1d4ed8;
  font-size: 14px;
}

.kh-export {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.kh-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1.5px solid #b9cce6;
  border-radius: 10px;
  background: #fff;
  color: #1e3a8a;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.kh-btn-outline:hover {
  border-color: var(--kh-blue);
  background: #f4f8ff;
  color: var(--kh-blue);
}

.kh-disclaimer {
  margin-top: 16px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #eef5ff;
  color: #405a7d;
  font-size: 11.5px;
  line-height: 1.55;
}

.kh-disclaimer i {
  color: var(--kh-blue);
  margin-right: 4px;
}

.kh-modal .modal-header {
  background: #eef5ff;
  border-bottom: 1px solid #dbe6f5;
}

.kh-modal .modal-title {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--kh-navy);
}

.kh-modal-bunyi {
  font-size: 14px;
  line-height: 1.7;
  color: #1e293b;
}

.kh-modal-sub {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.65;
  color: #475569;
}

.kh-modal-source {
  margin-top: 12px;
  font-size: 11.5px;
  color: #7c8ba1;
}

@media (max-width: 991.98px) {
  .kh-hero {
    margin-top: 64px;
    padding: 34px 0 22px;
  }
  .kh-hero h1 {
    font-size: 26px;
  }
  .kh-hero-badge {
    width: 60px;
    height: 60px;
    font-size: 30px;
    border-radius: 16px;
  }
  .kh-card {
    padding: 20px;
  }
  .kh-result-card {
    min-height: auto;
    height: auto;
  }
}

@media (max-width: 575.98px) {
  .kh-hero-row {
    align-items: flex-start;
  }
  .kh-hero h1 {
    font-size: 22px;
  }
  .kh-hero h1 span {
    display: block;
    font-size: 16px;
    margin-top: 4px;
  }
  .kh-score-number {
    font-size: 38px;
  }
  .kh-gauge {
    width: 210px;
  }
  .kh-export .kh-btn-outline,
  .kh-export .kh-btn-ghost {
    width: 100%;
  }
}
