/* =====================================================================
   DOIT Need Discovery — halaman publik
   Geometri direplikasi dari pengukuran DOM Sequis Solution Finder
   (docs/benchmarks/sequis-solution-finder/ui-observations.md §Pengukuran).
   Warna referensi diganti token BNI Life di :root; ukuran/posisi tidak.
   ===================================================================== */

@font-face {
  font-family: 'Roboto';
  src: url('fonts/roboto-latin-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* BNI Life corporate palette */
  --nd-primary: #006885;        /* menggantikan teal referensi #008F88 */
  --nd-primary-hover: #00556d;  /* menggantikan hover referensi #047973 */
  --nd-secondary: #00AAAD;      /* menggantikan border kartu #1db4c4 */
  --nd-accent: #F15A22;
  --nd-warning: #F99D1F;

  /* Netral (nilai referensi) */
  --nd-text: #333333;
  --nd-text-lead: #414141;
  --nd-text-list: #424242;
  --nd-muted: #797979;
  --nd-step-idle: #dbdbdb;
  --nd-toggle-idle: #c9c9c9;
  --nd-surface: #ffffff;
  --nd-page-bg: #f4f4f4;
  --nd-mobile-bg-from: #e3f3f3;
  --nd-mobile-bg-to: #fefefe;
  --nd-error: #e00000;

  --nd-header-h: 64px;
  --nd-content-top: 64px;
  --nd-font: 'Roboto', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.nd {
  margin: 0;
  padding-top: var(--nd-content-top);
  font-family: var(--nd-font);
  font-size: 14px;
  line-height: 20px;
  color: var(--nd-text);
  background: var(--nd-surface);
}
.nd img { max-width: 100%; }
.nd [hidden] { display: none !important; }
.nd-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nd-skip {
  position: absolute; left: 16px; top: -60px; z-index: 1001;
  background: var(--nd-primary); color: #fff; padding: 10px 16px; border-radius: 4px;
}
.nd-skip:focus { top: 12px; }
.nd :focus-visible { outline: 2px solid var(--nd-warning); outline-offset: 2px; }

/* ---------- Grid (setara container/row/col referensi) ---------- */
.nd-container { width: 1170px; margin: 0 auto; padding: 0 15px; position: relative; }
.nd-half { width: 50%; }
.nd-row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.nd-col-12, .nd-col-8, .nd-col-6, .nd-col-4 { padding: 0 15px; min-width: 0; }
.nd-col-12 { flex: 0 0 100%; max-width: 100%; }
.nd-col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.nd-col-6 { flex: 0 0 50%; max-width: 50%; }
.nd-col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }

/* ---------- Header publik: logo aplikasi kiri, logo BNI Life kanan ---------- */
.nd-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nd-header-h);
  background: var(--nd-surface);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);
}
.nd-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nd-header__app { display: block; line-height: 0; }
.nd-header__start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.nd-header__app img { display: block; height: 40px; width: auto; }
.nd-header__corp { display: block; flex: 0 0 auto; height: 40px; width: auto; }

/* Menu hamburger (Perlindungan → tautan produk bni-life.co.id) */
.nd-menu { position: relative; flex: 0 0 auto; }
.nd-menu__toggle {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--nd-primary); cursor: pointer;
}
.nd-menu__toggle:hover, .nd-menu__toggle[aria-expanded="true"] { background: rgba(0, 104, 133, 0.08); }
.nd-menu__toggle svg { width: 24px; height: 24px; }
.nd-menu__panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 1001; min-width: 200px; padding: 6px;
  background: var(--nd-surface); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}
.nd-menu__item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 4px;
  color: var(--nd-text); font: 500 14px/20px var(--nd-font); text-decoration: none; white-space: nowrap;
}
.nd-menu__item:hover, .nd-menu__item:focus-visible { background: rgba(0, 104, 133, 0.08); color: var(--nd-primary); }
.nd-menu__item svg { width: 18px; height: 18px; color: var(--nd-primary); }
.nd-menu__group {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px 6px;
  color: var(--nd-primary); font: 700 14px/20px var(--nd-font);
}
.nd-menu__group svg { width: 18px; height: 18px; }
.nd-menu__sub { list-style: none; margin: 0 0 4px 20px; padding: 0 0 0 8px; border-left: 2px solid rgba(0, 104, 133, 0.16); }

