:root {
  --pkg-primary: #0f766e;
  --pkg-primary-dark: #095f59;
  --pkg-primary-deep: #073b38;
  --pkg-primary-soft: #e7f7f4;
  --pkg-accent: #14b8a6;
  --pkg-ink: #173d39;
  --pkg-muted: #6c8581;
  --pkg-border: #d8e6e3;
  --pkg-bg: #f2f7f6;
  --pkg-white: #fff;
  --pkg-radius-sm: 12px;
  --pkg-radius-md: 18px;
  --pkg-radius-lg: 26px;
  --pkg-shadow: 0 18px 48px rgba(11, 78, 72, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--pkg-ink);
  background:
    radial-gradient(circle at 8% 0, rgba(20,184,166,.09), transparent 25rem),
    radial-gradient(circle at 100% 15%, rgba(15,118,110,.06), transparent 28rem),
    var(--pkg-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: var(--pkg-primary); text-decoration: none; }
a:hover { color: var(--pkg-primary-dark); }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.public-container { width: min(100% - 2rem, 1160px); margin-inline: auto; }
.public-container.narrow { width: min(100% - 2rem, 820px); }

/* Landing */
.public-topbar {
  position: relative;
  color: #fff;
  background:
    radial-gradient(circle at 82% 15%, rgba(94,234,212,.22), transparent 19rem),
    radial-gradient(circle at 10% 92%, rgba(255,255,255,.08), transparent 25rem),
    linear-gradient(145deg, #0f766e 0%, #07524d 58%, #063b38 100%);
  overflow: hidden;
}
.public-topbar::after { content: ""; position: absolute; inset: auto -8% -110px -8%; height: 180px; border-radius: 50% 50% 0 0; background: var(--pkg-bg); transform: scaleX(1.1); }
.public-hero { position: relative; z-index: 1; padding: 2rem 0 7rem; }
.public-brand { display: flex; align-items: center; gap: .72rem; margin-bottom: 3rem; }
.public-brand-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: var(--pkg-primary);
  background: linear-gradient(145deg, #fff, #dffdf7);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  font-size: 1.18rem;
}
.public-brand-copy { display: grid; line-height: 1.2; }
.public-brand-copy strong { color: #fff; font-size: 1rem; font-weight: 850; }
.public-brand-copy span { margin-top: .17rem; color: rgba(255,255,255,.62); font-size: .7rem; }
.public-eyebrow { display: inline-flex; align-items: center; gap: .42rem; padding: .42rem .68rem; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: rgba(255,255,255,.88); background: rgba(255,255,255,.08); font-size: .68rem; font-weight: 750; letter-spacing: .02em; }
.public-title { max-width: 760px; margin: .9rem 0 .75rem; color: #fff; font-size: clamp(2.2rem, 6vw, 4.1rem); font-weight: 900; line-height: 1.04; letter-spacing: -.055em; }
.public-lead { max-width: 720px; margin: 0; color: rgba(255,255,255,.73); font-size: clamp(.92rem, 1.8vw, 1.08rem); line-height: 1.72; }
.period-pill { width: fit-content; max-width: 100%; display: flex; align-items: flex-start; gap: .55rem; margin-top: 1.35rem; padding: .72rem .9rem; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; color: rgba(255,255,255,.85); background: rgba(255,255,255,.08); font-size: .76rem; }
.period-pill i { margin-top: .13rem; color: #bffaf0; }
.public-main { position: relative; z-index: 2; padding: 0 0 3.5rem; }
.section-heading { margin-bottom: 1.3rem; }
.section-heading h2 { margin: 0; color: #173f3b; font-size: clamp(1.35rem, 2.3vw, 1.8rem); font-weight: 850; letter-spacing: -.035em; }
.section-heading p { margin: .35rem 0 0; color: var(--pkg-muted); font-size: .8rem; }
.level-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.level-card { display: flex; flex-direction: column; min-height: 330px; padding: 1.35rem; border: 1px solid var(--pkg-border); border-radius: var(--pkg-radius-lg); background: rgba(255,255,255,.92); box-shadow: var(--pkg-shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.level-card:hover { transform: translateY(-4px); border-color: #b8d9d4; box-shadow: 0 24px 55px rgba(11,78,72,.13); }
.level-icon { width: 50px; height: 50px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; color: var(--pkg-primary); background: var(--pkg-primary-soft); font-size: 1.15rem; }
.level-card h3 { margin: 1rem 0 .1rem; color: #143e3a; font-size: 1.1rem; font-weight: 850; }
.level-subtitle { margin: 0; color: var(--pkg-primary); font-size: .72rem; font-weight: 800; }
.level-desc { flex: 1; margin: .8rem 0 1.2rem; color: var(--pkg-muted); font-size: .76rem; line-height: 1.65; }
.public-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 1.35rem; }
.public-footer { padding: 1.4rem 1rem; border-top: 1px solid var(--pkg-border); color: var(--pkg-muted); background: rgba(255,255,255,.65); text-align: center; font-size: .7rem; }

/* Buttons */
.public-btn { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: .48rem; padding: .68rem .95rem; border: 1px solid transparent; border-radius: 13px; font-size: .76rem; font-weight: 800; transition: .16s ease; }
.public-btn-primary { color: #fff; border-color: var(--pkg-primary); background: linear-gradient(135deg, var(--pkg-primary), #10968b); box-shadow: 0 10px 22px rgba(15,118,110,.18); }
.public-btn-primary:hover { color: #fff; border-color: var(--pkg-primary-dark); background: linear-gradient(135deg, var(--pkg-primary-dark), var(--pkg-primary)); transform: translateY(-1px); }
.public-btn-secondary { color: #496763; border-color: #cadbd8; background: #fff; }
.public-btn-secondary:hover { color: var(--pkg-primary); border-color: #9bc9c3; background: #f7fbfa; }
.public-btn-muted { color: #78908c; border-color: #dce5e3; background: #edf2f1; cursor: not-allowed; }

/* Form page */
.form-page { padding-bottom: 92px; }
.form-header { position: relative; z-index: 1; padding: 1.35rem 0 2.25rem; }
.form-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.form-back { display: inline-flex; align-items: center; gap: .42rem; margin-bottom: .85rem; color: rgba(255,255,255,.72); font-size: .72rem; font-weight: 700; }
.form-back:hover { color: #fff; }
.form-header h1 { margin: 0; color: #fff; font-size: clamp(1.7rem, 4vw, 2.45rem); font-weight: 900; letter-spacing: -.045em; }
.form-header p { margin: .3rem 0 0; color: rgba(255,255,255,.65); font-size: .74rem; }
.form-notice { margin-top: 1rem; padding: .78rem .9rem; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; color: rgba(255,255,255,.82); background: rgba(255,255,255,.08); font-size: .72rem; line-height: 1.55; }
.progress-sticky { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--pkg-border); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); box-shadow: 0 8px 24px rgba(12,72,67,.07); }
.progress-inner { width: min(100% - 2rem, 820px); margin-inline: auto; padding: .75rem 0; }
.progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .48rem; color: #244b47; font-size: .69rem; }
.progress-meta strong { font-weight: 800; }
.progress-meta span { color: var(--pkg-primary); font-weight: 850; }
.progress-track { height: 7px; border-radius: 999px; background: #e8efed; overflow: hidden; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pkg-primary), #2dd4bf); transition: width .28s ease; }
.form-main { width: min(100% - 2rem, 820px); margin-inline: auto; padding: 1.25rem 0 1.5rem; }
.form-card { margin-bottom: 1rem; padding: 1.25rem; border: 1px solid var(--pkg-border); border-radius: var(--pkg-radius-lg); background: rgba(255,255,255,.97); box-shadow: var(--pkg-shadow); }
.form-card-header { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.15rem; padding-bottom: 1rem; border-bottom: 1px solid #e8efed; }
.form-card-icon { flex: 0 0 auto; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; color: var(--pkg-primary); background: var(--pkg-primary-soft); }
.form-card-header h2, .form-card-header h3 { margin: 0; color: #163f3b; font-size: .98rem; font-weight: 850; letter-spacing: -.02em; }
.form-card-header p { margin: .22rem 0 0; color: var(--pkg-muted); font-size: .68rem; line-height: 1.5; }

/* Semua field sengaja satu kolom, termasuk desktop */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.form-field, .form-field.full { min-width: 0; grid-column: auto; }
.form-label { display: block; margin-bottom: .42rem; color: #234843; font-size: .73rem; font-weight: 800; }
.required { color: #d94b5a; }
.field-control {
  width: 100%;
  min-height: 50px;
  display: block;
  padding: .7rem .85rem;
  border: 1px solid #c7d9d6;
  border-radius: 13px;
  color: #183e3a;
  background: #fff;
  font-size: .8rem;
  line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
select.field-control { appearance: auto; }
textarea.field-control { min-height: 94px; resize: vertical; }
.field-control:hover { border-color: #a9c9c4; }
.field-control:focus { outline: none; border-color: #63b9af; box-shadow: 0 0 0 .24rem rgba(15,118,110,.12); }
.field-control:disabled { color: #7f928f; background: #eef3f2; cursor: not-allowed; }
.field-control::placeholder { color: #9aaca8; }
.field-hint { margin: .35rem 0 0; color: var(--pkg-muted); font-size: .64rem; line-height: 1.45; }
.field-hint.success { color: #267a50; font-weight: 700; }
.choice-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.choice-card { position: relative; min-height: 50px; display: flex; align-items: flex-start; gap: .65rem; padding: .78rem .82rem; border: 1px solid #cddcda; border-radius: 13px; color: #33514d; background: #fff; cursor: pointer; transition: .15s ease; }
.choice-card:hover { border-color: #98c8c2; background: #f7fbfa; }
.choice-card:has(input:checked) { border-color: #4ba99f; background: var(--pkg-primary-soft); box-shadow: inset 0 0 0 1px rgba(15,118,110,.05); }
.choice-card input { flex: 0 0 auto; margin-top: .18rem; accent-color: var(--pkg-primary); }
.choice-card span { font-size: .76rem; line-height: 1.5; }
.section-intro { display: flex; align-items: flex-start; gap: .72rem; margin-bottom: .9rem; padding: .82rem .9rem; border: 1px solid #cde5e1; border-radius: 14px; color: #2b635e; background: #eefaf8; font-size: .72rem; line-height: 1.55; }
.section-intro i { margin-top: .15rem; color: var(--pkg-primary); }
.question-card { padding: 1.05rem 0; border-top: 1px solid #e9f0ee; }
.question-card:first-child { padding-top: 0; border-top: 0; }
.question-card.conditional { padding-left: .9rem; border-left: 3px solid #83c8c0; }
.question-label { display: block; margin-bottom: .62rem; color: #234943; font-size: .77rem; font-weight: 750; line-height: 1.55; }
.question-number { width: 100%; }

.form-bottom-nav { position: fixed; inset: auto 0 0; z-index: 55; border-top: 1px solid var(--pkg-border); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); box-shadow: 0 -12px 30px rgba(12,72,67,.09); padding-bottom: env(safe-area-inset-bottom); }
.form-bottom-inner { width: min(100% - 2rem, 820px); display: flex; gap: .65rem; margin-inline: auto; padding: .72rem 0; }
.form-bottom-inner .public-btn { flex: 1; }
.form-error { margin-bottom: .9rem; padding: .85rem .95rem; border: 1px solid #efc9cf; border-radius: 14px; color: #943944; background: #fff2f4; font-size: .72rem; line-height: 1.55; }
.form-error strong { display: block; margin-bottom: .25rem; }

/* Review */
.confirmation-card { text-align: center; }
.confirmation-icon { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .9rem; border-radius: 20px; color: var(--pkg-primary); background: var(--pkg-primary-soft); font-size: 1.45rem; }
.confirmation-card p { max-width: 560px; margin: .45rem auto 1rem; color: var(--pkg-muted); font-size: .75rem; line-height: 1.6; }
.review-box { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; margin-top: 1rem; text-align: left; }
.review-item { padding: .8rem; border: 1px solid var(--pkg-border); border-radius: 13px; background: #fafdfc; }
.review-item span { display: block; margin-bottom: .2rem; color: var(--pkg-muted); font-size: .63rem; }
.review-item strong { display: block; color: var(--pkg-ink); font-size: .76rem; overflow-wrap: anywhere; }

/* Status and result */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.result-card, .status-shell { width: min(100%, 680px); }
.result-card, .status-card { border: 1px solid var(--pkg-border); border-radius: var(--pkg-radius-lg); background: #fff; box-shadow: var(--pkg-shadow); overflow: hidden; }
.result-card-header, .status-header { padding: 1.55rem 1.35rem; text-align: center; background: linear-gradient(180deg, #f7fcfb, #fff); }
.result-card-header h1, .status-header h1 { margin: .75rem 0 .35rem; color: #173f3b; font-size: 1.45rem; font-weight: 900; letter-spacing: -.035em; }
.result-card-header p, .status-header p { max-width: 500px; margin: 0 auto; color: var(--pkg-muted); font-size: .75rem; line-height: 1.6; }
.result-icon { width: 66px; height: 66px; display: inline-flex; align-items: center; justify-content: center; border-radius: 21px; color: #188653; background: #e3f7eb; font-size: 1.55rem; }
.result-icon.warning { color: #9a6a14; background: #fff2ce; }
.result-card-body, .status-body { padding: 1.25rem; border-top: 1px solid var(--pkg-border); }
.code-box { padding: 1rem; border: 1px dashed #80bbb4; border-radius: 15px; text-align: center; background: #effaf8; }
.code-box small { display: block; color: var(--pkg-muted); font-size: .64rem; }
.code-box strong { display: block; margin-top: .3rem; color: var(--pkg-primary); font-size: clamp(1.1rem, 4vw, 1.55rem); letter-spacing: .03em; overflow-wrap: anywhere; }
.info-list { margin: 1rem 0; padding: 0; list-style: none; }
.info-list li { display: grid; grid-template-columns: 140px 1fr; gap: .8rem; padding: .68rem 0; border-bottom: 1px solid #eaf0ef; font-size: .73rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: var(--pkg-muted); }
.info-list strong { text-align: right; overflow-wrap: anywhere; }
.result-note { margin: 1rem 0; padding: .8rem .9rem; border: 1px solid #d5e6e3; border-radius: 13px; color: #4b6864; background: #f7fbfa; font-size: .7rem; line-height: 1.55; }
.button-stack { display: grid; gap: .6rem; }
.status-shell > div:first-child { margin-bottom: .85rem; }
.status-form { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.status-form input { min-height: 48px; padding: .7rem .85rem; border: 1px solid #c7d9d6; border-radius: 13px; color: var(--pkg-ink); font-size: .78rem; }
.status-form input:focus { outline: none; border-color: #63b9af; box-shadow: 0 0 0 .24rem rgba(15,118,110,.12); }
.status-result { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--pkg-border); }
.status-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.status-item { padding: .78rem; border: 1px solid var(--pkg-border); border-radius: 13px; background: #fafdfc; }
.status-item span { display: block; margin-bottom: .22rem; color: var(--pkg-muted); font-size: .63rem; }
.status-item strong { display: block; color: var(--pkg-ink); font-size: .76rem; overflow-wrap: anywhere; }
.alert-public { margin-bottom: .8rem; padding: .78rem .85rem; border-radius: 13px; font-size: .72rem; }
.alert-public.danger { color: #913c45; border: 1px solid #efcbd0; background: #fff2f4; }

.badge { display: inline-flex; align-items: center; padding: .36rem .58rem; border-radius: 999px; font-size: .61rem; font-weight: 800; }
.badge-success { color: #17643e; background: #dcf6e7; }
.badge-info { color: #175e70; background: #dff4fa; }
.badge-warning { color: #7a5516; background: #fff0c4; }
.badge-danger { color: #9c3340; background: #ffe1e5; }
.badge-secondary { color: #566c68; background: #e9efee; }
.mr-1 { margin-right: .25rem !important; }

@media (max-width: 991.98px) {
  .level-grid { grid-template-columns: 1fr; }
  .level-card { min-height: 0; }
}
@media (max-width: 767.98px) {
  .public-topbar::after { bottom: -135px; }
  .public-hero { padding-bottom: 6.4rem; }
  .public-brand { margin-bottom: 2rem; }
  .form-header-row .public-brand-mark { display: none; }
  .form-card { padding: 1rem; border-radius: 20px; }
  .status-grid { grid-template-columns: 1fr; }
  .status-item[style*="grid-column"] { grid-column: auto !important; }
  .status-form { grid-template-columns: 1fr; }
  .status-form .public-btn { width: 100%; }
  .info-list li { grid-template-columns: 110px 1fr; }
}
@media (max-width: 575.98px) {
  .public-container, .public-container.narrow, .form-main, .progress-inner, .form-bottom-inner { width: min(100% - 1.1rem, 820px); }
  .public-hero { padding-top: 1.25rem; }
  .public-title { font-size: 2.25rem; }
  .period-pill { width: 100%; }
  .level-card { padding: 1.1rem; border-radius: 20px; }
  .public-actions { display: grid; }
  .public-actions .public-btn { width: 100%; }
  .form-header { padding-top: 1rem; }
  .form-notice { padding: .72rem; }
  .progress-meta { align-items: flex-start; }
  .progress-meta strong { max-width: 78%; }
  .form-bottom-inner { gap: .48rem; }
  .form-bottom-inner .public-btn { padding-inline: .55rem; font-size: .7rem; }
  .result-card-body, .status-body { padding: 1rem; }
  .info-list li { grid-template-columns: 1fr; gap: .15rem; }
  .info-list strong { text-align: left; }
}
