/* ============================================================
   app.css — HWScan
   Satu kanvas gelap di atas tekstur heksagon #0f1116, kartu #232326,
   garis rambut #38383c, teks krem #f2efe9, aksen biru #3d9bff,
   hijau #5fc98a. Huruf Inter; kolom baca 720px, laporan 960px.
   ============================================================ */

/* ---------- 1. dasar ---------- */

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--panel);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background: var(--panel);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Grid dengan cahaya di tengah hanya untuk layar pertama; di bawahnya halaman
   memakai warna kartu "Detected in your browser" (#232326), jadi teksturnya
   memudar ke warna itu tepat di dasar viewport pertama. */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-color: #14171d;
  background-image:
    linear-gradient(180deg, rgba(35, 35, 38, 0) 45%, rgba(35, 35, 38, 0.62) 82%, #232326 100%),
    url('bg.webp');
  background-position: 0 0, 50% 0;
  background-size: auto, cover;
  background-repeat: no-repeat;
}

.hero-shell,
.report-wrap,
.status { position: relative; z-index: 1; }

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

code {
  font: 0.92em/1.4 var(--font-mono);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(15, 17, 22, 0.7);
  color: var(--text);
}

/* ---------- 2. token ---------- */

:root {
  --bg: #0f1116;
  --bg-card: rgba(28, 29, 34, 0.82);
  --bg-inset: rgba(15, 17, 22, 0.6);
  --panel: #232326;
  --card: #232326;
  --line: #38383c;
  --line-strong: #4a4a50;
  --hover: rgba(242, 239, 233, 0.05);

  --text: #f2efe9;
  --cream: #f2efe9;
  --text-dim: #9d9ca3;
  --text-faint: #83838a;

  --accent: #3d9bff;
  --accent-ink: #0f1116;
  --accent-soft: rgba(61, 155, 255, 0.12);
  --accent-line: rgba(61, 155, 255, 0.45);

  --ok: #5fc98a;
  --warn: #e6bb6a;
  --danger: #f0968a;

  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}

/* ---------- 3. kerangka ---------- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 0;
}

.report-wrap { padding-bottom: 96px; }
.report-wrap:has(.report[hidden]) { padding-bottom: 0; }

.hero-shell > .wrap { padding-bottom: 0; }

/* ---------- 4. bar merek ---------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: block;
  flex: none;
  width: 34px;
  height: 34px;
  mix-blend-mode: lighten;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cream);
}

.brand-by {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-faint);
}

.brand-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.16s ease;
}

.brand-link:hover,
.brand-link:focus-visible { color: var(--accent); }

/* ---------- 5. hero ---------- */

.hero {
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 72px 0 56px;
}

.hero h1 {
  max-width: 860px;
  margin: 0 auto 20px;
  font-size: clamp(40px, 6.8vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--cream);
}

.hero h1 span { color: var(--accent); }

.hero .lead {
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 18px;
  color: var(--text-dim);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 28px;
}

.micro {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- 6. tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid var(--cream);
  border-radius: 8px;
  background: var(--cream);
  color: #17181a;
  font: 600 15px/1 var(--font-body);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.btn:hover { filter: brightness(0.94); }
.btn:active { transform: translateY(1px); }

.btn[aria-disabled='true'] {
  opacity: 0.45;
  pointer-events: none;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink, var(--cream));
  font: 500 15px var(--font-body);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
  cursor: pointer;
}

.link:hover { text-decoration-color: var(--cream); }

/* ---------- 7. kartu keadaan pemindaian ---------- */

.stage {
  position: relative;
  overflow: hidden;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 28px 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
}

.bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--line);
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.6s ease;
}

.sh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.shl {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 16px;
}

.shl b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ct {
  flex: none;
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* Cincin berputar, lalu centang hijau saat selesai, tanda seru saat handler usang. */
.sp {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.sp.ok,
.sp.warn {
  display: grid;
  place-items: center;
  border: 0;
  font: 700 12px/1 var(--font-body);
  animation: none;
}

.sp.ok {
  background: rgba(95, 201, 138, 0.18);
  color: var(--ok);
}

.sp.ok::before { content: '\2713'; }

.sp.warn {
  background: rgba(230, 187, 106, 0.18);
  color: var(--warn);
}

.sp.warn::before { content: '!'; }

/* Garis neon hijau yang berdetak tiga kali saat scan berhasil. */
@keyframes hw-neon {
  0% {
    opacity: 0;
    box-shadow: inset 0 0 0 1px rgba(95, 201, 138, 0.25), inset 0 0 0 0 rgba(95, 201, 138, 0);
  }
  28% {
    opacity: 1;
    box-shadow: inset 0 0 0 1px rgba(95, 201, 138, 0.95), inset 0 0 30px 2px rgba(95, 201, 138, 0.4);
  }
  100% {
    opacity: 0;
    box-shadow: inset 0 0 0 1px rgba(95, 201, 138, 0.95), inset 0 0 12px 0 rgba(95, 201, 138, 0);
  }
}

.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}

.stage.is-done::after { animation: hw-neon 1.6s ease-in-out 5; }

.stage.is-done { border-color: rgba(95, 201, 138, 0.5); }
.stage.is-done .ct { color: var(--ok); }
.stage.is-done .bar i { background: var(--ok); }
.stage.is-stale .ct { color: var(--warn); }
.stage.is-stale .bar i { background: var(--warn); }

/* Lima nilai yang bisa dibaca peramban sendiri. */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 24px;
  padding: 22px 0 24px;
}

