/* ==========================================================
   Base (mobile-first)
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--font-mono); letter-spacing: .03em; }
.icon { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.noscript { padding: 24px; font-size: 18px; }
body.is-locked { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-size: 16px; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn[disabled] { background: var(--paper-2); border-color: transparent; color: var(--ink-3); cursor: not-allowed; transform: none; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* ==========================================================
   Landing
   ========================================================== */
.landing {
  max-width: 560px; margin: 0 auto;
  padding: 32px 20px calc(32px + var(--safe-b));
  display: flex; flex-direction: column; gap: 26px;
}
.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; text-transform: uppercase; color: var(--ink-2);
}
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--amber); }
.landing__title {
  font-size: clamp(32px, 9vw, 46px); line-height: 1.05;
  font-weight: 700; letter-spacing: -.025em;
}
.landing__lead { font-size: 17px; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.facts li {
  font-size: 14px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.section-label { font-size: 12px; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.steps li {
  display: grid; grid-template-columns: 34px 1fr; gap: 4px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.steps__n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); padding-top: 3px; }
.rid { display: flex; flex-direction: column; gap: 8px; }
.rid__label { font-weight: 600; font-size: 15px; }
.field {
  min-height: 54px; width: 100%; padding: 0 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
  font-family: var(--font-mono); font-size: 18px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink);
}
.field::placeholder { color: #B7B9BF; }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field[aria-invalid="true"] { border-color: var(--bad); }
.error { color: var(--bad); font-size: 14px; }
.rid-badge {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.rid-badge__label { font-size: 14px; color: var(--ink-2); }
.rid-badge__value { font-family: var(--font-mono); font-size: 17px; font-weight: 500; }

.researcher {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; border: 1px dashed var(--ink-3); border-radius: var(--r-md);
  font-size: 14px; color: var(--ink-2);
}
.researcher strong { color: var(--ink); }
.researcher__btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================
   Scenario screen
   ========================================================== */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.case-label { font-size: 12px; color: var(--ink-2); }
.case-label b { color: var(--ink); font-weight: 500; }
.rail { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.rail li { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.rail li.is-done { background: var(--ink); }
.rail li.is-current { background: var(--amber); }

.stage {
  max-width: var(--maxw); margin: 0 auto;
  padding: 20px 16px calc(132px + var(--safe-b));
  display: flex; flex-direction: column; gap: 22px;
}
.brief { display: flex; flex-direction: column; gap: 14px; }
.eyebrow { font-size: 12px; text-transform: uppercase; color: var(--ink-3); }
.brief__title { font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
.brief__body { font-size: 17px; }
.brief__body p + p { margin-top: 10px; }

/* ---------- Feedback ---------- */
.verdict {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 6px; border-radius: 999px;
  font-size: 15px; font-weight: 700;
}
.verdict__icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.verdict__icon .icon { width: 16px; height: 16px; }
.verdict--ok { background: var(--ok-soft); color: var(--ok); }
.verdict--ok .verdict__icon { background: var(--ok); }
.verdict--bad { background: var(--bad-soft); color: var(--bad); }
.verdict--bad .verdict__icon { background: var(--bad); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-2);
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
}
.fb {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.fb__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
.fb__choice { font-weight: 600; }
.fb__text { color: var(--ink-2); }
.fb--correct { border-color: #BCD9C7; }
.fb--correct .fb__label { color: var(--ok); }
.takeaway { padding: 18px; border-radius: 16px; background: var(--ink); color: #fff; }
.takeaway .fb__label { color: var(--amber); }
.takeaway p { margin-top: 6px; font-size: 17px; line-height: 1.5; }

/* ==========================================================
   Device (ponsel simulasi)
   ========================================================== */
.device {
  background: var(--os-bg);
  border: 1px solid var(--line); border-radius: 28px;
  overflow: hidden; box-shadow: var(--shadow-1);
}
.device__screen {
  display: flex; flex-direction: column; min-height: 540px;
  color: var(--os-ink); font-size: 15px; line-height: 1.5;
}
.device__screen--dark { background: var(--lock-bg); }
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px 6px; font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.device__screen--dark .statusbar { color: #fff; }
.statusbar__icons { display: flex; align-items: center; gap: 5px; }
.statusbar__icons .icon { width: 16px; height: 16px; }

/* Lock screen + notifikasi */
.lock {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 18px 14px 22px; color: #fff;
}
.lock__time { font-size: 66px; font-weight: 600; line-height: 1; letter-spacing: -.03em; margin: 18px 0 32px; font-variant-numeric: tabular-nums; }

.notif {
  width: 100%; display: grid; gap: 2px; text-align: left;
  padding: 12px 14px; border: 0; border-radius: 18px;
  background: #F4F4F6; color: var(--os-ink); cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  animation: drop .5s ease-out both;
}
.notif:hover { background: #fff; }
.notif__top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--os-muted); margin-bottom: 2px; }
.notif__app { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; color: #fff; }
.notif__app .icon { width: 13px; height: 13px; }
.notif__app--email { background: var(--app-mail); }
.notif__app--chat { background: var(--app-chat); }
.notif__when { margin-left: auto; }
.notif__title { font-size: 15px; font-weight: 600; }
.notif__text {
  font-size: 14px; color: #3A3D44;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* App bar umum */
.appbar {
  display: flex; align-items: center; gap: 2px;
  min-height: 48px; padding: 2px 8px; border-bottom: 1px solid var(--os-line);
}
.appbar__btn { width: 40px; height: 40px; display: grid; place-items: center; color: var(--os-muted); }
.appbar__spacer { flex: 1; }

/* Email */
.email { display: flex; flex-direction: column; gap: 16px; padding: 18px 18px 28px; }
.email__subject { font-size: 20px; line-height: 1.3; font-weight: 600; }
.email__sender { display: flex; gap: 12px; align-items: flex-start; }
.avatar {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: #5E5A8C; color: #fff;
  font-size: 14px; font-weight: 600;
}
.email__meta { flex: 1; min-width: 0; }
.email__row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.email__name { font-size: 15px; font-weight: 600; }
.email__time { font-size: 12px; color: var(--os-muted); flex: none; }
.email__addr { font-size: 13px; color: var(--os-muted); overflow-wrap: anywhere; }
.email__to { font-size: 13px; color: var(--os-muted); }
.email__body { font-size: 15px; line-height: 1.6; }
.attach {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; border: 1px solid var(--os-line); border-radius: 12px; background: #fff; cursor: pointer;
}
.attach__badge {
  width: 34px; height: 40px; flex: none; border-radius: 6px;
  display: grid; place-items: center; background: #C8463B; color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
}
.attach__name { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.attach__type { display: block; font-size: 12px; color: var(--os-muted); }
.qr {
  align-self: flex-start; padding: 10px; cursor: pointer;
  border: 1px solid var(--os-line); border-radius: 12px; background: #fff;
}
.qr svg { display: block; width: 136px; height: 136px; }

/* Browser */
.browser-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 10px; background: #F5F5F7; border-bottom: 1px solid var(--os-line);
}
.urlbar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 12px; background: #E8E8ED; font-size: 14px; line-height: 1.3;
}
.urlbar .icon { width: 15px; height: 15px; color: #33363C; }
.urlbar__text { overflow-wrap: anywhere; }
.urlbar__scheme { color: var(--os-muted); }
.browser-chrome__btn { width: 32px; height: 32px; display: grid; place-items: center; color: var(--os-muted); }
.site { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 34px 22px; background: #fff; }
.crest svg { display: block; width: 62px; height: 70px; }
.site__title { font-size: 20px; font-weight: 700; text-align: center; color: #1D2B4F; }
.site__form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.site__label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #3A3D44; }
.fake-input {
  display: block; width: 100%; height: 46px; cursor: text;
  border: 1px solid #CDD0D6; border-radius: 8px; background: #fff;
}
.site__login {
  width: 100%; height: 48px; margin-top: 6px; cursor: pointer;
  border: 0; border-radius: 8px; background: #1D2B4F; color: #fff; font-weight: 600;
}

/* Chat */
.chat-head { display: flex; align-items: center; gap: 10px; padding: 6px 12px 8px; border-bottom: 1px solid var(--os-line); }
.chat-head .appbar__btn { width: 28px; }
.avatar--chat { width: 36px; height: 36px; font-size: 13px; background: #44546A; }
.chat-head__name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.chat-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px 12px; background: #EDEBE6; }
.chat-day { align-self: center; padding: 3px 10px; border-radius: 8px; background: #fff; font-size: 12px; color: var(--os-muted); }
.bubble {
  align-self: flex-start; max-width: 88%;
  padding: 10px 12px 6px; border-radius: 4px 16px 16px 16px;
  background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
  font-size: 15px; line-height: 1.5;
  animation: drop .45s ease-out both;
}
.bubble__time { display: block; margin-top: 2px; text-align: right; font-size: 11px; color: var(--os-muted); }
.chat-input { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #F5F5F7; border-top: 1px solid var(--os-line); }
.chat-input__field {
  flex: 1; height: 40px; display: flex; align-items: center; padding: 0 14px; cursor: text; text-align: left;
  border: 1px solid var(--os-line); border-radius: 20px; background: #fff; color: var(--os-muted); font-size: 14px;
}
.chat-input__send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: #44546A; color: #fff; cursor: pointer; }
.chat-input__send .icon { width: 18px; height: 18px; }

/* Security prompt (MFA) */
.prompt {
  width: 100%; display: flex; flex-direction: column; gap: 12px;
  padding: 16px; border-radius: 20px; background: #F4F4F6; color: var(--os-ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  animation: drop .5s ease-out both;
}
.prompt__head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--os-muted); }
.prompt__badge { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: #44546A; color: #fff; }
.prompt__badge .icon { width: 14px; height: 14px; }
.prompt__title { font-size: 19px; font-weight: 700; }
.prompt__q { font-size: 15px; }
.prompt__list { border-radius: 12px; background: #fff; overflow: hidden; }
.prompt__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--os-line); font-size: 14px; }
.prompt__row:last-child { border-bottom: 0; }
.prompt__row dt { color: var(--os-muted); }
.prompt__row dd { font-weight: 600; text-align: right; }
.prompt__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prompt__btn { height: 46px; border: 1px solid #D4D6DC; border-radius: 12px; background: #fff; font-weight: 600; cursor: pointer; }

/* Penanda petunjuk — hanya aktif setelah keputusan */
.device.is-reviewed [data-clue] {
  outline: 2px solid var(--amber); outline-offset: 3px;
  border-radius: 6px; background-color: var(--amber-soft);
}
.device.is-reviewed .bubble[data-clue] { border-radius: 4px 16px 16px 16px; }

/* ==========================================================
   Action bar & sheet
   ========================================================== */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: var(--paper); border-top: 1px solid var(--line);
}
.actionbar__inner { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }

.sheet-backdrop {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(21, 23, 28, .45);
  animation: fade .2s ease-out both;
}
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  padding: 10px 16px calc(16px + var(--safe-b));
  border-radius: 22px 22px 0 0; background: var(--paper); box-shadow: var(--shadow-sheet);
  animation: rise .25s ease-out both;
}
.sheet__grab { width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 2px; background: var(--line); }
.sheet__title { font-size: 20px; font-weight: 700; }
.options { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.option {
  width: 100%; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; text-align: left;
  padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  font-size: 16px; line-height: 1.45; cursor: pointer;
}
.option:hover { border-color: var(--ink-3); }
.option__radio { width: 22px; height: 22px; margin-top: 1px; display: grid; place-items: center; border: 2px solid var(--ink-3); border-radius: 50%; }
.option[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.option[aria-checked="true"] .option__radio { border-color: var(--ink); }
.option[aria-checked="true"] .option__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.sheet__actions { display: flex; flex-direction: column; gap: 8px; }

/* ==========================================================
   Results & done
   ========================================================== */
.results {
  max-width: 640px; margin: 0 auto;
  padding: 32px 16px calc(132px + var(--safe-b));
  display: flex; flex-direction: column; gap: 22px;
}
.results__title { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.score { display: flex; align-items: baseline; gap: 10px; }
.score__num { font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.score__of { font-size: 18px; color: var(--ink-2); }
.recap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.recap li {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
}
.recap__mark { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.recap__mark .icon { width: 16px; height: 16px; }
.recap__mark--ok { background: var(--ok); }
.recap__mark--bad { background: var(--bad); }
.recap__case { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.recap__title { font-weight: 600; line-height: 1.3; }
.recap__text { margin-top: 6px; font-size: 15px; color: var(--ink-2); }

.done {
  max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 32px 20px;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.done__mark { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--ink); color: var(--amber); }
.done__mark .icon { width: 28px; height: 28px; }
.done__title { font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.done__text { font-size: 17px; color: var(--ink-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(110px + var(--safe-b)); z-index: 60;
  width: max-content; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 14px; text-align: center;
  opacity: 0; pointer-events: none; transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion ---------- */
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