/* ---------- Area finder ---------- */
.nd-finder {
  min-height: 700px;
  padding: 50px 0 80px;
  background-color: var(--nd-page-bg);
  background-image:
    linear-gradient(180deg, rgba(244, 244, 244, 0) 600px, var(--nd-page-bg) 751px),
    linear-gradient(90deg, var(--nd-page-bg) 0%, var(--nd-page-bg) 40%, rgba(244, 244, 244, 0) 60%),
    var(--nd-hero, url('hero-finder.png'));
  background-repeat: no-repeat;
  background-position: 0 0, 0 0, right top;
  background-size: 100% 100%, 100% 100%, auto 751px;
}
.nd-solution { position: relative; padding: 25px 0 100px; }

/* ---------- Progress indicator ---------- */
.nd-step { margin: 0 0 10px; height: 80px; }
.nd-step ol { list-style: none; margin: 0; padding: 0; font-size: 0; }
.nd-step li {
  position: relative; display: inline-block; vertical-align: top;
  width: 90px; height: 80px; margin-right: 3px; font-size: 14px;
}
.nd-step li::before { /* garis abu-abu ke langkah berikut */
  content: ''; position: absolute; top: 15px; right: -30px; width: 100%; height: 6px;
  background: var(--nd-step-idle); z-index: 0;
}
.nd-step li::after { /* progres terisi */
  content: ''; position: absolute; top: 15px; left: 50px; width: 0; height: 6px;
  background: var(--nd-secondary); z-index: 0; transition: width 0.6s ease-in-out;
}
.nd-step li:last-child::before, .nd-step li:last-child::after { display: none; }
.nd-step li.is-current::after { width: 50%; }
.nd-step li.is-done::after { width: 100%; }
.nd-step__dot {
  position: relative; z-index: 1; display: block; margin: 0 auto;
  width: 35px; height: 35px; border-radius: 50%;
  background: var(--nd-step-idle); color: #fff;
  font: 600 14px/35px var(--nd-font); text-align: center; text-decoration: none;
  border: 0; padding: 0;
}
button.nd-step__dot { cursor: pointer; }
.nd-step li.is-current .nd-step__dot, .nd-step li.is-done .nd-step__dot { background: var(--nd-primary); }
.nd-step li.is-final .nd-step__dot {
  background: #fff; color: var(--nd-primary); border: 2px dotted var(--nd-primary); line-height: 31px;
}
.nd-step__dot svg { width: 14px; height: 14px; vertical-align: -2px; }
.nd-step__label {
  display: block; margin-top: 10px; text-align: center;
  color: var(--nd-primary); font: 600 11.2px/16px var(--nd-font);
  opacity: 0; visibility: hidden;
}
.nd-step li.is-current .nd-step__label { opacity: 1; visibility: visible; }

/* ---------- Heading & lead ---------- */
.nd-body-step { width: 90%; }
.nd-heading { margin: 25px 0 0; color: var(--nd-primary); font: 400 35px/1.4 var(--nd-font); }
.nd-heading:focus { outline: none; }
.nd-lead { margin: 20px 0 0; color: var(--nd-text-lead); font: 300 16.1px/1.6 var(--nd-font); }

/* ---------- Form panel ---------- */
.nd-box {
  position: relative; margin: 40px 3px 20px; padding: 25px 30px;
  background: var(--nd-surface); border-radius: 5px;
  box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.13);
}
.nd-box__spacer { height: 60px; }
.nd-field { margin-bottom: 10px; }
.nd-field:has(> .nd-radios) { margin-top: 11px; margin-bottom: 20px; }
.nd-label {
  display: block; max-width: 100%; margin: 0 0 10px;
  color: var(--nd-primary); font: 600 14.882px/21.26px var(--nd-font);
}
.nd-help { display: block; margin: -6px 0 12px; color: var(--nd-muted); font: 400 12.5px/18px var(--nd-font); }