.grid dt {
  margin-bottom: 2px;
  font-size: 13px;
  color: var(--text-dim);
}

.grid dd {
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.need {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.ns {
  min-height: 22px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-dim);
}

.ns a { color: var(--cream); }

.ns code { font-size: 12.5px; }

/* Chip: gembok saat menunggu, titik biru saat dibaca, centang saat selesai. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-dim);
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.chip .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
}

.chip.act {
  color: var(--cream);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.chip.ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 50%, transparent);
}

.chip.act svg,
.chip.ok svg { display: none; }

.chip.act .ic::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  /* Berdenyut selama bagian itu sedang dibaca. */
  animation: hw-pulse 1.3s ease-in-out infinite;
}

@keyframes hw-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.65); }
}

.chip.ok .ic::after {
  content: '\2713';
  font-size: 11px;
  font-weight: 700;
}

.scan-hint {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-dim);
}

.scan-hint a { color: var(--accent); text-decoration: none; }
.scan-hint a:hover { text-decoration: underline; }

/* Baris status di luar kartu; kosong berarti tidak mengambil ruang. */
.status {
  max-width: 720px;
  margin: 12px auto 0;
  font-size: 13px;
  text-align: center;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.status:empty { display: none; }
.status.is-ok { color: var(--ok); }
.status.is-error { color: var(--danger); }

/* ---------- 8. kartu kegagalan ---------- */

.card {
  max-width: 720px;
  margin: 16px auto 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.note {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-faint);
}

.note:first-child,
.note.is-lead { margin-top: 0; }

.note code { white-space: nowrap; }

.note a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}

.note a:hover { border-bottom-color: var(--accent); }

.steps {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 33px;
  min-height: 22px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-dim);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--text-faint);
  font: 600 11px/20px var(--font-body);
  text-align: center;
}

.steps em { font-style: normal; color: var(--cream); }

.steps a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}

/* ---------- 9. laporan ---------- */

.report {
  display: grid;
  /* Tabel lebar menggulir di dalam kartunya, bukan melebarkan halaman. */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 960px;
  margin: 32px auto 0;
}

.report > *,
.rsec,
.tw { min-width: 0; }

.rsec {
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-card);
}

.rsec h3 {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rtop {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 20px;
}

/* Logo hanya dicetak: di layar kartu laporan tidak memakainya. */
.rh-logo { display: none; }

.rh h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--cream);
}

.rh p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.ag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.btn2 {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--cream);
  font: 500 14px var(--font-body);
  cursor: pointer;
  transition: border-color 0.16s ease;
}

.btn2:hover { border-color: var(--line-strong); }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tile {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-inset);
}

.tile span { font-size: 13px; color: var(--text-dim); }

.tile b {
  display: block;
  margin: 6px 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--cream);
  overflow-wrap: anywhere;
}

.tile small { font-size: 12px; color: var(--text-dim); }

.kv {
  display: grid;
  grid-template-columns: minmax(110px, 230px) minmax(0, 1fr);
  gap: 0 24px;
  font-size: 14px;
}

.kv > span { padding: 9px 0; }

.kv > span:nth-child(odd) {
  font-size: 13px;
  color: var(--text-dim);
}

