/* SKDulu — "Ruang Ujian" direction (approved 2026-11-25), recolored +
   respaced 2026-11-25 from the WaroengPay dashboard reference
   (docs/design-references/waroengpay-dashboard.md): blue primary #2451c7,
   page #f6f7f9, cards white / border #dde2ea, 1240px centered wrapper,
   220px left sidebar. Paper + ink: the exam hall, not a startup template.
   Headings in the system sans, every figure in mono with tabular numbers,
   like a real answer sheet. One accent (blue), used rarely. Solid colors
   only: no transparent RGB, no gradients — with one deliberate
   exception: the hero scrims (home / tryouts / drill) use a light
   linear-gradient scrim so the text stays legible over the photo.
   Buttons use normal rounded corners. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #10141c;
  --ink-2: #556072;
  --muted: #646c7a;
  --muted-2: #646c7a; /* was #767e8e (3.81:1 on bg) — darkened to pass WCAG AA 4.5:1 on white (5.29:1) and bg (4.94:1) */
  --stabilo: #ffe066; /* yellow highlighter for inline quoted terms (.q-quote) */
  --border: #dde2ea;
  --accent: #2451c7;
  --accent-dark: #1e40a8;
  --accent-soft: #e3eafb;
  --accent-soft-border: #c3d2f2;
  --pass: #127a45;
  --pass-soft: #e2f2e8;
  --fail: #b42f2b;
  --fail-soft: #fdecea;
  --doubt: #b45309;
  --doubt-soft: #fdf0d9;
  --chip-bg: #eef1f6;
  --bar-bg: #eef1f6;
  --radius: 6px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5rem; font-weight: 600; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.35rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.45; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0; padding: 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.note {
  font-size: 0.85rem; color: var(--muted);
  border-left: 3px solid var(--border); padding-left: 0.75rem; margin: 0.75rem 0 0;
}
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* App shell: full-width flex. Sidebar 220px nempel di pojok kiri layar
   (x=0), konten langsung di sebelahnya tanpa gap. */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Sidebar — 220px, panel putih dengan garis kanan, nempel di pojok kiri
   layar (full height, sticky). Baris aktif biru muda. */
.sidebar {
  width: 220px; flex: none; background: var(--surface);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh;
  padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem;
}
.sidebar-brand { padding: 0 0.75rem; margin: 0 0 0.25rem; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0.75rem; border-radius: 6px;
  color: var(--muted-2); text-decoration: none; font-weight: 600;
}
.sidebar-nav a svg { flex: none; width: 18px; height: 18px; }
.sidebar-nav a:hover { background: var(--chip-bg); color: var(--ink); }
.sidebar-nav a.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { margin-top: auto; font-size: 0.85rem; color: var(--muted); }
.sidebar-foot p { margin: 0 0 0.25rem; }
.sidebar .sidebar-close { display: none; }

/* Info rail — panel kanan 320px, hanya layar lebar (>=1600px). Isi ringkas
   info ASN/CPNS (sumber: situs info), bukan duplikat: tiap kartu link ke
   situs info untuk detail. Sticky full height, seperti sidebar kiri.
   Di bawah 1600px disembunyikan — layout lama tidak berubah. */
.info-rail { display: none; }
@media (min-width: 1600px) {
  .info-rail {
    display: block; width: 320px; flex: none; background: var(--surface);
    border-left: 1px solid var(--border);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 1.25rem 1.25rem;
  }
  .info-rail-label {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--muted);
    padding: 0 0.25rem; margin: 0 0 1rem;
  }
  .info-rail-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem; margin-bottom: 1rem; font-size: 0.92rem;
  }
  .info-rail-card h2 { font-size: 1.05rem; margin-bottom: 0.5rem; }
  .info-rail-card p:last-child { margin-bottom: 0; }
  .info-rail-list { list-style: none; margin: 0 0 0.5rem; padding: 0; }
  .info-rail-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
  .info-rail-list li:last-child { border-bottom: none; }
  .info-rail-list li span { font-family: var(--mono); font-size: 0.85rem; margin-right: 0.5rem; }
  .info-rail-list li em { color: var(--muted); font-style: normal; font-size: 0.85rem; }
}

