/* Sistem tampilan portal tes online PT Teratai Widjaja.
   Dipakai oleh semua halaman yang mewarisi tes_base.html.
   Warna: navy #1e3a5f dan merah #c8102e dari logo, di atas netral hangat. */

:root {
  --t-bg: #f7f4ee;
  --t-surface: #ffffff;
  --t-ink: #1f2937;
  --t-muted: #6b7280;
  --t-line: #e6e1d7;
  --t-line-strong: #c9c2b5;
  --t-navy: #1e3a5f;
  --t-navy-dark: #16304f;
  --t-red: #c8102e;
  --t-red-soft: #fbe9ec;
  --t-tint: #eaf0f7;
  --t-placeholder: #9ca3af;
  --t-footer-bg: #f0ece3;      /* footer publik: krem sedikit lebih gelap dari halaman */
  --t-footer-line: #ddd6c8;
  --t-shadow: 0 1px 2px rgba(20, 41, 74, 0.05), 0 10px 30px rgba(20, 41, 74, 0.06);
  --t-radius: 14px;
  --t-radius-sm: 10px;
  --t-font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--t-bg);
  color: var(--t-ink);
  font-family: var(--t-font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* bukan hidden: hidden membuat body jadi scroll container dan mematikan position: sticky */
}
h1, h2, h3, p { margin: 0; }
a { color: var(--t-navy); text-decoration: none; }
a:hover { color: var(--t-navy-dark); text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
.tes-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- kerangka halaman ---------- */
.tes-header { background: var(--t-surface); border-bottom: 1px solid var(--t-line); flex-shrink: 0; }
.tes-header-inner { max-width: 1152px; margin: 0 auto; padding: 0 32px; height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tes-logo img { height: 54px; width: auto; } /* logo_teratai_rapat.png: versi tanpa ruang kosong dari logo_teratai.png */
.tes-header-right { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tes-header-name { font-size: 16px; color: var(--t-muted); padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tes-link { font-size: 16px; font-weight: 600; color: var(--t-navy); background: none; border: 0; padding: 0; cursor: pointer; }
.tes-pill { display: inline-flex; flex-shrink: 0; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; font-size: 16px; font-weight: 600; white-space: nowrap; background: var(--t-surface); color: var(--t-muted); border: 1px solid var(--t-line); }
.tes-pill--time { background: var(--t-tint); color: var(--t-navy); border-color: var(--t-tint); font-weight: 700; font-variant-numeric: tabular-nums; }
.tes-pill--time.is-urgent, .tes-pill--time.timer-warning { background: var(--t-red-soft); color: var(--t-red); border-color: var(--t-red-soft); animation: tes-pulse 1.2s ease-in-out infinite; }
@keyframes tes-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.tes-main { flex-grow: 1; padding: 40px 32px 0; }
.tes-main--center { display: flex; align-items: center; justify-content: center; padding-bottom: 40px; }
.tes-container { width: 100%; max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.tes-container--wide { max-width: 1152px; }
.tes-container--narrow { max-width: 720px; }

/* Footer halaman tes: logo + nama di kiri,
   ajakan hubungi HR dengan pil WhatsApp/telepon di kanan. */
.tes-footer { margin-top: 48px; background: var(--t-surface); border-top: 1px solid var(--t-line); flex-shrink: 0; }
.tes-footer-in { max-width: 1152px; margin: 0 auto; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.tes-footer-merek { display: flex; align-items: center; gap: 12px; }
.tes-footer-merek img { height: 34px; width: auto; }
.tes-footer-merek-teks { display: flex; flex-direction: column; line-height: 1.3; }
.tes-footer-merek-nama { font-size: 15px; font-weight: 800; color: var(--t-ink); }
.tes-footer-merek-sub { font-size: 13px; color: var(--t-placeholder); }
.tes-footer-bantuan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tes-footer-bantuan-teks { font-size: 14px; color: var(--t-muted); }
.tes-footer-pil { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 999px; background: var(--t-surface); border: 1px solid var(--t-line); color: var(--t-navy); font-size: 15px; font-weight: 600; white-space: nowrap; }
.tes-footer-pil:hover { border-color: var(--t-navy); text-decoration: none; }
.tes-footer-pil svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tes-footer-atas, .tes-footer-pil-baris { display: contents; }   /* di laptop pembungkusnya tidak dipakai */
.tes-footer-tahun, .tes-footer-pil-singkat { display: none; }

/* ---------- tipografi ---------- */
.tes-h1 { font-size: 36px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--t-ink); }
.tes-h2 { font-size: 24px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; color: var(--t-ink); }
.tes-lead { font-size: 17px; line-height: 1.55; color: var(--t-muted); max-width: 40em; text-wrap: pretty; }
.tes-text { font-size: 17px; line-height: 1.55; color: var(--t-ink); text-wrap: pretty; }
.tes-small { font-size: 14px; line-height: 1.55; color: var(--t-muted); }
.tes-label { font-size: 15px; font-weight: 700; color: var(--t-ink); }
.tes-stack { display: flex; flex-direction: column; gap: 12px; }
.tes-stack--tight { gap: 6px; }

/* ---------- tombol & isian ---------- */
.tes-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 28px; border-radius: var(--t-radius-sm); font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer; border: 1.5px solid transparent; text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; white-space: nowrap; }
.tes-btn:hover { text-decoration: none; }
.tes-btn--primary { background: var(--t-navy); color: #fff; border-color: var(--t-navy); }
.tes-btn--primary:hover { background: var(--t-navy-dark); border-color: var(--t-navy-dark); color: #fff; }
.tes-btn--secondary { background: var(--t-surface); color: var(--t-navy); border-color: var(--t-line); }
.tes-btn--secondary:hover { border-color: var(--t-navy); color: var(--t-navy); }
.tes-btn--block { width: 100%; }
.tes-btn:disabled, .tes-btn.is-disabled { opacity: 0.55; cursor: default; }
.tes-btn:focus-visible, .tes-input:focus-visible, .tes-link:focus-visible { outline: 3px solid rgba(30, 58, 95, 0.35); outline-offset: 2px; }

.tes-input { width: 100%; height: 56px; padding: 0 18px; background: var(--t-surface); border: 1.5px solid var(--t-line); border-radius: var(--t-radius-sm); font-size: 18px; font-weight: 600; color: var(--t-ink); outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.tes-input::placeholder { color: var(--t-placeholder); font-weight: 500; }
.tes-input:focus { border-color: var(--t-navy); box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.12); }
.tes-input.filled, .tes-input.is-filled { border-color: var(--t-navy); }
.tes-input--token { font-size: 19px; letter-spacing: 0.04em; }

/* ---------- kartu & catatan ---------- */
.tes-card { background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); box-shadow: var(--t-shadow); }
.tes-card--pad { padding: 28px 32px 30px; }
.tes-note { background: var(--t-tint); border-radius: var(--t-radius); padding: 18px 24px; display: flex; flex-direction: column; gap: 6px; }
.tes-note-title { font-size: 16px; font-weight: 700; color: var(--t-navy); }
.tes-note-text { font-size: 16px; color: var(--t-ink); text-wrap: pretty; }
.tes-note-sub { font-size: 15px; color: var(--t-muted); }

/* ---------- soal ---------- */
.tes-q { background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); box-shadow: var(--t-shadow); padding: 26px 32px 28px; display: flex; flex-direction: column; gap: 16px; transition: box-shadow 0.25s ease, border-color 0.25s ease; scroll-margin-top: 110px; }
.tes-q.is-answered, .tes-q.answered { border-color: #cfd9e6; }
.tes-q.is-missing { box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.3); }
.tes-q-label { font-size: 14px; font-weight: 700; color: var(--t-navy); }
.tes-q-text { font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; color: var(--t-ink); text-wrap: pretty; }
.tes-opts { display: flex; flex-direction: column; gap: 10px; }
.tes-opts--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tes-opt { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1.5px solid var(--t-line); background: var(--t-surface); border-radius: 12px; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; min-height: 56px; }
.tes-opt:hover { border-color: var(--t-line-strong); }
.tes-opt--top { align-items: flex-start; }
.tes-opt-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--t-line-strong); background: #fff; flex-shrink: 0; transition: border 0.15s ease; }
.tes-opt-text { font-size: 18px; color: var(--t-ink); line-height: 1.45; }
.tes-opt-letter { width: 28px; height: 28px; border-radius: 8px; background: var(--t-tint); color: var(--t-navy); font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.tes-sr:checked + .tes-opt, .tes-opt.selected { border-color: var(--t-navy); background: var(--t-tint); }
.tes-sr:checked + .tes-opt .tes-opt-dot { border: 7px solid var(--t-navy); }
.tes-sr:checked + .tes-opt .tes-opt-text, .tes-opt.selected .tes-opt-text { font-weight: 600; }
.tes-sr:checked + .tes-opt .tes-opt-letter, .tes-opt.selected .tes-opt-letter { background: var(--t-navy); color: #fff; }
.tes-sr:focus-visible + .tes-opt { outline: 3px solid rgba(30, 58, 95, 0.35); outline-offset: 2px; }

/* pilihan pendek berjajar (tes ingatan) */
.tes-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tes-choice { display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 10px; border: 1.5px solid var(--t-line); border-radius: var(--t-radius-sm); background: var(--t-surface); color: var(--t-navy); font-size: 17px; font-weight: 700; cursor: pointer; text-align: center; transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease; }
.tes-choice:hover { border-color: var(--t-line-strong); }
.tes-sr:checked + .tes-choice { background: var(--t-navy); border-color: var(--t-navy); color: #fff; }
.tes-sr:focus-visible + .tes-choice { outline: 3px solid rgba(30, 58, 95, 0.35); outline-offset: 2px; }

/* analogi: kotak jawaban menyatu dalam kalimat */
.tes-analogi { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 22px; font-weight: 700; color: var(--t-ink); }
.tes-analogi-eq { color: var(--t-red); font-weight: 800; }
.tes-analogi .tes-input { width: 300px; height: 54px; }

/* matematika */
.tes-math-input { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* bahasa inggris */
.tes-eng-pattern { font-size: 28px; font-weight: 800; letter-spacing: 0.3em; color: var(--t-navy); word-break: break-word; }
.tes-eng-hint { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--t-tint); color: var(--t-navy); font-size: 15px; font-weight: 700; }
.tes-eng-input { max-width: 360px; text-transform: uppercase; letter-spacing: 0.08em; }
.tes-eng-input::placeholder { text-transform: none; letter-spacing: normal; }
.tes-eng-word { font-size: 24px; font-weight: 800; letter-spacing: 0.04em; color: var(--t-navy); }
.tes-section-head { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }

/* bilah aksi bawah */
.tes-actionbar { position: sticky; bottom: 0; z-index: 20; background: var(--t-surface); border-top: 1px solid var(--t-line); padding: 18px 32px; }
.tes-actionbar-inner { max-width: 1152px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tes-actionbar-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tes-count { font-size: 16px; color: var(--t-muted); }
.tes-count strong { color: var(--t-ink); font-weight: 700; }

/* progres */
.tes-progress { height: 10px; border-radius: 999px; background: var(--t-surface); border: 1px solid var(--t-line); overflow: hidden; }
.tes-progress-fill { height: 100%; background: var(--t-navy); border-radius: 999px; transition: width 0.6s ease; }

/* dashboard */
.tes-dash-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.tes-dash-progress { display: flex; flex-direction: column; gap: 10px; width: 360px; max-width: 100%; }
.tes-dash-progress-row { display: flex; justify-content: space-between; font-size: 15px; }
.tes-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tes-test { border-radius: var(--t-radius); padding: 24px 26px; display: flex; flex-direction: column; gap: 14px; background: var(--t-surface); border: 1.5px solid var(--t-line); box-shadow: var(--t-shadow); }
.tes-test--active { border-color: var(--t-navy); }
.tes-test--done { background: var(--t-tint); border-color: var(--t-tint); box-shadow: none; }
.tes-test-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tes-test-num { width: 32px; height: 32px; border-radius: 50%; background: var(--t-tint); color: var(--t-navy); font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tes-test--active .tes-test-num { background: var(--t-navy); color: #fff; }
.tes-test-state { font-size: 14px; font-weight: 600; color: var(--t-muted); }
.tes-test--active .tes-test-state { color: var(--t-red); font-weight: 700; }
.tes-test--done .tes-test-state { color: var(--t-navy); font-weight: 700; }
.tes-test-name { font-size: 20px; font-weight: 700; color: var(--t-ink); }
.tes-test-desc { font-size: 15px; color: var(--t-muted); }
.tes-test-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.tes-test-meta { font-size: 14px; color: var(--t-muted); }
.tes-test-done-text { font-size: 15px; color: var(--t-muted); }

/* daftar tes (halaman sebelum mulai) */
.tes-list { padding: 8px 32px; }
.tes-row { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--t-line); }
.tes-row:last-child { border-bottom: 0; }
.tes-row-body { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tes-row-name { font-size: 17px; font-weight: 700; color: var(--t-ink); }
.tes-row-desc { font-size: 15px; color: var(--t-muted); }
.tes-row-meta { font-size: 15px; color: var(--t-muted); white-space: nowrap; }

/* halaman masuk */
.tes-login { flex-grow: 1; display: grid; grid-template-columns: 1fr 1fr; padding: 32px; gap: 0; }
.tes-login-form { display: flex; align-items: center; justify-content: center; padding: 0 48px 0 72px; }
.tes-login-box { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 28px; }
.tes-login-box .tes-logo img { height: 56px; margin-left: 0; }

/* materi hafalan */
.tes-scroll { overflow-y: auto; min-height: 0; }
.tes-cat { display: flex; align-items: center; gap: 14px; margin: 24px 0 12px; }
.tes-cat:first-child { margin-top: 0; }
.tes-cat-name { font-size: 17px; font-weight: 800; color: var(--t-navy); }
.tes-cat-line { flex-grow: 1; height: 1px; background: var(--t-line); }
.tes-cat-count { font-size: 14px; color: var(--t-muted); white-space: nowrap; }
.tes-mats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tes-mat { background: var(--t-surface); border: 1px solid var(--t-line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tes-mat-q { font-size: 15px; font-weight: 700; color: var(--t-ink); line-height: 1.35; }
.tes-mat-a { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 10px; border-radius: 8px; background: var(--t-tint); color: var(--t-navy); font-size: 17px; font-weight: 800; letter-spacing: 0.02em; text-align: center; }

/* kraepelin */
.tes-kp-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tes-kp-step { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; }
.tes-kp-sim { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; padding: 28px 32px; }
.tes-kp-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tes-kp-box { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--t-surface); border: 1.5px solid var(--t-line); color: var(--t-line-strong); }
.tes-kp-box--on { color: var(--t-navy); border-color: var(--t-navy); }
.tes-kp-box--ans { background: var(--t-red); border-color: var(--t-red); color: #fff; }
.tes-kp-arrow { font-size: 28px; font-weight: 800; color: var(--t-navy); }

.tes-kp-body { position: fixed; inset: 0; overflow: hidden; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); overscroll-behavior-y: contain; -webkit-user-select: none; user-select: none; }
.tes-kp-body * { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.tes-kp-nav { background: var(--t-surface); border-bottom: 1px solid var(--t-line); padding: 12px 24px; flex-shrink: 0; }
.tes-kp-nav-inner { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tes-kp-nav-left { display: flex; align-items: center; gap: 16px; }
.tes-kp-nav-left img { height: 36px; }
.tes-kp-col-badge { display: inline-flex; white-space: nowrap; gap: 6px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--t-navy); color: #fff; font-size: 15px; font-weight: 700; align-items: center; }
.tes-kp-col-badge strong { font-size: 20px; font-weight: 800; }
.tes-kp-timer { width: 64px; height: 64px; border-radius: 16px; background: var(--t-surface); border: 1.5px solid var(--t-line); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: var(--t-navy); font-variant-numeric: tabular-nums; }
.tes-kp-timer.is-urgent, .tes-kp-timer.timer-warning { color: var(--t-red); border-color: var(--t-red); animation: tes-pulse 0.8s ease-in-out infinite; }
.timer-track { background: var(--t-line); height: 6px; width: 100%; flex-shrink: 0; }
.timer-fill { height: 100%; background: var(--t-navy); transition: width 0.1s linear; }
.tes-kp-stage { flex-grow: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 16px 24px; display: flex; flex-direction: column; min-height: 0; position: relative; }
/* tirai kolom: jeda sebelum tiap kolom, kolom yang belum tiba, dan pengiriman terakhir */
.tes-kp-tirai { position: absolute; inset: 16px 24px; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; border-radius: 16px; background: rgba(247, 244, 238, 0.97); }
.tes-kp-tirai[hidden] { display: none; }
.tes-kp-tirai-label { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-muted); }
.tes-kp-tirai-angka { font-size: 84px; font-weight: 800; line-height: 1; color: var(--t-navy); font-variant-numeric: tabular-nums; }
.tes-kp-tirai-ket { font-size: 17px; color: var(--t-ink); max-width: 26em; text-wrap: balance; }
.tes-kp-tirai--sambung .tes-kp-tirai-angka { font-size: 30px; }
.tes-kp-pita { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 14px); z-index: 45; background: var(--t-red-soft); color: var(--t-red); border: 1px solid #f0bcc5; border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; box-shadow: var(--t-shadow); }
.tes-kp-pita[hidden] { display: none; }
@media (max-width: 768px) { .tes-kp-tirai { inset: 8px 12px; } .tes-kp-tirai-angka { font-size: 64px; } }
.game-board { flex-grow: 1; display: flex; min-height: 0; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); box-shadow: var(--t-shadow); overflow: hidden; }
.tes-kp-side { width: 112px; background: var(--t-bg); display: flex; flex-direction: column; align-items: center; padding: 20px 8px; gap: 12px; }
.tes-kp-side--right { width: 200px; justify-content: center; padding: 20px; text-align: center; border-left: 1px solid var(--t-line); }
.tes-kp-side--left { border-right: 1px solid var(--t-line); }
.tes-kp-side-title { font-size: 13px; font-weight: 700; color: var(--t-muted); }
.tes-kp-center { flex-grow: 1; display: flex; justify-content: center; position: relative; }
#kraepelin-container { width: 100%; max-width: 200px; height: 100%; display: flex; flex-direction: column-reverse; align-items: center; overflow-y: auto; padding: 80px 0 240px; scrollbar-width: none; }
#kraepelin-container::-webkit-scrollbar, #history-container-desktop::-webkit-scrollbar { display: none; }
#history-container-desktop { display: flex; flex-direction: column-reverse; align-items: center; width: 100%; overflow-y: auto; padding-bottom: 80px; height: 100%; scrollbar-width: none; }
.number-item { width: 100%; height: 72px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; color: var(--t-line-strong); border-radius: 16px; margin-bottom: 14px; position: relative; font-variant-numeric: tabular-nums; transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.number-item.active-operand { background: var(--t-navy); color: #fff; font-size: 40px; transform: scale(1.06); z-index: 2; }
.number-item.top-num { transform: scale(1.06) translateY(-2px); }
.history-item { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; margin-bottom: 10px; background: var(--t-surface); border: 1.5px solid var(--t-line); color: var(--t-muted); }
.history-correct { background: var(--t-tint); border-color: var(--t-navy); color: var(--t-navy); }
.history-wrong { background: var(--t-red-soft); border-color: var(--t-red); color: var(--t-red); }
.mobile-numpad { display: none; }
.numpad-btn { height: 56px; border-radius: 12px; font-size: 22px; font-weight: 800; background: var(--t-surface); border: 1.5px solid var(--t-line); color: var(--t-navy); display: flex; align-items: center; justify-content: center; width: 100%; -webkit-user-select: none; user-select: none; }
.numpad-btn:active { background: var(--t-navy); color: #fff; border-color: var(--t-navy); }
#hidden-input { position: fixed; top: 0; left: 0; opacity: 0; width: 1px; height: 1px; }
.tes-kp-mobile-history { display: none; }

/* lapisan tunggu */
/* Tirai pengunci satu tab (kunci_tab.js): menutup seluruh halaman di tab yang tidak aktif. */
.tes-tab-tirai { position: fixed; inset: 0; z-index: 3000; background: var(--t-bg); display: flex; align-items: center; justify-content: center; padding: 24px; }
.tes-tab-kartu { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; max-width: 480px; padding: 32px 28px; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); box-shadow: var(--t-shadow); }
.tes-tab-kartu .tes-text { color: var(--t-muted); }
.tes-tab-kartu .tes-small { font-size: 13px; color: var(--t-placeholder); }
html.tes-tab-terkunci { overflow: hidden; }
.tes-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(247, 244, 238, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }
.tes-spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--t-line); border-top-color: var(--t-navy); animation: tes-spin 0.9s linear infinite; }
@keyframes tes-spin { to { transform: rotate(360deg); } }

/* sweetalert mengikuti sistem */
div:where(.swal2-container) div:where(.swal2-popup) { font-family: var(--t-font); border-radius: var(--t-radius); padding: 28px 28px 24px; color: var(--t-ink); }
div:where(.swal2-container) h2:where(.swal2-title) { font-size: 24px; font-weight: 800; color: var(--t-ink); letter-spacing: -0.01em; }
div:where(.swal2-container) div:where(.swal2-html-container) { font-size: 17px; color: var(--t-muted); line-height: 1.55; }
/* Dialog dari tesDialog() di common.js: tanpa ikon, rata tengah, tombol sama dengan tombol halaman. */
div:where(.swal2-container) div.tes-dlg { width: 440px; max-width: calc(100% - 32px); padding: 32px 28px 24px; border-radius: 18px; box-shadow: 0 2px 6px rgba(20, 41, 74, 0.08), 0 24px 60px rgba(20, 41, 74, 0.22); }
div:where(.swal2-container).swal2-backdrop-show { background: rgba(22, 32, 48, 0.45); }
.tes-dlg h2.tes-dlg-judul { padding: 4px 0 0; font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: -0.01em; color: var(--t-ink); text-wrap: balance; }
.tes-dlg .tes-dlg-teks { margin: 8px 0 0; padding: 0; font-size: 16px; line-height: 1.55; color: var(--t-muted); text-wrap: pretty; }
.tes-dlg .tes-dlg-aksi { flex-wrap: nowrap; gap: 12px; width: 100%; margin: 24px 0 0; padding: 0; }
.tes-dlg .tes-dlg-aksi .tes-btn { flex: 1 1 0; min-width: 0; height: 50px; margin: 0; padding: 0 16px; font-size: 16px; }
.tes-dlg .tes-dlg-aksi .swal2-cancel { order: 1; }
.tes-dlg .tes-dlg-aksi .swal2-confirm { order: 2; }
.tes-dlg .tes-btn:focus-visible { outline: 2px solid rgba(30, 58, 95, 0.3); outline-offset: 2px; }
.tes-btn--bahaya { background: var(--t-red); color: #fff; border-color: var(--t-red); }
.tes-btn--bahaya:hover { background: #a50d26; border-color: #a50d26; color: #fff; }
.tes-dlg-proses { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--t-navy); }
.tes-dlg-proses::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--t-line); border-top-color: var(--t-navy); animation: tes-spin 0.9s linear infinite; }
@media (prefers-reduced-motion: reduce) { .tes-dlg-proses::before { animation-duration: 2s; } }
/* Notifikasi kecil dari tesToast() di common.js: kartu putih, titik warna menurut jenis. */
div:where(.swal2-container) div.tes-toast { width: 400px; max-width: calc(100vw - 32px); padding: 12px 10px 12px 16px; border-radius: 12px; background: var(--t-surface); color: var(--t-ink); border: 1px solid var(--t-line); box-shadow: 0 2px 4px rgba(20, 41, 74, 0.06), 0 12px 32px rgba(20, 41, 74, 0.16); }
div:where(.swal2-container) div.tes-toast .swal2-html-container { margin: 0; padding: 0; text-align: left; font-size: 15px; line-height: 1.45; font-weight: 600; color: inherit; }
div:where(.swal2-container) div.tes-toast .swal2-close { width: 28px; height: 28px; margin: 0 0 0 8px; align-self: center; border-radius: 8px; font-size: 22px; color: inherit; opacity: 0.6; }
div:where(.swal2-container) div.tes-toast .swal2-close:hover { opacity: 1; }
div:where(.swal2-container) div.tes-toast .swal2-close:focus { box-shadow: none; outline: 2px solid rgba(30, 58, 95, 0.3); }
.tes-toast-isi { display: flex; align-items: baseline; gap: 10px; }
.tes-toast-titik { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; transform: translateY(-1px); background: #2c6e3f; }
.tes-toast.jenis-info .tes-toast-titik { background: var(--t-navy); }
.tes-toast.jenis-warning .tes-toast-titik { background: #c27a0e; }
.tes-toast.jenis-error .tes-toast-titik { background: var(--t-red); }
div:where(.swal2-container) div.tes-toast.jenis-error { background: var(--t-red-soft); border-color: #f3c7cf; color: #7d0a1d; }
body.swal2-toast-shown .swal2-container:has(.tes-toast) { width: 432px; max-width: 100%; }
@media (max-width: 640px) {
  body.swal2-toast-shown .swal2-container:has(.tes-toast) { width: 100%; }
  div:where(.swal2-container) div.tes-toast { width: calc(100vw - 32px); margin: 0 auto 16px; }
  div:where(.swal2-container) div.tes-dlg { padding: 28px 20px 20px; }
  .tes-dlg h2.tes-dlg-judul { font-size: 20px; }
  .tes-dlg .tes-dlg-aksi { flex-direction: column; }
  .tes-dlg .tes-dlg-aksi .tes-btn { flex: 0 0 auto; width: 100%; }
  .tes-dlg .tes-dlg-aksi .swal2-confirm { order: 1; }
  .tes-dlg .tes-dlg-aksi .swal2-cancel { order: 2; }
}

/* ---------- responsif ---------- */
@media (max-width: 1024px) {
  .tes-mats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tes-login-form { padding: 0 24px 0 48px; }
}
@media (max-width: 768px) {
  body { font-size: 16px; }
  .tes-header-inner { height: 64px; padding: 0 16px; gap: 10px; }
  .tes-logo img { height: 38px; }
  .tes-header-right { gap: 8px; }
  .tes-header-name { display: none; }
  .tes-pill { height: 36px; padding: 0 12px; font-size: 14px; }
  .tes-pill--name { display: none; }
  .tes-main { padding: 24px 16px 0; }
  .tes-container { gap: 18px; }
  .tes-h1 { font-size: 28px; }
  .tes-h2 { font-size: 21px; }
  .tes-lead, .tes-text { font-size: 16px; }
  .tes-card--pad { padding: 20px 18px 22px; }
  .tes-q { padding: 20px 18px 22px; gap: 14px; scroll-margin-top: 80px; }
  .tes-q-text { font-size: 19px; }
  .tes-opt { padding: 13px 14px; gap: 12px; }
  .tes-opt-text { font-size: 16px; }
  .tes-opts--grid { grid-template-columns: 1fr; }
  .tes-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tes-analogi { font-size: 19px; gap: 10px; }
  .tes-analogi .tes-input { width: 100%; }
  .tes-eng-pattern { font-size: 22px; letter-spacing: 0.22em; }
  /* Bilah bawah di HP: satu baris saja supaya hemat tempat. Tautan "lihat soal
     yang belum dijawab" disembunyikan; gantinya angka hitungannya bisa ditekan. */
  .tes-actionbar { padding: 8px 16px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .tes-actionbar-inner { flex-wrap: nowrap; gap: 12px; }
  .tes-actionbar-left .tes-link { display: none; }
  .tes-count { font-size: 14px; line-height: 1.3; min-width: 0; }
  .tes-count.is-tekan { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
  .tes-actionbar .tes-btn { height: 44px; padding: 0 18px; font-size: 15px; flex-shrink: 0; }
  .tes-actionbar--prep .tes-actionbar-inner { flex-direction: column; align-items: stretch; }
  .tes-actionbar--prep .tes-count { display: none; }
  .tes-actionbar--prep .tes-btn { width: 100%; }
  /* Saat papan ketik HP terbuka, bilah bawah disembunyikan supaya soal tetap terbaca. */
  .tes-ketik .tes-actionbar { display: none; }
  .tes-footer-kontak { flex-direction: column; gap: 4px; }
  .tes-footer-sep { display: none; }
  .tes-grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .tes-test { padding: 20px 18px; }
  .tes-dash-progress { width: 100%; }
  .tes-list { padding: 4px 18px; }
  .tes-row { flex-wrap: wrap; gap: 10px 14px; }
  .tes-row-body { flex-basis: calc(100% - 46px); }
  .tes-row-meta { padding-left: 46px; }
  /* Footer tes di HP, varian "HP 1": merek kiri + tahun kanan; bantuan + dua pil pendek sebaris */
  .tes-footer { margin-top: 32px; }
  .tes-footer-in { padding: 16px 16px 18px; flex-direction: column; align-items: stretch; gap: 12px; }
  .tes-footer-atas { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .tes-footer-merek { gap: 10px; }
  .tes-footer-merek img { height: 28px; }
  .tes-footer-merek-sub { display: none; }
  .tes-footer-tahun { display: inline; font-size: 12px; color: var(--t-placeholder); white-space: nowrap; }
  .tes-footer-bantuan { flex-direction: column; align-items: stretch; gap: 8px; }
  .tes-footer-bantuan-teks { font-size: 13px; }
  .tes-footer-pil-baris { display: flex; gap: 8px; }
  .tes-footer-pil { flex: 1 1 0; justify-content: center; min-height: 42px; font-size: 14px; font-weight: 700; }
  .tes-footer-pil-lengkap { display: none; }
  .tes-footer-pil-singkat { display: inline; }
  .tes-login { grid-template-columns: 1fr; padding: 16px; }
  .tes-login-visual { display: none; }
  /* HP: logo dipusatkan di atas, formulir mulai dari atas supaya tidak menggantung di tengah ruang kosong */
  .tes-login-form { padding: 20px 8px 24px; align-items: flex-start; }
  .tes-login-box { gap: 22px; }
  .tes-login-box .tes-logo { align-self: center; margin-bottom: 6px; }
  .tes-login-box .tes-logo img { height: 50px; margin-left: 0; }
  .tes-login-box .tes-h1, .tes-login-box .tes-lead, .tes-login-catatan { text-align: center; }
  .tes-login-box .tes-lead { margin-inline: auto; }
  .tes-login-box .tes-h1 { font-size: 26px; }
  .tes-login-box .tes-lead { font-size: 16px; }
  .tes-mats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tes-mat { padding: 10px 12px; }
  .tes-mat-q { font-size: 14px; }
  .tes-mat-a { font-size: 15px; min-height: 36px; }
  .tes-kp-steps { grid-template-columns: 1fr; }
  .tes-kp-sim { gap: 20px; padding: 20px 16px; }
  .tes-kp-nav { padding: 10px 14px; }
  .tes-kp-nav-left img { height: 30px; }
  .tes-kp-timer { width: 56px; height: 56px; font-size: 26px; border-radius: 14px; }
  .tes-kp-stage { padding: 10px 12px 200px; }
  .tes-kp-side { display: none; }
  .tes-kp-nav .tes-kp-title { display: none; }
  #kraepelin-container { max-width: 160px; padding: 40px 0 300px; }
  .number-item { height: 78px; font-size: 40px; margin-bottom: 16px; }
  .number-item.active-operand { font-size: 44px; }
  .mobile-numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--t-surface); border-top: 1px solid var(--t-line); box-shadow: 0 -10px 30px rgba(20, 41, 74, 0.08); position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; }
  .numpad-btn.numpad-zero { grid-column: 2; }
  .tes-kp-mobile-history { display: flex; flex-direction: column; gap: 6px; position: fixed; top: 84px; left: 12px; z-index: 40; }
  .tes-kp-mobile-history .history-item { width: 40px; height: 40px; font-size: 17px; margin-bottom: 0; }
}
@media (max-width: 420px) {
  .tes-pill--test { display: none; }
  .tes-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- utilitas kecil ---------- */
.tes-gap-sm { gap: 10px; }
.tes-gap-md { gap: 22px; }
.tes-gap-lg { gap: 28px; }
.tes-opts > label, .tes-opts--grid > label, .tes-choices > label { display: block; }
.tes-header--sticky { position: sticky; top: 0; z-index: 30; }
.tes-kp-title { display: flex; flex-direction: column; gap: 2px; }
.tes-kp-title-sub { font-size: 13px; color: var(--t-muted); }
.tes-kp-title-main { font-size: 18px; font-weight: 800; color: var(--t-navy); }
.tes-btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tes-inline-form { display: contents; }

/* ---------- halaman publik: beranda, lowongan, lamar ---------- */
.tes-nav { display: flex; align-items: center; gap: 28px; }
.tes-nav-link { font-size: 16px; font-weight: 600; color: var(--t-muted); white-space: nowrap; }
.tes-nav-link.is-active, .tes-nav-link:hover { color: var(--t-navy); text-decoration: none; }
.tes-btn--nav { height: 46px; padding: 0 22px; font-size: 16px; }
.tes-main--public { padding: 56px 32px 0; gap: 56px; display: flex; flex-direction: column; }
.tes-main--daftar { padding-top: 48px; gap: 28px; }
.tes-container--beranda { gap: 56px; }
.tes-container--daftar { gap: 28px; }
.tes-lead--lg { font-size: 18px; }
.tes-h2--section { font-size: 28px; }
.tes-hero-btns { padding-top: 6px; }
.tes-step-text { font-size: 15px; }
.tes-note--lebar { padding: 22px 28px; }
/* kartu aturan di halaman konfirmasi: dua kolom Lakukan / Jangan */
.tes-aturan { padding: 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.tes-aturan-top { display: flex; flex-direction: column; gap: 2px; }
.tes-aturan-title { font-size: 18px; font-weight: 800; color: var(--t-ink); }
.tes-aturan-sub { font-size: 15px; color: var(--t-muted); }
.tes-aturan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.tes-aturan-kolom { display: flex; flex-direction: column; gap: 10px; }
.tes-aturan-kepala { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tes-aturan-kepala--ya { color: var(--t-navy); }
.tes-aturan-kepala--tidak { color: var(--t-red); }
.tes-aturan-ikon { width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tes-aturan-ikon--ya { background: var(--t-tint); color: var(--t-navy); }
.tes-aturan-ikon--tidak { background: var(--t-red-soft); color: var(--t-red); }
.tes-aturan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tes-aturan-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--t-ink); text-wrap: pretty; }
.tes-aturan-list .tes-aturan-ikon { width: 20px; height: 20px; margin-top: 1px; }
.tes-aturan-kaki { margin: 0; padding-top: 14px; border-top: 1px solid var(--t-line); font-size: 14px; line-height: 1.5; color: var(--t-muted); text-wrap: pretty; }
@media (max-width: 640px) {
  .tes-aturan { padding: 18px 18px; gap: 14px; }
  .tes-aturan-grid { grid-template-columns: 1fr; gap: 16px; }
  .tes-aturan-list li { font-size: 14px; }
}
.tes-sukses-card { padding: 44px 48px; max-width: 760px; }
.tes-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.tes-hero-text { display: flex; flex-direction: column; gap: 22px; }
.tes-hero-title { font-size: 44px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--t-ink); text-wrap: balance; }
.tes-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tes-stat { display: flex; flex-direction: column; gap: 4px; padding: 26px 28px; }
.tes-stat-num { font-size: 44px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--t-navy); }
.tes-stat-label { font-size: 16px; color: var(--t-muted); }
.tes-section { display: flex; flex-direction: column; gap: 18px; }
.tes-section-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tes-rows { padding: 4px 32px; }
.tes-pos-row { display: flex; align-items: center; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--t-line); }
.tes-pos-row:last-child { border-bottom: 0; }
.tes-pos-body { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tes-pos-name { font-size: 19px; font-weight: 700; color: var(--t-ink); }
.tes-pos-req { font-size: 15px; color: var(--t-muted); text-wrap: pretty; white-space: pre-line; }
.tes-pos-vacant { font-size: 14px; color: var(--t-navy); font-weight: 600; }
/* halaman lowongan: kartu per posisi; syarat dipotong 3 baris, tombol "Syarat lengkap" membukanya */
.tes-pos-count { font-size: 15px; font-weight: 600; color: var(--t-muted); margin-top: -8px; }
.tes-pos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tes-pos-card { display: flex; flex-direction: column; gap: 14px; padding: 22px 22px 20px; }
.tes-pos-card-body { display: flex; flex-direction: column; gap: 8px; }
.tes-pos-card-name { font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--t-ink); text-wrap: balance; }
.tes-pos-card-req { font-size: 15px; line-height: 1.55; color: var(--t-muted); text-wrap: pretty; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tes-pos-card.is-open .tes-pos-card-req { display: block; -webkit-line-clamp: unset; overflow: visible; }
.tes-pos-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.tes-pos-card-more { padding: 0; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--t-navy); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tes-pos-card-more:hover { color: var(--t-navy-dark); }
.tes-pos-card-more.is-hidden { visibility: hidden; }
.tes-pos-card .tes-btn { height: 46px; padding: 0 20px; font-size: 16px; }
.tes-pos-empty { font-size: 16px; color: var(--t-muted); text-align: center; padding: 24px 0; }
@media (max-width: 1024px) { .tes-pos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 640px) {
  .tes-pos-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .tes-pos-card { padding: 18px 18px 16px; gap: 12px; }
  .tes-pos-card-name { font-size: 17px; }
  .tes-pos-card-req { font-size: 14px; }
  .tes-pos-card .tes-btn { height: 44px; font-size: 15px; }
  .tes-pos-count { font-size: 14px; margin-top: -4px; }
}
.tes-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tes-step { display: flex; flex-direction: column; gap: 12px; padding: 26px 28px; }
.tes-step-title { font-size: 19px; font-weight: 700; color: var(--t-ink); }
.tes-search { width: 360px; max-width: 100%; height: 54px; }
.tes-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.tes-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tes-field[hidden] { display: none; }
.tes-input--sm { height: 54px; font-size: 17px; font-weight: 500; }
select.tes-input { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M3 6l5 5 5-5' fill='none' stroke='%231e3a5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
select.tes-input:invalid, select.tes-input.is-empty { color: var(--t-placeholder); }
.tes-input.input-error, .tes-file.input-error { border-color: var(--t-red); box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12); }
.tes-file { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border: 1.5px solid var(--t-line); border-radius: var(--t-radius-sm); background: var(--t-surface); cursor: pointer; transition: border-color 0.15s ease; }
.tes-file:hover { border-color: var(--t-line-strong); }
.tes-file.uploaded { border-color: var(--t-navy); }
.tes-file-label { font-size: 16px; font-weight: 700; color: var(--t-ink); width: 190px; flex-shrink: 0; }
.tes-file-name { flex-grow: 1; font-size: 16px; color: var(--t-placeholder); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tes-file.uploaded .tes-file-name { color: var(--t-navy); font-weight: 600; }
.tes-file-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1.5px solid var(--t-line); border-radius: 8px; background: var(--t-surface); color: var(--t-navy); font-size: 15px; font-weight: 700; white-space: nowrap; }
.tes-file.uploaded .tes-file-btn { border-color: transparent; color: var(--t-muted); font-weight: 600; }
.tes-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid var(--t-line); flex-wrap: wrap; }
.tes-section-title { font-size: 19px; font-weight: 700; color: var(--t-ink); }
.tes-label-opsional { font-weight: 500; color: var(--t-muted); }
/* Formulir lamar: label + keterangan di atas, kotak isian selalu rata bawah dalam satu baris grid. */
.tes-form-grid .tes-field { justify-content: flex-start; }
.tes-form-grid .tes-field > .tes-input, .tes-form-grid .tes-field > .tes-input-rp { margin-top: auto; }
.tes-field--lebar { grid-column: 1 / -1; }
.tes-hint { font-size: 14px; line-height: 1.4; color: var(--t-muted); margin-top: -4px; }
/* Kolom rupiah: awalan "Rp" di dalam kotak isian. */
.tes-input-rp { position: relative; }
.tes-input-rp > span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 17px; font-weight: 600; color: var(--t-muted); pointer-events: none; }
.tes-input-rp .tes-input { padding-left: 50px; }
/* Formulir lamar: blok pengalaman kerja (tidak wajib, sampai 5). */
.tes-pg { border: 1.5px solid var(--t-line); border-radius: var(--t-radius); padding: 18px 20px 20px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tes-pg[hidden] { display: none; }
.tes-pg-kepala { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tes-pg-judul { font-size: 16px; font-weight: 700; color: var(--t-navy); padding: 0; float: left; }
.tes-pg-hapus { font-size: 15px; color: var(--t-red); }
.tes-pg-masih { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--t-muted); cursor: pointer; margin-top: -4px; }
.tes-pg-masih input { width: 18px; height: 18px; accent-color: var(--t-navy); }
.tes-input:disabled { background: var(--t-bg); color: var(--t-placeholder); }
.tes-textarea { height: auto; min-height: 96px; padding: 14px 18px; line-height: 1.5; resize: vertical; }
.tes-steps-list { display: flex; flex-direction: column; gap: 14px; }
.tes-steps-list > div { display: flex; gap: 14px; align-items: flex-start; }
.tes-steps-list .tes-small { padding-top: 4px; font-size: 15px; }
@media (max-width: 900px) {
  .tes-hero { grid-template-columns: 1fr; gap: 24px; }
  .tes-hero-visual { height: 260px; }
  .tes-slide { padding: 20px; }
  .tes-slide-ket { font-size: 18px; padding-bottom: 26px; }
  .tes-slider-dots { left: 20px; bottom: 18px; }
  .tes-panel-merek { padding: 24px; }
  .tes-panel-merek-tag { font-size: 26px; }
  .tes-stats, .tes-steps { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 768px) {
  .tes-nav { gap: 14px; }
  .tes-nav-link { display: none; }
  .tes-btn--nav { height: 40px; padding: 0 14px; font-size: 14px; }
  .tes-main--public { padding: 24px 16px 0; gap: 36px; }
  .tes-main--daftar { padding-top: 24px; gap: 20px; }
  .tes-container--beranda { gap: 36px; }
  .tes-container--daftar { gap: 20px; }
  .tes-lead--lg { font-size: 16px; }
  .tes-h2--section { font-size: 24px; }
  .tes-hero { gap: 20px; }
  .tes-hero-text { gap: 16px; }
  .tes-hero-title { font-size: 31px; line-height: 1.12; }
  /* dua tombol hero sama lebar, bertumpuk */
  .tes-hero-btns { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 4px; }
  .tes-hero-btns .tes-btn { width: 100%; height: 50px; }
  /* tiga angka dalam satu kartu, berdampingan */
  .tes-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); box-shadow: var(--t-shadow); overflow: hidden; }
  .tes-stats .tes-stat { padding: 16px 6px 14px; align-items: center; text-align: center; gap: 2px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
  .tes-stats .tes-stat + .tes-stat { border-left: 1px solid var(--t-line); }
  .tes-stat-num { font-size: 26px; }
  .tes-stat-label { font-size: 12px; line-height: 1.3; }
  /* daftar posisi: nama di kiri, tombol kecil di kanan; kalau ada syarat, tombol turun ke kanan bawah */
  .tes-rows { padding: 2px 16px; }
  .tes-pos-row { gap: 12px; padding: 14px 0; }
  .tes-pos-name { font-size: 17px; }
  .tes-pos-req { font-size: 14px; }
  .tes-pos-row .tes-btn { width: auto; height: 40px; padding: 0 16px; font-size: 15px; flex-shrink: 0; }
  .tes-pos-row.job-card { flex-wrap: wrap; }
  .tes-pos-row.job-card .tes-pos-body { flex-basis: 100%; }
  .tes-pos-row.job-card .tes-btn { margin-left: auto; }
  /* langkah: nomor dan judul sebaris */
  .tes-steps { gap: 10px; }
  .tes-step { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 18px 18px 16px; }
  .tes-step .tes-test-num { width: 28px; height: 28px; font-size: 13px; }
  .tes-step-title { font-size: 17px; }
  .tes-step .tes-step-text { flex-basis: 100%; font-size: 14px; }
  .tes-note--lebar { padding: 18px 18px; }
  .tes-section-top { gap: 6px 16px; }
  .tes-form-grid { grid-template-columns: 1fr; gap: 14px; }
  /* kotak berkas: label dan tombol sebaris, nama berkas di bawahnya */
  .tes-file { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 12px 14px; }
  .tes-file-label { width: auto; grid-column: 1; grid-row: 1; font-size: 15px; }
  .tes-file-btn { grid-column: 2; grid-row: 1; height: 36px; padding: 0 12px; font-size: 14px; }
  .tes-file-name { grid-column: 1 / -1; grid-row: 2; font-size: 14px; white-space: normal; }
  .tes-form-foot { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 18px; }
  .tes-form-foot .tes-small { max-width: none; text-align: center; order: 2; }
  .tes-form-foot .tes-btn { width: 100%; }
  .tes-search { width: 100%; height: 48px; }
  .tes-sukses-card { padding: 26px 20px; }
}

.tes-nowrap { white-space: nowrap; }
.tes-footer-kontak { display: flex; flex-wrap: wrap; gap: 4px 8px; }

/* foto bergantian (beranda + halaman masuk); isi dari _foto_slider.html, gerak dari slider.js */
.tes-hero-visual { height: 460px; }
.tes-login-visual { min-height: 560px; }
.tes-slider { position: relative; overflow: hidden; border-radius: 16px; background: var(--t-tint); touch-action: pan-y; user-select: none; }
.tes-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.9s ease; display: flex; align-items: flex-end; padding: 32px; }
.tes-slide.is-aktif { opacity: 1; }
.tes-slide::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(180deg, rgba(30, 58, 95, 0) 0%, rgba(30, 58, 95, 0.85) 100%); }
.tes-slide-ket { position: relative; font-size: 22px; font-weight: 800; line-height: 1.25; color: #fff; padding-bottom: 30px; text-wrap: balance; }
.tes-slider-dots { position: absolute; left: 32px; bottom: 26px; display: flex; align-items: center; gap: 6px; }
.tes-slider-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: #fff; opacity: 0.5; cursor: pointer; transition: width 0.2s ease, opacity 0.2s ease; }
.tes-slider-dot.is-aktif { width: 22px; opacity: 1; }
.tes-panel-merek { border-radius: 16px; background: var(--t-tint); padding: 36px; display: flex; flex-direction: column; justify-content: space-between; box-sizing: border-box; overflow: hidden; }
.tes-panel-merek-lengkung { display: block; width: 78%; max-width: 360px; height: auto; }
.tes-panel-merek-tag { font-size: 34px; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; color: var(--t-navy); max-width: 10em; text-wrap: balance; }
@media (prefers-reduced-motion: reduce) { .tes-slide { transition: none; } }
/* beranda di layar lebar: foto mengikuti rasio 3:2, papan navy di belakang, keterangan jadi pil kecil */
@media (min-width: 901px) {
  .tes-hero-bingkai { position: relative; padding: 0 16px 16px 0; }
  .tes-hero-bingkai::before { content: ''; position: absolute; top: 16px; left: 16px; right: 0; bottom: 0; border-radius: 16px; background: var(--t-navy); }
  .tes-hero-bingkai .tes-hero-visual { position: relative; height: auto; aspect-ratio: 3 / 2; box-shadow: 0 1px 2px rgba(20, 41, 74, 0.08), 0 14px 34px rgba(20, 41, 74, 0.14); }
  .tes-hero-bingkai .tes-slide { padding: 16px; }
  .tes-hero-bingkai .tes-slide::before { display: none; }
  .tes-hero-bingkai .tes-slide-ket { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--t-navy); font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 0.01em; box-shadow: 0 1px 2px rgba(20, 41, 74, 0.12); }
  .tes-hero-bingkai .tes-slider-dots { left: auto; right: 16px; bottom: 21px; padding: 8px 10px; border-radius: 999px; background: rgba(31, 41, 55, 0.55); }
  .tes-hero-bingkai .tes-slider-dot { width: 6px; height: 6px; opacity: 0.55; }
  .tes-hero-bingkai .tes-slider-dot.is-aktif { width: 18px; opacity: 1; }
  .tes-hero-bingkai .tes-panel-merek { position: relative; }
}

/* ---------- pil waktu mengambang (muncul saat pil di kepala halaman tergulir) ---------- */
.tes-pil-apung { position: fixed; top: 10px; right: 12px; z-index: 40; height: 32px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--t-surface); color: var(--t-navy); border: 1px solid var(--t-line); box-shadow: 0 2px 10px rgba(20, 41, 74, 0.12); opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.tes-pil-apung.is-tampil { opacity: 1; transform: none; }
.tes-pil-apung.is-urgent { background: var(--t-red-soft); color: var(--t-red); border-color: var(--t-red-soft); }
@media (prefers-reduced-motion: reduce) { .tes-pil-apung { transition: none; } }

/* ---------- halaman kesalahan (404, 500) ---------- */
.tes-err { padding: 44px 48px; max-width: 640px; text-align: center; align-items: center; }
.tes-err-code { font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; color: var(--t-navy); opacity: 0.18; }
.tes-err-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (max-width: 640px) {
  .tes-err { padding: 32px 24px; }
  .tes-err-code { font-size: 56px; }
}

/* ---------- papan kotret (tes matematika, layar lebar saja) ---------- */
.tes-container--kotret { max-width: 800px; }
.tes-math-layout { display: block; }
.tes-kotret { display: none; }
@media (min-width: 1024px) {
  .tes-container--kotret { max-width: 1180px; }
  .tes-math-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
  .tes-kotret { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 24px; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); box-shadow: var(--t-shadow); padding: 18px 18px 16px; }
  .tes-kotret-head { display: flex; flex-direction: column; gap: 10px; }
  .tes-kotret-tools { display: flex; gap: 8px; flex-wrap: wrap; }
  .tes-kotret-btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--t-line); background: var(--t-surface); color: var(--t-navy); font-size: 14px; font-weight: 700; cursor: pointer; }
  .tes-kotret-btn.is-on { background: var(--t-navy); border-color: var(--t-navy); color: #fff; }
  .tes-kotret-kanvas { display: block; width: 100%; height: clamp(280px, calc(100vh - 300px), 520px); border: 1.5px solid var(--t-line); border-radius: 10px; background-color: #fff; background-image: linear-gradient(var(--t-bg) 1px, transparent 1px), linear-gradient(90deg, var(--t-bg) 1px, transparent 1px); background-size: 24px 24px; cursor: crosshair; touch-action: none; }
  .tes-kotret-kanvas.is-hapus { cursor: cell; }
}

/* Status simpan otomatis di bilah bawah tes. */
.tes-autosave { font-size: 13px; color: var(--t-muted); }
.tes-autosave.is-ok { color: var(--t-green, #2c6e3f); }
.tes-autosave.is-gagal { color: var(--t-red); }
@media (max-width: 640px) { .tes-autosave { display: none; } }

/* ---------- footer halaman publik (beranda, lowongan, lamar) ---------- */
/* Footer publik: latar krem sedikit lebih gelap
   dari halaman, garis navy tipis di atas, teks gelap. Versi navy gelap sebelumnya dicabut karena terasa berat. */
.tes-footer-publik { margin-top: 72px; background: var(--t-footer-bg); border-top: 3px solid var(--t-navy); color: var(--t-ink); font-size: 15px; line-height: 1.6; flex-shrink: 0; }
.tes-footer-inner { max-width: 1152px; margin: 0 auto; padding: 40px 32px 26px; }
.tes-footer-grid { display: grid; grid-template-columns: 1.3fr 1.1fr 1fr 0.7fr; gap: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--t-footer-line); }
.tes-footer-brand, .tes-footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.tes-footer-brand-top { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.tes-footer-logo { display: inline-flex; }
.tes-footer-logo img { height: 40px; width: auto; }
.tes-footer-name { font-size: 17px; font-weight: 800; color: var(--t-ink); letter-spacing: -0.01em; }
.tes-footer-desc { max-width: 34em; color: var(--t-muted); text-wrap: pretty; }
.tes-footer-web { color: var(--t-navy); font-weight: 700; }
.tes-footer-head { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 2px; }
.tes-footer-addr { font-style: normal; color: var(--t-ink); line-height: 1.5; }
.tes-footer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tes-footer-link { color: var(--t-navy); font-weight: 600; }
.tes-footer-link:hover, .tes-footer-web:hover, .tes-footer-bottom a:hover { color: var(--t-navy-dark); text-decoration: underline; text-underline-offset: 3px; }
.tes-footer-link--icon { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.tes-footer-link--icon svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tes-footer-note { font-size: 13px; color: var(--t-muted); max-width: 24em; text-wrap: pretty; padding-top: 2px; }
.tes-footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px 32px; flex-wrap: wrap; padding-top: 18px; font-size: 14px; color: var(--t-muted); }
.tes-footer-bottom a { color: var(--t-navy); font-weight: 600; }
@media (max-width: 900px) {
  .tes-footer-publik { margin-top: 56px; }
  .tes-footer-inner { padding: 32px 32px 22px; }
  .tes-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .tes-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  /* HP: satu kolom berurutan merek, Hubungi HR, Alamat, Rekrutmen; kontak dan tautan jadi pil putih yang gampang ditekan */
  .tes-footer-publik { margin-top: 40px; font-size: 15px; }
  .tes-footer-inner { padding: 26px 16px 20px; }
  .tes-footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 0; border-bottom: 0; }
  .tes-footer-col { padding: 18px 0; border-top: 1px solid var(--t-footer-line); gap: 10px; }
  .tes-footer-brand { padding-bottom: 18px; gap: 8px; }
  .tes-footer-brand { order: 0; }
  .tes-footer-col--kontak { order: 1; }
  .tes-footer-col--alamat { order: 2; }
  .tes-footer-col--rekrutmen { order: 3; }
  .tes-footer-logo img { height: 34px; }
  .tes-footer-name { font-size: 16px; }
  .tes-footer-desc { font-size: 14px; }
  .tes-footer-list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .tes-footer-col--kontak .tes-footer-link--icon, .tes-footer-col--alamat .tes-footer-link--icon, .tes-footer-col--rekrutmen .tes-footer-link {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border-radius: 999px;
    background: var(--t-surface); border: 1px solid var(--t-line); font-size: 14px; font-weight: 600; line-height: 1.2; }
  .tes-footer-col--kontak .tes-footer-link--icon:hover, .tes-footer-col--alamat .tes-footer-link--icon:hover, .tes-footer-col--rekrutmen .tes-footer-link:hover { border-color: var(--t-navy); text-decoration: none; }
  .tes-footer-link--icon svg { width: 16px; height: 16px; }
  .tes-footer-addr { font-size: 15px; }
  .tes-footer-col--alamat .tes-footer-link--icon { margin-top: 2px; }
  .tes-footer-col--rekrutmen .tes-footer-note { display: none; } /* sudah ada di baris bawah dan di halaman */
  .tes-footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 16px; border-top: 1px solid var(--t-footer-line); font-size: 13px; }
}

/* Kolom jebakan bot di formulir lamar (apply.html): di luar layar, bukan display:none supaya bot polos tetap mengisinya. */
.tes-jebakan{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