.kv > span:nth-child(even) {
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.sub {
  margin: 20px 0 4px;
  font-size: 13px;
  color: var(--text-dim);
}

.sub:first-child { margin-top: 0; }

.tw { overflow-x: auto; }

.t { min-width: 640px; }

.th,
.tr {
  display: grid;
  grid-template-columns: var(--c, repeat(4, minmax(0, 1fr)));
  gap: 16px;
  padding: 12px 0;
  font-size: 14px;
}

.th {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
}

.tr {
  border-bottom: 1px solid var(--line);
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.tr:last-child { border-bottom: 0; }

.note2 {
  padding-left: 14px;
  border-left: 2px solid var(--accent);
}

.note2 + .note2 { margin-top: 16px; }

.note2 b { font-size: 14px; font-weight: 600; color: var(--cream); }

.note2 p {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-dim);
}

.bt {
  display: inline-block;
  width: 68px;
  height: 3px;
  margin-right: 10px;
  border-radius: 3px;
  background: var(--line);
  vertical-align: middle;
}

.bt i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.bt i.is-low { background: var(--warn); }
.bt i.is-bad { background: var(--danger); }

/* Footer laporan hanya untuk hasil cetak, jadi di layar tidak dirender. */
.page-foot {
  display: none;
}

/* Wadah halaman cetak tidak berwujud di layar: kartu tetap ditata grid .report
   seolah tidak ada pembungkus. */
.print-page {
  display: contents;
}

/* ---------- 10. cara kerja ---------- */

.how {
  max-width: 960px;
  margin: 80px auto 0;
}

.how h2 { margin-bottom: 20px; }

/* Dua judul bagian utama dibaca sebagai judul, bukan label kecil: lebih besar
   dan putih. Bagian VirusTotal tetap memakai label kecil. */
#setup > .label,
.how-safe > .label,
#security > .label {
  font-size: 19px;
  font-weight: 600;
  color: var(--cream);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.step {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.step .n {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
}

.step h3 {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
}

.step p {
  font-size: 14px;
  color: var(--text-dim);
}

.step code { font-size: 12px; }

/* Tautan unduhan tampil seperti chip kode lain, hanya warnanya aksen. */
.step a { text-decoration: none; }
.step a code { color: var(--accent); }
.step a:hover code { text-decoration: underline; }

/* ---------- 11. keamanan ---------- */

.how-safe { margin-bottom: 0; }

/* ---------- 11b. hash & verdict VirusTotal ---------- */

.how-sec {
  margin-top: 64px;
  margin-bottom: 96px;
}

.sec-lead {
  max-width: 600px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim);
}

/* Satu kartu gelap: satu baris per unduhan, dipisah garis rambut, lalu blok
   perintah Get-FileHash di bawahnya. */
.vt-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  /* Sama dengan kartu "Detected in your browser". */
  background: var(--bg-card);
}

.vt { display: block; }

.vt-row {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}

.vt-row + .vt-row { border-top: 1px solid var(--line); }

.vt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vt-name {
  font: 600 16px var(--font-body);
  color: var(--cream);
}

.vt-size {
  flex: none;
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.vt-hash,
.vt-cmd {
  display: flex;
  gap: 10px;
}

.vt-hash code,
.vt-cmd code {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(15, 17, 22, 0.55);
  font: 12.5px/1.4 var(--font-mono);
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: normal;
}

.vt-copy {
  flex: none;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: 500 13px var(--font-body);
  cursor: pointer;
}

.vt-copy:hover {
  border-color: var(--line-strong);
  background: var(--hover);
}

.vt-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

/* Titik status: abu belum diperiksa, kuning ada temuan, hijau bersih. */
.vt-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
}

.vt-state::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
}

.vt-state.is-ok,
.vt-state.is-warn { color: var(--cream); }
.vt-state.is-ok::before { background: var(--ok); }
.vt-state.is-warn::before { background: var(--warn); }

.vt-link {
  flex: none;
  font-size: 13px;
  color: var(--cream);
  text-decoration: none;
}

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

.vt-check {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
}

.vt-check-label {
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-dim);
}

.vt-empty {
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-faint);
}

.vt-empty code { font-size: 0.95em; }

.vt-stamp {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-faint);
}

.vt-stamp:empty { display: none; }

@media (max-width: 620px) {
  .vt-row,
  .vt-check { padding: 16px; }
  .vt-hash,
  .vt-cmd { flex-direction: column; }
  .vt-copy { align-self: flex-start; padding: 8px 16px; }
}

/* Laporan mandiri (reports.html) langsung mulai dari kartu perangkat. */
body.has-embedded .hero-shell { display: none; }
body.has-embedded::before { display: none; }
body.has-embedded .report-wrap { padding-top: 22px; }
body.has-embedded .report { margin-top: 0; }

/* ---------- 12. responsif ---------- */

@media (max-width: 900px) {
  .wrap { padding: 0 18px; }
  .report-wrap { padding-bottom: 72px; }
  .hero { padding: 56px 0 44px; }
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-sec { margin-top: 48px; margin-bottom: 72px; }
}