/* Select (native, digaya seperti select kustom referensi) */
.nd-select-wrap { position: relative; display: block; margin-bottom: 12px; }
.nd-select, .nd-input {
  display: block; width: 100%; height: 33px; margin: 0;
  padding: 0 35px 0 8px;
  border: 0; border-bottom: 1px solid var(--nd-muted); border-radius: 0;
  background: var(--nd-surface); color: var(--nd-text);
  font: 400 14px/26px var(--nd-font);
  -webkit-appearance: none; appearance: none;
}
.nd-select { cursor: pointer; }
.nd-select:invalid, .nd-select.is-placeholder { color: var(--nd-text); }
.nd-select-wrap svg {
  position: absolute; right: 20px; top: 50%; width: 14px; height: 8px; margin-top: -4px;
  pointer-events: none; stroke: var(--nd-muted);
}
.nd-input-wrap { position: relative; display: flex; align-items: center; margin-bottom: 12px; border-bottom: 1px solid var(--nd-muted); background: var(--nd-surface); }
.nd-input-wrap .nd-input { border-bottom: 0; padding-right: 8px; flex: 1 1 auto; min-width: 0; }
.nd-input-wrap__affix { flex: 0 0 auto; padding: 0 8px; color: var(--nd-muted); font: 400 14px/33px var(--nd-font); }
.nd-input::placeholder { color: #a6a6a6; opacity: 1; }
.nd-select:focus, .nd-input:focus { outline: none; }
.nd-select-wrap:focus-within, .nd-input-wrap:focus-within { box-shadow: 0 1px 0 0 var(--nd-primary); }
.nd-input-wrap:focus-within { border-bottom-color: var(--nd-primary); }

/* Radio bulat (status) */
.nd-radios { display: flex; flex-wrap: wrap; margin: 20px -15px 0; }
.nd-radios > .nd-radio { flex: 0 0 33.3333%; padding: 0 15px; }
.nd-radio {
  display: inline-flex; align-items: center; margin: 0 0 10px; cursor: pointer; white-space: nowrap;
  color: var(--nd-muted); font: 400 14.882px/24px var(--nd-font);
}
.nd-radio input, .nd-gender input, .nd-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nd-radio__mark {
  position: relative; flex: 0 0 16px; width: 16px; height: 16px; margin: 0 10px 0 9px;
  border: 1px solid var(--nd-muted); border-radius: 9px; background: #fff;
}
.nd-radio input:checked + .nd-radio__mark { border-color: var(--nd-primary); }
.nd-radio input:checked + .nd-radio__mark::after {
  content: ''; position: absolute; left: 3px; top: 3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--nd-primary);
}
.nd-radio input:focus-visible + .nd-radio__mark,
.nd-gender input:focus-visible + svg,
.nd-toggle input:focus-visible + span { outline: 2px solid var(--nd-warning); outline-offset: 2px; }