/* Header / footer */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.site-header-inner { display: flex; justify-content: flex-end; align-items: center; height: 56px; }
.menu-btn { display: none; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 0.5rem 1rem; font-weight: 600; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 1.125rem; color: var(--ink); text-decoration: none; }
.brand-logo { width: 36px; height: 36px; border-radius: 10px; display: block; }
.brand-accent { color: var(--accent); font-weight: 400; }
.profile-btn {
  display: block; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface); padding: 0; flex: none;
  cursor: pointer;
}
.profile-btn img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Dropdown profil di navbar: tombol bulat kanan atas membuka menu.
   Menu menempel di bawah tombol, rata kanan, menutupi konten di bawah
   header (bukan sidebar). */
.profile-menu-wrap { position: relative; }
.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 20, 28, 0.12); padding: 0.5rem; z-index: 60;
}
.profile-menu a, .profile-menu button {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.5rem 0.75rem; border-radius: 8px; color: var(--ink); text-decoration: none;
  background: none; border: 0; font: inherit; font-size: 0.95rem; cursor: pointer; text-align: left; white-space: nowrap;
}
.profile-menu a:hover, .profile-menu button:hover { background: var(--chip-bg); }
.profile-menu svg { flex: none; width: 18px; height: 18px; }
/* display:flex di atas mengalahkan display:none bawaan atribut hidden,
   jadi tegaskan di sini — kalau tidak, Keluar dan Masuk tampil
   bersamaan. */
.profile-menu [hidden] { display: none !important; }
.profile-menu-divider { height: 1px; background: var(--border); margin: 0.5rem 0.25rem; }
.profile-menu-logout { color: var(--fail); }
.site-footer { margin-top: 3rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
main { padding-top: 1.5rem; min-height: 60vh; }

/* Buttons */
.btn {
  display: inline-block; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); border-radius: 10px; padding: 0.5rem 1rem;
  font-weight: 600; text-decoration: none; text-align: center;
}
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: var(--surface); }
.btn-large { padding: 0.75rem 1.25rem; font-size: 1.05rem; }
.btn-small { padding: 0.25rem 0.75rem; font-size: 0.9rem; }
.btn-danger { background: var(--fail); border-color: var(--fail); color: #ffffff; }
.btn-doubtful-active { background: var(--doubt-soft); border-color: var(--doubt); color: var(--doubt); }

/* Cards and home */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
/* MF-11 Tahap 3: loading skeleton — pulsing grey bars where the content
   will be, so a loading route never looks like a broken blank page. */
.loading-skeleton { padding: 1.5rem 0; max-width: 720px; }
.skel { height: 1rem; border-radius: 6px; background: var(--border); margin-bottom: 0.75rem; animation: skel-pulse 1.2s ease-in-out infinite; }
.skel-title { height: 1.9rem; width: 55%; }
.skel-line { width: 100%; }
.skel-short { width: 70%; }
@keyframes skel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
/* Exam card (home hero): the "kartu ujian". Ink border, mono form label,
   mono data rows with hairlines — a printed exam card, not a marketing hero. */
.exam-card { background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.exam-card-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.mono-label { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2); }
.exam-card h1 { font-size: 1.9rem; margin-bottom: 0.25rem; }
.exam-card .lede { margin-bottom: 1rem; }
.exam-card-rows { margin: 0 0 1.25rem; }
.exam-card-rows div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.exam-card-rows div:last-child { border-bottom: 0; }
.exam-card-rows dt { font-weight: 600; }
.exam-card-rows dd { margin: 0; font-family: var(--mono); font-size: 0.95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.exam-card-rows div.total { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 600; }
.exam-card-rows div.total dd { font-weight: 600; }
.exam-card .hero-actions { margin: 0; }

.hero { padding: 2rem 0 1.5rem; }
.hero h1 { font-size: 2.6rem; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.25rem 0 1.75rem; }
.bank-stats { display: flex; gap: 2rem; flex-wrap: wrap; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--border); }
.bank-stats div { min-width: 4.5rem; }
.bank-stats dt { font-size: 0.8rem; color: var(--muted); }
.bank-stats dd { margin: 0; font-size: 1.75rem; font-weight: 500; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.resume-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--accent-soft); border-color: var(--accent-soft-border); }
.score-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.score-table th, .score-table td { text-align: left; padding: 0.5rem 0.5rem 0.5rem 0; border-bottom: 1px solid var(--border); }
.score-table th { color: var(--muted); font-size: 0.8rem; }