@media (max-width: 620px) {
  .wrap { padding: 0 16px; }
  .brand-by { display: none; }
  .hero { padding: 44px 0 36px; }
  .hero .lead { font-size: 16px; }
  .cta { gap: 12px; }
  .stage { padding: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
  .rsec { padding: 20px; }
  .rtop { gap: 12px; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .kv > span { padding: 2px 0; }
  .kv > span:nth-child(odd) {
    padding-top: 10px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .kv > span:nth-child(even) { padding-bottom: 6px; }
  .how { margin-top: 56px; }
  .tile { padding: 14px; }
}

/* ---------- 12b. animasi masuk ---------- */

@keyframes hw-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* Layar pertama muncul berurutan: merek, judul, lead, tombol, catatan. */
.masthead { animation: hw-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero > * { animation: hw-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero > h1 { animation-delay: 0.06s; }
.hero > .lead { animation-delay: 0.16s; }
.hero > .cta { animation-delay: 0.26s; }
.hero > .micro { animation-delay: 0.36s; }
.stage { animation: hw-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.44s both; }

/* Bagian di bawah layar pertama naik pelan saat masuk viewport. Kelasnya
   dipasang app.js, jadi tanpa JS konten tetap langsung terlihat. */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Chip hasil scan muncul satu per satu saat kartu berubah hijau. */
@keyframes hw-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.chips.is-stagger .chip {
  animation: hw-pop 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.chips.is-stagger .chip:nth-child(1) { animation-delay: 0.04s; }
.chips.is-stagger .chip:nth-child(2) { animation-delay: 0.12s; }
.chips.is-stagger .chip:nth-child(3) { animation-delay: 0.2s; }
.chips.is-stagger .chip:nth-child(4) { animation-delay: 0.28s; }
.chips.is-stagger .chip:nth-child(5) { animation-delay: 0.36s; }
.chips.is-stagger .chip:nth-child(6) { animation-delay: 0.44s; }

/* Kartu laporan menyusul berurutan setelah bloknya terlihat. */
.report.is-in .rsec {
  animation: hw-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 13. cetak ---------- */

@media print {
  /* Ukuran kertas bawaan A4; sisa area cetak sesudah margin = 265mm. */
  @page {
    size: A4;
    margin: 16mm 14mm;
  }

  body { background: #fff; color: #111; }
  body::before { display: none; }

  /* Blok yang belum sempat ter-reveal harus tetap ikut tercetak. */
  .reveal { opacity: 1; transform: none; }

  .hero-shell,
  .status,
  .no-print { display: none !important; }

  .wrap,
  .report-wrap { max-width: none; padding: 0; }

  /* Cetak memakai aliran blok agar pemenggalan halaman bisa diatur. */
  .report { display: block; gap: 0; margin: 0; }

  /* Satu kartu tidak terpotong antar halaman. */
  .rsec { break-inside: avoid; }

  /* Tiap wadah halaman jadi kolom setinggi area cetak A4 (265mm, disisakan 5mm
     supaya tidak meluber) dan mulai di kertas baru. Footer didorong
     margin-top: auto sehingga duduk di dasar halaman. */
  .print-page {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 260mm;
    break-after: page;
  }

  .print-page:last-child { break-after: auto; }

  /* Footer tiap halaman: nomor halaman di kiri, asal laporan di kanan. */
  .page-foot {
    display: block;
    margin-top: auto;
    padding-top: 7px;
    border-top: 1px solid #e2e6eb;
    break-inside: avoid;
  }

  .pf-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 10.5px;
    color: #7a818b;
  }

  .pf-from {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .pf-from img {
    display: block;
    width: 14px;
    height: 14px;
  }

  .pf-from a {
    font-weight: 600;
    color: #111;
    text-decoration: underline;
    text-decoration-color: #c9ced6;
    text-underline-offset: 2px;
  }

  .pf-note {
    margin-top: 4px;
    font-size: 10px;
    color: #7a818b;
  }

  .rsec,
  .tile {
    border-color: #e2e6eb;
    background: #fff;
  }

  .rsec h3,
  .tile span,
  .tile small,
  .kv > span:nth-child(odd),
  .sub,
  .th,
  .note2 p,
  .rh p { color: #555; }

  .rh h2,
  .tile b,
  .kv > span:nth-child(even),
  .tr { color: #111; }

  /* Logo hitam siap cetak: berkas terpisah, tanpa filter, supaya tidak
     dirasterisasi kasar oleh printer dan hasilnya tetap tajam. */
  .rh-logo {
    display: block;
    position: absolute;
    top: -8px;
    right: 0;
    width: 68px;
    height: 68px;
  }

  .btn2 { display: none; }

  .tw { overflow: visible; }
  .t { min-width: 0; }

  .th,
  .tr { border-color: #e2e6eb; }

  .note2 { border-left-color: #9bb8d8; }

  /* Browser tidak mencetak background secara default, jadi bar baterai
     hilang di PDF; warnanya dipaksa ikut tercetak dan diberi garis tepi. */
  .bt {
    background: #e2e6eb;
    box-shadow: 0 0 0 1px #c9ced6;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .bt i {
    background: #4a89c7;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  a { color: #111; }
}