/* Ikon jenis kelamin */
.nd-genders { display: flex; margin-bottom: 0; }
.nd-gender { display: inline-block; width: 40px; height: 37px; margin-right: 10px; padding: 3px 0 4px; text-align: center; cursor: pointer; color: #c4c4c4; }
.nd-gender svg { width: 24px; height: 28px; transition: color 0.3s ease-in-out; }
.nd-gender input:checked + svg { color: var(--nd-primary); }
.nd-gender:hover { color: #9a9a9a; }

/* Toggle teks Ya/Tidak (referensi: label tanpa lingkaran) */
.nd-toggles { display: flex; gap: 0; margin: 10px 0 12px; }
.nd-toggle { cursor: pointer; margin-right: 10px; }
.nd-toggle span {
  display: inline-block; min-width: 50px; padding: 6px 8px;
  color: var(--nd-toggle-idle); font: 700 14.882px/20px var(--nd-font); text-transform: uppercase; text-align: center;
}
.nd-toggle input:checked + span { color: var(--nd-primary); }

/* Validasi */
.nd-error { display: block; margin: -2px 0 12px; color: var(--nd-error); font: 400 14px/20px var(--nd-font); }
.nd-field.is-invalid .nd-select-wrap, .nd-field.is-invalid .nd-input-wrap { border-bottom-color: var(--nd-error); }
.nd-field.is-invalid .nd-select { border-bottom-color: var(--nd-error); }
.nd-alert { margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid var(--nd-error); background: #fff4f4; color: #8a1010; }

/* ---------- Tombol ---------- */
.nd-button-area { margin: 0; text-align: left; }
.nd-button {
  position: relative; display: inline-block; margin: 0 10px 0 0;
  padding: 15px 65px 15px 45px; border: 0; border-radius: 30px;
  background: var(--nd-primary); color: #fff;
  font: 400 14px/20px var(--nd-font); text-transform: uppercase; text-decoration: none; text-align: left;
  cursor: pointer; transition: background 0.3s ease-in-out;
}
.nd-button:hover { background: var(--nd-primary-hover); color: #fff; }
.nd-button svg { position: absolute; right: 25px; top: 50%; width: 22px; height: 22px; margin-top: -11px; }
.nd-button[disabled] { opacity: 0.7; cursor: progress; }
.nd-button--ghost { background: transparent; color: var(--nd-primary); box-shadow: inset 0 0 0 1px var(--nd-primary); }
.nd-button--ghost:hover { background: rgba(0, 104, 133, 0.08); color: var(--nd-primary); }
.nd-link { color: var(--nd-primary); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Hasil: banner ---------- */
.nd-banner {
  min-height: 575px; padding: 80px 0 60px;
  background-color: var(--nd-page-bg);
  background-image:
    linear-gradient(90deg, var(--nd-page-bg) 0%, var(--nd-page-bg) 40%, rgba(244, 244, 244, 0) 60%),
    var(--nd-hero, url('hero-finder.png'));
  background-repeat: no-repeat;
  background-position: 0 0, right top;
  background-size: 100% 100%, auto 575px;
}
.nd-banner .nd-step { margin: 0 0 10px; }
.nd-solution-result { margin-top: 50px; }
.nd-solution-result h1 { margin: 0; color: var(--nd-primary); font: 500 28px/30.8px var(--nd-font); }
.nd-solution-result h2 { margin: 0; color: var(--nd-primary); font: 500 19.6px/27.44px var(--nd-font); }
.nd-estimate { margin: 22px 0 0; padding: 14px 18px; max-width: 470px; background: rgba(255, 255, 255, 0.92); border-left: 4px solid var(--nd-warning); border-radius: 4px; }
.nd-estimate__label { display: block; color: var(--nd-text-lead); font: 400 14px/20px var(--nd-font); }
.nd-estimate__value { display: block; margin-top: 2px; color: var(--nd-primary); font: 700 26px/34px var(--nd-font); }
.nd-estimate__na { display: block; margin-top: 4px; color: var(--nd-text-lead); font: 700 18px/26px var(--nd-font); }
.nd-estimate__note { display: block; margin-top: 4px; color: var(--nd-muted); font: 400 12px/17px var(--nd-font); }
.nd-solution-result .nd-button-area { margin-top: 30px; }
.nd-solution-result .nd-button { margin-bottom: 10px; }

/* ---------- Hasil: kartu produk ---------- */
.nd-results { padding: 40px 0 60px; background: var(--nd-surface); }
.nd-results__title { margin: 0 0 36px; text-align: center; color: var(--nd-primary); font: 500 31px/40px var(--nd-font); }
.nd-cards { display: flex; flex-wrap: wrap; padding: 0 57px; margin: 0 -15px; }
.nd-cards > li { list-style: none; flex: 0 0 33.3333%; max-width: 33.3333%; padding: 0 15px; }
.nd-card {
  display: flex; flex-direction: column; height: calc(100% - 30px); margin-bottom: 30px;
  border: 1px solid var(--nd-secondary); background: var(--nd-surface); text-align: left;
}
.nd-card__img { position: relative; height: 0; padding-bottom: 50%; overflow: hidden; }
.nd-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nd-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 20px 30px; }
.nd-card__cat {
  position: relative; margin: 0; color: var(--nd-primary);
  font: 500 19.6px/27.44px var(--nd-font); text-transform: uppercase;
}
.nd-card__cat::before {
  content: ''; position: absolute; left: -15px; top: 2px;
  border-style: solid; border-width: 0 0 8px 8px; border-color: transparent transparent var(--nd-accent) transparent;
}
.nd-card__name { margin: 10px 0; color: var(--nd-muted); font: 400 28px/39.2px var(--nd-font); }
.nd-card__subhead { margin: 0 0 10px; color: var(--nd-primary); font: 500 19.6px/27.44px var(--nd-font); }
.nd-card__list { margin: 0 0 20px; padding-left: 20px; list-style: disc; color: var(--nd-text-list); font: 400 14.882px/22.323px var(--nd-font); }
.nd-card__actions { margin-top: auto; text-align: center; }
.nd-card__actions .nd-button { margin: 0 0 12px; }
.nd-card__links { display: block; font-size: 13px; line-height: 20px; }
.nd-card__links .nd-missing { color: var(--nd-muted); }

/* ---------- Dialog ---------- */
/* Non-modal (`show()`), di bawah header agar logo & menu tetap dapat dipakai saat dialog terbuka. */
.nd-dialog {
  position: fixed; z-index: 1001; top: calc(var(--nd-header-h) + 16px); left: 50%; right: auto; transform: translateX(-50%);
  width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - var(--nd-header-h) - 32px); margin: 0; padding: 0;
  overflow: auto; overscroll-behavior: contain;
  border: 0; border-radius: 6px; box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25); color: var(--nd-text); background: var(--nd-surface);
}
.nd-backdrop { position: fixed; inset: var(--nd-header-h) 0 0 0; z-index: 999; background: rgba(0, 32, 44, 0.55); }
.nd-dialog-open { overflow: hidden; }
.nd-dialog__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; background: var(--nd-primary); color: #fff; }
.nd-dialog__head h2 { margin: 0; font: 500 19px/26px var(--nd-font); }
.nd-dialog__close { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 22px; line-height: 36px; cursor: pointer; }
.nd-dialog__close:hover { background: rgba(255, 255, 255, 0.28); }
.nd-dialog__body { padding: 20px 24px 24px; font-size: 14.5px; line-height: 22px; }
.nd-dialog__body h3 { margin: 22px 0 8px; color: var(--nd-primary); font: 500 17px/24px var(--nd-font); }
.nd-dialog__body h3:first-child { margin-top: 0; }
.nd-dialog__body p { margin: 0 0 10px; }
.nd-dialog__body ul { margin: 0 0 10px; padding-left: 20px; }
.nd-dialog__body li { margin-bottom: 4px; }
.nd-dialog__body li.is-sub { list-style: circle; margin-left: 18px; }
.nd-dialog__img { display: block; width: 100%; max-height: 260px; object-fit: cover; margin-bottom: 16px; border-radius: 4px; }
.nd-dialog__quote { margin: 0 0 14px; padding: 10px 14px; border-left: 4px solid var(--nd-warning); background: #fff8ec; font-style: italic; }
.nd-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.nd-dialog__actions .nd-button { margin: 0; padding: 12px 22px; }
.nd-kv { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.nd-kv th, .nd-kv td { padding: 7px 0; border-bottom: 1px solid #ececec; text-align: left; vertical-align: top; font-weight: 400; }
.nd-kv th { width: 58%; padding-right: 12px; color: var(--nd-text-lead); }
.nd-kv td { font-weight: 500; }
.nd-note { color: var(--nd-muted); font-size: 12.5px; line-height: 18px; }

/* ---------- Footer publik: footer RBAC (app-footer.css) ---------- */
.nd .app-footer { margin-top: 0; }

/* =====================================================================
   RESPONSIVE — breakpoint referensi: 1199 / 991 / 767
   ===================================================================== */
@media (max-width: 1199px) {
  .nd-container { width: 970px; }
}
@media (max-width: 991px) {
  .nd-container { width: 750px; }
  .nd-half { width: 100%; }
  .nd-finder, .nd-banner {
    min-height: 0; padding: 0 0 50px;
    background: linear-gradient(135deg, var(--nd-mobile-bg-from) 0%, var(--nd-mobile-bg-to) 100%);
  }
  .nd-banner { padding-top: 30px; }
  .nd-heading { font-size: 28px; }
  .nd-cards { padding: 0; }
  .nd-cards > li { flex-basis: 50%; max-width: 50%; }
}
@media (max-width: 767px) {
  :root { --nd-header-h: 56px; --nd-content-top: 56px; }
  .nd-container { width: auto; padding: 0; }
  .nd-half { padding: 0 15px; }
  .nd-header .nd-container { padding: 0 15px; }
  .nd-header__start { gap: 8px; }
  .nd-header__app img { height: 30px; }
  .nd-menu__toggle { width: 36px; height: 36px; }
  .nd-header__corp { height: 30px; }
  .nd-finder { padding: 50px 0; }
  .nd-banner { padding: 50px 0 40px; }
  .nd-step { height: 35px; margin-bottom: 70px; }
  .nd-step li { width: 55px; height: 35px; }
  .nd-step li::before { right: -20px; }
  .nd-step li::after { left: 20px; }
  .nd-body-step { width: 100%; }
  .nd-heading { font-size: 21px; }
  .nd-lead { font-size: 14px; }
  .nd-box__spacer { height: 21px; }
  .nd-radios > .nd-radio { flex-basis: 100%; }
  .nd-col-sm-12 { flex-basis: 100%; max-width: 100%; }
  .nd-button { width: 70%; padding: 15px 30px; font-size: 12.6px; line-height: 18px; margin-bottom: 20px; }
  .nd-button svg { right: 20px; }
  .nd-solution-result h1 { font-size: 22px; line-height: 28px; }
  .nd-solution-result h2 { font-size: 16px; line-height: 23px; }
  .nd-estimate__value { font-size: 22px; line-height: 30px; }
  .nd-results__title { font-size: 22px; line-height: 30px; margin-bottom: 24px; padding: 0 15px; }
  .nd-cards { margin: 0; padding: 0 15px; }
  .nd-cards > li { flex-basis: 100%; max-width: 100%; padding: 0; }
  .nd-card__name { font-size: 24px; line-height: 32px; }
  .nd-card__actions .nd-button { width: auto; padding-right: 60px; }
  .nd-dialog__body { padding: 16px; }
  .nd-dialog__head { padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .nd *, .nd *::before, .nd *::after { transition-duration: 0.001ms !important; }
}