.history-list { list-style: none; margin: 0; padding: 0; }
.history-list li { border-bottom: 1px solid var(--border); }
.history-list li:last-child { border-bottom: 0; }
.history-list a { display: flex; gap: 1rem; align-items: center; padding: 0.75rem 0; color: var(--ink); text-decoration: none; flex-wrap: wrap; }
.history-list a:hover .history-title { color: var(--accent); }
.history-title { font-weight: 600; flex: 1; min-width: 12rem; }
.history-meta { color: var(--muted); font-size: 0.9rem; }

.chip { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.5rem; border-radius: 999px; background: var(--chip-bg); color: var(--ink); }
.chip-pass { background: var(--pass-soft); color: var(--pass); }
.chip-fail { background: var(--fail-soft); color: var(--fail); }
.chip-amber { background: #fdf0d9; color: #92400e; }

/* Tabs and topics */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tab { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 0.5rem 1rem; font-weight: 600; color: var(--muted); }
.tab-active { background: var(--ink); border-color: var(--ink); color: #ffffff; }

.page-head { margin-bottom: 1.25rem; }
.back-link { display: inline-block; margin-bottom: 0.75rem; text-decoration: none; font-weight: 600; }

/* Profile */
.profile-head { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; border: 1px solid var(--border); flex: none; }
.profile-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Exam */
.exam-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin-bottom: 1rem; position: sticky; top: 66px; z-index: 15;
}
/* Thin answered-progress bar, inside the sticky exam bar so it stays
   visible while the user scrolls through a long question. */
.exam-progress-bar { flex: 1 1 100%; height: 4px; background: var(--bar-bg); border-radius: 999px; overflow: hidden; }
.exam-progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.2s ease; }
.exam-title { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.exam-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-status { display: flex; align-items: center; gap: 1rem; }
#exam-progress { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }
.timer { font-family: var(--mono); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.timer-low { color: var(--fail); }

.exam-body { display: grid; grid-template-columns: 250px 1fr; gap: 1rem; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; position: sticky; top: 140px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 0.5rem; }
#panel-close { display: none; }
.panel-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.75rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 0.3rem; vertical-align: -1px; }
.dot-answered { background: var(--pass); }
.dot-doubtful { background: var(--doubt); }
.dot-empty { background: var(--surface); border: 1px solid var(--muted); }
.panel-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.panel-num { aspect-ratio: 1; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; font-size: 0.9rem; font-weight: 600; padding: 0; }
.panel-num.is-answered { background: var(--pass-soft); border-color: var(--pass); color: var(--pass); }
.panel-num.is-doubtful { border: 2px solid var(--doubt); color: var(--doubt); }
.panel-num.is-current { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.panel-toggle { display: none; position: fixed; right: 1rem; bottom: 1rem; z-index: 25; }

.question-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.q-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.q-stem { font-size: 1.15rem; line-height: 1.7; margin-bottom: 1.25rem; }
/* Quoted material inside a question: a full quoted sentence is a labelled
   "Kutipan" card (serif); an inline quoted term gets a yellow stabilo. */
.q-blockquote {
  margin: 0 0 0.75rem; padding: 0.9rem 1.1rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; line-height: 1.6;
}
.q-blockquote::before {
  content: "Kutipan"; display: block;
  font-family: ui-monospace, monospace; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.5rem;
}
.q-blockquote:last-child { margin-bottom: 0; }
.q-quote {
  background: var(--stabilo); font-weight: 700; padding: 0 0.2rem; border-radius: 3px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.q-stem p, .explanation p { margin: 0 0 0.5rem; }
.q-stem p:last-child, .explanation p:last-child { margin-bottom: 0; }
.rich-table { border-collapse: collapse; width: 100%; margin: 0.5rem 0 0.75rem; font-size: 0.95rem; }
.rich-table th, .rich-table td { border: 1px solid var(--border); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.rich-table th { background: var(--chip-bg); font-weight: 600; }
.options { display: grid; gap: 0.5rem; }
.option {
  display: flex; gap: 0.8rem; align-items: flex-start; text-align: left; width: 100%;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 0.9rem 1rem;
}
.option:hover { border-color: var(--ink); background: var(--chip-bg); }
.option-label { flex: none; width: 1.7rem; height: 1.7rem; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 0.9rem; }
.option-text { flex: 1; padding-top: 0.2rem; line-height: 1.55; }
.option-tag { flex: none; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 0.3rem; }
.option.is-chosen { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.option.is-chosen .option-label { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.option.is-answer { border-color: var(--pass); background: var(--pass-soft); }
.option.is-answer .option-label { background: var(--pass); border-color: var(--pass); color: #ffffff; }
.option.is-wrong-choice { border-color: var(--fail); background: var(--fail-soft); }
.option.is-wrong-choice .option-label { background: var(--fail); border-color: var(--fail); color: #ffffff; }
.q-actions { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Results */
.result-hero { text-align: center; padding: 2rem 1.5rem; }
.result-total { margin-bottom: 0.5rem; }
.result-number { font-family: var(--mono); font-size: 3.5rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.result-of { color: var(--muted); font-size: 1.125rem; }
.result-verdict { font-size: 1.125rem; font-weight: 600; margin-bottom: 1.25rem; }
.verdict-pass { color: var(--pass); }
.verdict-fail { color: var(--fail); }
.result-hero .row { justify-content: center; }
.score-row { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.score-row:last-of-type { border-bottom: 0; }
.score-head { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.5rem; }
.score-head strong { flex: 1; }
.bar { position: relative; height: 10px; background: var(--bar-bg); border-radius: 999px; overflow: visible; }
.bar-fill { height: 100%; border-radius: 999px; }
.bar-pass { background: var(--pass); }
.bar-fail { background: var(--fail); }
.bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }

/* Review */
.review-item { margin-bottom: 1rem; }
.review-correct { border-left: 4px solid var(--pass); }
.review-wrong { border-left: 4px solid var(--fail); }
.explanation { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.explanation summary { font-weight: 700; cursor: pointer; }
.explanation p { white-space: pre-line; margin-top: 0.5rem; color: var(--ink); }

/* Structured "Pembahasan Soal" sections inside .explanation. */
.exp-heading { font-size: 1rem; margin: 1rem 0 0.25rem; }
.exp-heading:first-of-type { margin-top: 0.5rem; }
.exp-answer-head, .exp-option-head { font-weight: 700; margin: 0.25rem 0 0.5rem; }
.exp-option { margin-bottom: 0.75rem; }
.exp-option:last-child { margin-bottom: 0; }
.exp-drill { margin-top: 1rem; }

/* Weak-topic rows on the results page. */
.weak-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.weak-row:last-of-type { border-bottom: 0; }
.weak-head { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.weak-head .btn, .weak-row .btn { flex: none; }

/* Tryout catalog */
.tryout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.tryout-card { margin-bottom: 0; display: flex; flex-direction: column; }
.tryout-card h2 { margin-bottom: 0.25rem; }
.tryout-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.tryout-crown { display: block; width: 22px; height: 22px; flex: none; }
.tryout-meta { color: var(--muted); margin-bottom: 0.25rem; }
.tryout-price { font-weight: 700; margin-bottom: 0.25rem; }
.tryout-action { margin-top: auto; padding-top: 1rem; }
.tryout-action .btn { width: 100%; }
.tryout-locked { background: var(--chip-bg); }

/* Tryouts hero — photo as background, text from code on the left.
   The photo's left half is clean light blue-grey; the person + laptop
   sit on the right. No scrim: dark ink on the light area reads cleanly
   (verified in screenshots). Anchored top-right so the person's head is
   never clipped by the cover crop. */
.tryouts-hero {
  background-image:
    linear-gradient(to right, rgba(246, 247, 249, 0.94) 0%, rgba(246, 247, 249, 0.82) 55%, rgba(246, 247, 249, 0) 86%),
    url("../img/tryouts-hero.jpg");
  background-size: cover;
  background-position: right top;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  min-height: 20rem;
  display: flex;
  align-items: center;
}
.tryouts-hero-text { max-width: 32rem; padding: 2rem; }
.tryouts-hero-text .mono-label { margin-bottom: 0.5rem; }
.tryouts-hero h1 { margin-bottom: 0.5rem; }
.tryouts-hero-sub { color: var(--ink-2); margin-bottom: 1rem; }

/* Drill hero — same model as the tryouts hero: full photo background,
   light scrim on the left so the text reads, photo on the right. */
.drill-hero {
  background-image:
    linear-gradient(to right, rgba(246, 247, 249, 0.94) 0%, rgba(246, 247, 249, 0.82) 55%, rgba(246, 247, 249, 0) 86%),
    url("../img/drill-hero.jpg");
  background-size: cover;
  background-position: right top;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  min-height: 20rem;
  display: flex;
  align-items: center;
}
.drill-hero-text { max-width: 32rem; padding: 2rem; }
.drill-hero-text .mono-label { margin-bottom: 0.5rem; }
.drill-hero h1 { margin-bottom: 0.5rem; }
.drill-hero-sub { color: var(--ink-2); margin-bottom: 1rem; }

/* Home hero — same model as the tryouts/drill heroes: full photo
   background, light scrim on the left so the text reads, photo on the
   right. The exam breakdown (TWK/TIU/TKP rows) sits on the hero now,
   instead of inside a bordered exam card. The background is a slideshow:
   three photo layers crossfade (text and CTA stay put); the scrim is a
   ::before overlay so it stays above every slide. */
.home-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  min-height: 20rem;
  display: flex;
  align-items: center;
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(246, 247, 249, 0.94) 0%, rgba(246, 247, 249, 0.82) 55%, rgba(246, 247, 249, 0) 86%);
  z-index: 1;
}
.home-hero-slides { position: absolute; inset: 0; pointer-events: none; }
.home-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.home-hero-slide.is-active { opacity: 1; }
.home-hero-text { position: relative; z-index: 2; max-width: 32rem; padding: 2rem; }
/* Bank stats live inside the hero now, as a vertical card on the right
   (over the photo), not a strip below it. */
.home-hero .bank-stats {
  position: relative; z-index: 2;
  margin-left: auto; margin-right: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  border-top: 0;
}
.home-hero .bank-stats dd { font-size: 1.5rem; }
.home-hero-text .mono-label { margin-bottom: 0.5rem; }
.home-hero h1 { margin-bottom: 0.5rem; }
.home-hero .lede { color: var(--ink-2); margin-bottom: 1rem; min-height: 3rem; transition: opacity 0.4s ease; }
.home-hero .lede.lede-fading { opacity: 0; }
.home-hero .exam-card-rows { margin-bottom: 1rem; }
.home-hero .hero-actions { margin: 0 0 0.75rem; }
.home-hero #free-quota { margin: 0; }

/* FAQ accordion — native <details>, no JS. Same summary treatment as
   .explanation and .qr-how. */
.faq { display: grid; gap: 0.75rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; }
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; font-weight: 500; color: var(--muted); }
.faq-item[open ] summary::after { content: "–"; }
.faq-item p { margin: 0.5rem 0 0; color: var(--ink-2); }

/* Score cards — visual replacement for the scoring table: one card per
   subtest, big threshold number + a bar of threshold vs max points. */
.score-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.score-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.score-card-threshold { margin: 0.5rem 0 0.75rem; }
.score-card-num { font-size: 2.25rem; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; line-height: 1; }
.score-card-max { color: var(--muted); font-family: var(--mono); font-variant-numeric: tabular-nums; }
.score-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-bottom: 0.75rem; }
.score-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.score-card-meta { margin: 0; color: var(--ink-2); font-size: 0.9rem; }

/* Feature cards — "Kenapa SKDulu": icon + title + one line each. */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.feature-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.feature-card img { display: block; margin-bottom: 0.75rem; }
.feature-card h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.feature-card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* Steps — "Cara mulai": numbered answer-bubble circles (Ruang Ujian
   motif), one column per step. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 1.25rem; font-weight: 600; font-family: var(--mono);
  margin-bottom: 0.75rem;
}
.step h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.step p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* No-subscription banner — the main marketing message: buy when needed,
   no monthly fee. Light blue panel so it stands out from the white cards. */
.no-sub-banner {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.no-sub-banner h2 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.no-sub-banner p { color: var(--ink-2); margin-bottom: 1rem; max-width: 42rem; }

/* Pricing hero — the main marketing message leads the pricing page.
   Two columns on desktop: text left, exam-objects illustration right. */
.pricing-hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2rem; align-items: center; }
.pricing-hero .mono-label { display: block; margin-bottom: 0.5rem; }
.pricing-hero h1 { font-size: 2.1rem; margin-bottom: 0.5rem; }
.pricing-hero .lede { max-width: 42rem; }
.pricing-hero-img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: var(--radius); }

/* Tier cards — paid tryouts grouped by price (Tryout 2–5 Rp2.000,
   Tryout 6–10 Rp4.000), each card linking to its tryouts. */
.tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.tier-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.tier-price { margin: 0.5rem 0 0.25rem; }
.tier-amount { font-size: 2rem; font-weight: 600; font-family: var(--mono); font-variant-numeric: tabular-nums; line-height: 1; }
.tier-per { color: var(--muted); }
.tier-meta { color: var(--ink-2); font-size: 0.9rem; margin: 0 0 0.75rem; }
.tier-tryouts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tier-tryouts a {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 0.25rem 0.75rem; font-size: 0.9rem; color: var(--ink);
}
.tier-tryouts a:hover { border-color: var(--accent); color: var(--accent); }

/* Drill topic grid — same model as the tryout grid: 2 columns by
   default, 3 on desktop, 1 on mobile. Every card is free. */
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.topic-card { margin-bottom: 0; display: flex; flex-direction: column; }
.topic-card h2 { margin-bottom: 0.25rem; }
.topic-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.topic-meta { color: var(--muted); margin-bottom: 0.25rem; }
.topic-action { margin-top: auto; padding-top: 1rem; }
.topic-action .btn { width: 100%; }
/* Checkout / purchase — "Ruang Ujian" receipt + stepper.
   The receipt is a printed document (ink border, mono labels, hairline
   rows, one big total), like the exam card on the home page. The stepper
   reuses the answer-sheet bubble as its node: number, then a check. */
.receipt-card { border: 1.5px solid var(--ink); }
.receipt-rows { margin: 0 0 1rem; }
.receipt-rows div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--border);
}
.receipt-rows div:last-child { border-bottom: 0; }
.receipt-rows dt {
  font-family: var(--mono); font-size: 0.78rem; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: 0.02em;
}
.receipt-rows dd { margin: 0; font-weight: 600; text-align: right; }
.receipt-rows div.total { border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 1rem; }
.receipt-rows div.total dd { display: flex; align-items: center; gap: 0.5rem; }
.receipt-total-figure {
  font-family: var(--mono); font-size: 1.75rem; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}

/* Stepper: numbered answer-bubbles on a line. Current = accent fill,
   done = pass fill with a check, upcoming = muted. */
.stepper { display: flex; list-style: none; margin: 0 0 1.25rem; padding: 0; }
.stepper li {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 0.5rem; position: relative; text-align: center; min-width: 0;
}
.stepper li::before {
  content: ""; position: absolute; top: 13px;
  left: calc(-50% + 14px); right: calc(50% + 14px);
  height: 2px; background: var(--border);
}
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--pass); }
.stepper-num {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.85rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--chip-bg); color: var(--muted); border: 1px solid var(--border);
  position: relative; z-index: 1;
}
.stepper li.is-current .stepper-num { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.stepper li.is-done .stepper-num { background: var(--pass); border-color: var(--pass); color: #ffffff; }
.stepper-label { font-size: 0.78rem; line-height: 1.3; color: var(--muted); }
.stepper li.is-current .stepper-label { color: var(--ink); font-weight: 600; }
.stepper li.is-done .stepper-label { color: var(--ink-2); }

/* Amount to pay: the one number that matters after the invoice exists.
   Accent-soft panel, big mono figure in accent. */
.pay-amount {
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.pay-amount .mono-label { margin-bottom: 0; }
.pay-amount-figure {
  font-family: var(--mono); font-size: 2rem; font-weight: 600; color: var(--accent);
  font-variant-numeric: tabular-nums; line-height: 1.1; margin: 0.25rem 0 0.5rem;
}
.pay-amount p.muted { margin-bottom: 0; }

/* Status line: the live state of the payment, quiet but visible. */
.checkout-status {
  background: var(--chip-bg); border-radius: var(--radius);
  padding: 0.75rem 1rem; font-size: 0.9rem; margin: 0 0 1rem;
}

/* Payment card header: title + QRIS badge. */
.pay-card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pay-card-head h2 { margin-bottom: 0; }
.pay-card-head img { flex: none; width: 56px; height: 56px; }

/* Checkout layout: two columns on desktop, stacked on mobile.
   Left (wider) = the payment flow; right (narrower) = illustration +
   order summary. On mobile the summary comes first, like before
   (illustration -> receipt -> payment). */
.checkout-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.checkout-main { min-width: 0; }
.checkout-side {
  order: -1; min-width: 0;
  display: flex; flex-direction: column; gap: 1.25rem;
}
@media (min-width: 1024px) {
  .checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    align-items: start;
  }
  .checkout-side { order: 0; }
  .tryout-grid { grid-template-columns: 1fr 1fr 1fr; }
  .topic-grid { grid-template-columns: 1fr 1fr 1fr; }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Checkout illustration: small flat hero in the summary column. */
.pay-illustration { display: block; width: min(100%, 340px); height: auto; margin: 0 auto; }

/* Stepper label: custom icon + text, centered under the bubble. */
.stepper-label { display: flex; align-items: center; justify-content: center; gap: 0.3rem; }
.stepper-label img { flex: none; width: 18px; height: 18px; }

/* Trust strip: the three payment-safety facts as short items with
   custom icons. */
.trust-strip {
  list-style: none; margin: 1rem 0 0; padding: 1rem 0 0;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.trust-strip li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.85rem; color: var(--ink-2); }
.trust-icon { flex: none; width: 20px; height: 20px; margin-top: 1px; }

/* QRIS popup: the payment lives inside the app. Fixed overlay, the
   card is a receipt (ink border, big mono amount, white QR on white).
   Closing it never stops the 5s status polling. */
.qr-modal[hidden] { display: none; }
.qr-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.qr-modal-backdrop { position: absolute; inset: 0; background: rgb(16 20 28 / 0.55); }
.qr-modal-card {
  position: relative; background: var(--surface); border: 1.5px solid var(--ink);
  border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem;
  width: min(100%, 420px); max-height: calc(100dvh - 2rem); overflow-y: auto;
  text-align: center;
}
.qr-modal-close {
  position: absolute; top: 0.5rem; right: 0.75rem;
  background: none; border: 0; padding: 0.25rem 0.5rem; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--muted);
}
.qr-modal-close:hover { color: var(--ink); }
.qr-modal-amount { font-size: 0.95rem; margin: 0.5rem 0 0; }
.qr-modal-amount .pay-amount-figure { display: block; margin-top: 0.25rem; }
.qr-modal-timer { margin: 0.5rem 0 0; }
.qr-modal-qr { margin: 1rem auto 0.75rem; width: fit-content; }
.qr-modal-qr-img { display: block; width: 100%; max-width: 240px; height: auto; background: #ffffff; padding: 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); }
.qr-modal-card p.muted { margin: 0.5rem 0; }
.qr-methods {
  list-style: none; margin: 0.75rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem;
}
.qr-methods li {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.25rem 0.6rem; font-size: 0.8rem; font-weight: 600; color: var(--ink-2);
  background: var(--chip-bg);
}
.qr-how { margin: 0.75rem 0; text-align: left; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; }
.qr-how summary { cursor: pointer; font-weight: 600; }
.qr-how ol { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.qr-how li { margin-bottom: 0.25rem; font-size: 0.9rem; }
.qr-modal-actions { justify-content: center; margin-top: 0.75rem; }

/* Popup login Google: pola yang sama dengan popup QRIS (overlay tetap,
   kartu putih di tengah, tutup lewat × / backdrop / Esc). Muncul
   sebelum checkout tryout berbayar kalau pengguna belum login. */
.login-modal[hidden] { display: none; }
.login-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1rem; }
.login-modal-backdrop { position: absolute; inset: 0; background: rgb(16 20 28 / 0.55); }
.login-modal-card {
  position: relative; background: var(--surface); border: 1.5px solid var(--ink);
  border-radius: var(--radius); padding: 1.5rem 1.25rem 1.25rem;
  width: min(100%, 420px); max-height: calc(100dvh - 2rem); overflow-y: auto;
  text-align: center;
}
.login-modal-close {
  position: absolute; top: 0.5rem; right: 0.75rem;
  background: none; border: 0; padding: 0.25rem 0.5rem; cursor: pointer;
  font-size: 1.5rem; line-height: 1; color: var(--muted);
}
.login-modal-close:hover { color: var(--ink); }
.login-modal-title { margin-bottom: 0.5rem; }
.login-modal-message { color: var(--ink-2); margin-bottom: 1rem; }
.login-modal-card .google-btn { width: 100%; margin-bottom: 0.5rem; }
.login-modal-card p.muted { margin: 0.5rem 0; }
.login-modal-info { text-align: center; }

/* Tombol "Masuk dengan Google" gaya resmi Google: putih, logo G
   empat warna di kiri, teks gelap. Dipakai popup login dan halaman
   profil supaya tampilannya sama. */
.google-btn {
  background: #ffffff; border: 1px solid var(--border); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-weight: 600;
}
.google-btn:hover { background: var(--chip-bg); border-color: var(--border); }
.google-btn:disabled { opacity: 0.6; cursor: default; }
.google-g { flex: none; display: inline-flex; }
.google-g svg { display: block; }

/* Checkout actions: primary first, full-width stacked on mobile. */
.checkout-actions { gap: 0.75rem; }

/* Pricing: the paid list speaks the same receipt language as checkout.
   Big mono price hero, then rows with the amount right-aligned in mono. */
.price-hero { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.price-hero .mono-label { margin-bottom: 0; }
.price-hero-figure {
  font-family: var(--mono); font-size: 1.75rem; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.1;
  margin: 0.25rem 0 0.5rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.price-hero p.muted { margin-bottom: 0; }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { border-bottom: 1px solid var(--border); }
.price-list li:last-child { border-bottom: 0; }
.price-list a { display: block; padding: 0.75rem 0; color: var(--ink); text-decoration: none; }
.price-list a:hover .price-row-title { color: var(--accent); }
.price-row-main { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.price-row-title { font-weight: 600; }
.price-row-amount {
  font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-row-meta { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

@media (max-width: 860px) {
  h1 { font-size: 1.8rem; }
  .hero h1 { font-size: 2.1rem; }
  .menu-btn { display: inline-block; }
  .site-header-inner { justify-content: space-between; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-right: 1px solid var(--border);
    transform: translateX(-105%); transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    height: 100dvh;
  }
  .sidebar.sidebar-open { transform: translateX(0); }
  .sidebar .sidebar-close { display: inline-block; }
  .exam-body { grid-template-columns: 1fr; }
  .tryout-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .score-cards { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .pricing-hero { grid-template-columns: 1fr; gap: 1rem; }
  .tryouts-hero { min-height: 28rem; background-position: 90% top; align-items: flex-end; }
  .tryouts-hero-text { max-width: none; width: 100%; margin: 1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .drill-hero { min-height: 28rem; background-position: 90% top; align-items: flex-end; }
  .drill-hero-text { max-width: none; width: 100%; margin: 1rem; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .home-hero { min-height: 28rem; background-position: 90% top; flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .home-hero-text { max-width: none; width: auto; margin: 1rem 1rem 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .home-hero .bank-stats { margin: 1rem; flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .checkout-actions { flex-direction: column; align-items: stretch; }
  .checkout-actions .btn { width: 100%; }
  .receipt-rows dd { white-space: normal; }
  .receipt-total-figure { font-size: 1.5rem; }
  .pay-amount-figure { font-size: 1.75rem; }
  .price-hero-figure { font-size: 1.5rem; }
  .panel {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(320px, 88vw);
    z-index: 30; border-radius: 0; overflow-y: auto; transform: translateX(105%);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .panel.panel-open { transform: translateX(0); }
  #panel-close { display: inline-block; }
  /* Fixed "Soal" button: smaller on mobile, solid background + border +
     strong shadow so it reads as floating above the content, not part
     of it. .exam keeps 4.5rem bottom padding so content clears it. */
  .panel-toggle { display: inline-block; background: var(--surface); border: 1px solid var(--border); padding: 0.4rem 0.75rem; font-size: 0.9rem; box-shadow: 0 4px 16px rgba(16, 20, 28, 0.28); }
  .exam { padding-bottom: 4.5rem; }
  .exam-bar { top: 56px; }
  .timer { font-size: 1rem; }
  .question-card { padding: 1rem; }
  /* Hero exam rows on narrow screens: the value must never split
     mid-phrase ("550 poin" orphaned) — keep dt + dd each on one line
     and let the whole row wrap so dd drops below dt intact. */
  .exam-card-rows div { flex-wrap: wrap; }
  .exam-card-rows dt { white-space: nowrap; }
  .exam-card-rows dd { white-space: nowrap; text-align: right; max-width: 100%; margin-left: auto; }
}
