@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/jakarta-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/jakarta-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #0f1f3d;
  --ink-soft: #4b5a73;
  --line: #d8dde6;
  --line-strong: #aeb8c8;
  --paper: #f5f5f0;
  --surface: #ffffff;
  --brand: #14469c;
  --brand-deep: #0c2f6e;
  --brand-tint: #e7eefa;
  --amber: #8a5300;
  --amber-line: #d99a2b;
  --amber-tint: #fdf1d8;
  --green: #17724c;
  --green-tint: #e1f3ea;
  --red: #b02a21;
  --red-tint: #fbe9e7;
  --radius: 10px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.625rem; font-weight: 700; text-wrap: balance; }
h2 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-underline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.875rem; }
.lead { margin-top: 0.375rem; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.5rem 1.125rem;
  border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 0.9375rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-deep); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #8f2119; }
.btn-danger-text { color: var(--red); }
.btn-ghost.btn-danger-text:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0.25rem 0.75rem; font-size: 0.875rem; }
.btn-lg { min-height: 52px; padding: 0.625rem 1.75rem; font-size: 1rem; }
.btn-link {
  padding: 0; border: 0; background: none; color: var(--brand);
  font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.btn-link.btn-danger-text { color: var(--red); }

/* Merek */
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand img { flex: none; object-fit: contain; }
/* Logo kampus bisa berwarna gelap, jadi di atas latar gelap diberi alas putih. */
.brand-light img, .tes-brand img { padding: 3px; border-radius: 8px; background: #fff; }
.brand strong { display: block; font-size: 0.9375rem; line-height: 1.25; }
.brand span { display: block; font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.3; }
.brand-light span { color: #c6d5f0; }

/* Registrasi dan masuk */
.auth { display: grid; grid-template-columns: minmax(380px, 44%) 1fr; min-height: 100vh; }
.auth-panel {
  position: relative; display: flex; flex-direction: column; gap: 2.5rem;
  /* Ruang bawah untuk motif LJK, supaya informasi panjang tidak menimpanya. */
  padding: 2.5rem 3rem 19.5rem; overflow: hidden;
  background: var(--brand-deep); color: #fff;
}
.auth-intro { position: relative; z-index: 1; max-width: 26rem; }
.auth-intro h1 { font-size: 2.125rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.auth-note { margin-top: 1rem; color: #dbe5f7; font-size: 0.9375rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.auth-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 0.625rem 0.875rem; margin: 1.75rem 0 0; padding: 0; list-style: none; color: #dbe5f7; font-size: 0.9375rem; }
.auth-facts li { display: contents; }
.auth-facts b { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }

.ljk {
  position: absolute; right: -1.5rem; bottom: -1rem; left: 3rem;
  display: grid; grid-template-columns: repeat(2, max-content); justify-content: end; gap: 0.5rem 2.25rem;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to top, #000 45%, transparent);
  mask-image: linear-gradient(to top, #000 45%, transparent);
}
.ljk-row { display: flex; align-items: center; gap: 0.4375rem; }
.ljk-n { width: 1.375rem; color: #c6d5f0; font-size: 0.75rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.ljk-b {
  display: grid; place-items: center; width: 1.375rem; height: 1.375rem;
  border: 1.5px solid #8fa8d6; border-radius: 50%;
  color: #a9bee2; font-size: 0.625rem; font-weight: 600;
}
.ljk-b.on { background: #fff; border-color: #fff; color: var(--brand-deep); }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-card { width: 100%; max-width: 26rem; }
.auth-card h2 { font-size: 1.5rem; }
.auth-card > .muted { margin-top: 0.375rem; }
.auth-switch { margin-top: 1.5rem; font-size: 0.9375rem; }
.auth-help { margin-top: 0.5rem; color: var(--ink-soft); font-size: 0.875rem; }

/* Formulir */
.form { display: grid; gap: 1.125rem; margin-top: 1.5rem; }
.field { display: grid; gap: 0.375rem; }
.field label { font-size: 0.875rem; font-weight: 600; }
input[type="text"], input[type="password"], input[type="search"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 0.5rem 0.75rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem;
}
input::placeholder { color: #66748c; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
textarea { resize: vertical; line-height: 1.5; }
.input-upper { text-transform: uppercase; letter-spacing: 0.02em; }
.input-upper::placeholder { text-transform: none; }
.has-error input { border-color: var(--red); }
.field-error { color: var(--red); font-size: 0.875rem; }
.field-hint { color: var(--ink-soft); font-size: 0.8125rem; line-height: 1.45; }
.pw-field { position: relative; }
.pw-field input { padding-right: 6.75rem; }
.pw-toggle {
  position: absolute; top: 50%; right: 0.375rem; transform: translateY(-50%);
  min-height: 34px; padding: 0 0.625rem; border: 0; border-radius: 6px; background: none;
  color: var(--brand); font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer;
}
.pw-toggle:hover { background: var(--brand-tint); }
input[type="file"] { width: 100%; font: inherit; font-size: 0.9375rem; }
input[type="file"]::file-selector-button {
  margin-right: 0.75rem; min-height: 40px; padding: 0 0.875rem;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.radio-group { display: grid; gap: 0.375rem; margin: 0.875rem 0 0.5rem; padding: 0; border: 0; }
.radio-group legend { margin-bottom: 0.375rem; padding: 0; font-size: 0.875rem; font-weight: 600; }
.radio-group label { display: flex; align-items: center; gap: 0.5rem; min-height: 32px; font-size: 0.9375rem; cursor: pointer; }
.radio-group input { width: 18px; height: 18px; accent-color: var(--brand); }

/* Pesan */
.flashes { display: grid; gap: 0.5rem; margin: 1rem 0; }
.flash { padding: 0.625rem 0.875rem; border-radius: 8px; font-size: 0.9375rem; }
.flash-error { background: var(--red-tint); color: #7f1d16; }
.flash-success { background: var(--green-tint); color: #0f5236; }
.flash-secret { background: var(--amber-tint); color: #5f3a00; font-weight: 600; word-break: break-word; }
.notice { padding: 0.75rem 1rem; border-left: 4px solid var(--amber-line); border-radius: 0 8px 8px 0; background: var(--amber-tint); color: #5f3a00; }

/* Halaman umum */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--line); background: var(--surface);
}
.page { margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page-narrow { max-width: 44rem; }
.page-wide { max-width: 72rem; }
.eyebrow { margin-bottom: 0.25rem; color: var(--brand); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.card { margin-top: 1.5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card-flush { padding: 0; }
.card-error { border-color: #e6b1ac; }
.card-form { max-width: 30rem; }
.card > h2 + p, .card > h2 + .table-wrap { margin-top: 0.75rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.25rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.error-page { padding-top: 5rem; }
.error-page .btn { margin-top: 1.5rem; }

.identity { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 1rem; margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--brand-tint); }
.identity dt { color: var(--ink-soft); font-size: 0.8125rem; }
.identity dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.rules ol { display: grid; gap: 0.75rem; margin: 0.875rem 0 0; padding-left: 1.25rem; }
.rules li { padding-left: 0.25rem; }
.start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.75rem; }

/* Tabel */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--line-strong); color: var(--ink-soft); font-size: 0.8125rem; font-weight: 600; text-align: left; white-space: nowrap; }
.table td { padding: 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.t-num { text-align: right !important; font-variant-numeric: tabular-nums; }
.cell-sub { display: block; margin-top: 0.125rem; color: var(--ink-soft); font-size: 0.8125rem; }
.table-peserta td:first-child { min-width: 12rem; }
.table-peserta td:nth-child(3) .cell-sub { white-space: nowrap; }
.table-score td:first-child { overflow-wrap: anywhere; }

/* Halaman hasil */
.score-card {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.25rem 2.5rem;
  margin-top: 1.5rem; padding: 1.75rem; border-radius: var(--radius);
  background: var(--brand-deep); color: #fff;
}
.score-main { display: grid; }
.score-label { color: #c6d5f0; font-size: 0.875rem; font-weight: 600; }
.score-value { font-size: 3.5rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.score-scale { color: #c6d5f0; font-size: 0.875rem; }
.score-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; }
.score-stats dt { color: #c6d5f0; font-size: 0.8125rem; }
.score-stats dd { margin: 0; font-size: 1.625rem; font-weight: 700; line-height: 1.25; }
.score-download { grid-column: 1 / -1; background: #fff; color: var(--brand-deep); }
.score-download:hover:not(:disabled) { background: var(--brand-tint); }
.meta-list { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 1.5rem 0 0; }
.meta-list dt { color: var(--ink-soft); font-size: 0.8125rem; }
.meta-list dd { margin: 0; font-size: 0.9375rem; font-weight: 600; }

/* Dialog */
.dialog {
  width: min(28rem, calc(100vw - 2rem)); padding: 1.5rem;
  border: 0; border-radius: 12px; background: var(--surface); color: var(--ink);
  box-shadow: 0 16px 48px rgba(15, 31, 61, 0.28);
}
.dialog:focus { outline: none; }
.dialog::backdrop { background: rgba(15, 31, 61, 0.55); }
.dialog h2 { font-size: 1.25rem; }
.dialog p { margin-top: 0.625rem; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.625rem; margin-top: 1.5rem; }
.finish-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.finish-stats li { display: grid; padding: 0.625rem 0.75rem; border-radius: 8px; background: var(--paper); }
.finish-stats b { font-size: 1.5rem; line-height: 1.2; }
.finish-stats span { color: var(--ink-soft); font-size: 0.8125rem; }

/* Halaman tes */
.tes-bar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1.25rem;
  padding: 0.625rem 1.5rem; background: var(--brand-deep); color: #fff;
}
.tes-brand span { color: #c6d5f0; }
.tes-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tes-brand > div { min-width: 0; }
.timer { display: grid; justify-items: end; line-height: 1.15; padding: 0.25rem 0.75rem; border-radius: 8px; }
.timer-label { color: #c6d5f0; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.03em; }
.timer-value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.timer.is-warning { background: var(--amber-tint); color: #5f3a00; }
.timer.is-warning .timer-label { color: #5f3a00; }
.timer.is-critical { background: var(--red); color: #fff; }
.timer.is-critical .timer-label { color: #fff; }
.btn-finish { background: #fff; color: var(--brand-deep); }
.btn-finish:hover:not(:disabled) { background: var(--brand-tint); }

.tes-progress {
  display: block; width: 100%; height: 4px; border: 0; appearance: none; -webkit-appearance: none;
  background: var(--line); position: sticky; top: 64px; z-index: 19;
}
.tes-progress::-webkit-progress-bar { background: var(--line); }
.tes-progress::-webkit-progress-value { background: var(--brand); transition: width 200ms ease; }
.tes-progress::-moz-progress-bar { background: var(--brand); }

.tes-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 21rem; align-items: start; gap: 2rem;
  max-width: 76rem; margin: 0 auto; padding: 1.75rem 1.5rem 3rem;
}
.tes-main { min-width: 0; }
.q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.q-number { font-weight: 700; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 6px; background: var(--brand-tint); color: var(--brand-deep); font-size: 0.8125rem; font-weight: 600; }
.save-status { margin-left: auto; color: var(--ink-soft); font-size: 0.8125rem; }
.save-status[data-kind="saved"] { color: var(--green); }
.save-status[data-kind="error"], .save-status[data-kind="warn"] { color: var(--red); font-weight: 600; }
.q-body { margin-top: 1.125rem; font-size: 1.125rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; }

.options { display: grid; gap: 0.625rem; margin: 1.5rem 0 0; padding: 0; border: 0; min-width: 0; }
.option {
  position: relative; display: flex; align-items: flex-start; gap: 0.875rem;
  min-height: 56px; padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface);
  cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease;
}
.option:hover { border-color: var(--line-strong); }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bubble {
  flex: none; display: grid; place-items: center; width: 2rem; height: 2rem;
  border: 2px solid var(--line-strong); border-radius: 50%;
  color: var(--ink-soft); font-size: 0.875rem; font-weight: 700;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.option-text { flex: 1; align-self: center; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.option.is-selected { border-color: var(--brand); background: var(--brand-tint); }
.option.is-selected .bubble { border-color: var(--brand); background: var(--brand); color: #fff; }
.option input:focus-visible + .bubble { outline: 3px solid var(--brand); outline-offset: 2px; }

.q-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 1rem; }
.btn-flag {
  min-height: 40px; padding: 0.25rem 0.875rem;
  border: 1.5px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
}
.btn-flag[aria-pressed="true"] { border-color: var(--amber-line); background: var(--amber-tint); color: #5f3a00; }
.q-hint { margin-left: auto; color: var(--ink-soft); font-size: 0.8125rem; }
.q-nav { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1.75rem; }
.q-sheet-btn, .sheet-close { display: none; }

.sheet {
  position: sticky; top: 92px; padding: 1.125rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.sheet-head h2 { font-size: 0.9375rem; }
.sheet-count { color: var(--ink-soft); font-size: 0.875rem; font-weight: 600; }
.sheet-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.375rem;
  max-height: calc(100vh - 16rem); margin-top: 0.875rem; overflow-y: auto; padding: 4px;
}
.cell {
  display: flex; align-items: center; justify-content: center; gap: 0.25rem;
  height: 2.5rem; padding: 0 0.125rem;
  border: 1.5px solid var(--line-strong); border-radius: 7px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.cell:hover { border-color: var(--brand); }
.cell-mark:empty { display: none; }
.cell-mark { font-weight: 800; }
.cell.is-answered { border-color: var(--brand); background: var(--brand); color: #fff; }
.cell.is-flagged { border-color: var(--amber-line); background: var(--amber-tint); color: #5f3a00; }
.cell.is-current { outline: 3px solid var(--brand-deep); outline-offset: 1px; }
.sheet-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 0.875rem; margin: 0.875rem 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 0.75rem; }
.sheet-legend li { display: flex; align-items: center; gap: 0.3125rem; }
.dot { width: 0.75rem; height: 0.75rem; border-radius: 3px; border: 1.5px solid var(--line-strong); }
.dot-answered { background: var(--brand); border-color: var(--brand); }
.dot-flagged { background: var(--amber-tint); border-color: var(--amber-line); }
.sheet-backdrop { display: none; }

/* Panel panitia */
.admin-bar { flex-wrap: wrap; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-right: auto; margin-left: 1rem; }
.admin-nav a { padding: 0.375rem 0.75rem; border-radius: 6px; color: var(--ink-soft); font-size: 0.9375rem; font-weight: 600; text-decoration: none; }
.admin-nav a:hover { color: var(--brand); }
.admin-nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-deep); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 0; }
.stats > div { padding: 1.125rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stats dt { color: var(--ink-soft); font-size: 0.875rem; }
.stats dd { margin: 0.125rem 0 0; font-size: 2rem; font-weight: 700; line-height: 1.2; }
.upload-steps { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; }
.upload-steps > div > .btn { margin-top: 0.875rem; }
.upload-steps > div > .muted { margin-top: 0.375rem; }
.upload-steps form .field { margin-top: 0.75rem; }
.upload-steps form .btn { margin-top: 0.875rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 1rem; }
.chip { padding: 0.25rem 0.75rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active { border-color: var(--brand); background: var(--brand); color: #fff; }
.question-list { margin: 1.25rem 0 0; padding-left: 1.75rem; }
.question-item { padding: 1rem 0; border-top: 1px solid var(--line); }
.question-item::marker { font-weight: 700; font-variant-numeric: tabular-nums; }
.question-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem; }
.question-top form { margin-left: auto; }
.question-body { margin-top: 0.5rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.question-options { display: grid; gap: 0.25rem; margin: 0.625rem 0 0; padding: 0; list-style: none; font-size: 0.9375rem; }
.question-options li { display: flex; align-items: flex-start; gap: 0.5rem; }
.mini-bubble { flex: none; display: grid; place-items: center; width: 1.375rem; height: 1.375rem; margin-top: 0.0625rem; border: 1.5px solid var(--line-strong); border-radius: 50%; color: var(--ink-soft); font-size: 0.6875rem; font-weight: 700; }
.is-key { font-weight: 600; }
.is-key .mini-bubble { border-color: var(--green); background: var(--green); color: #fff; }
.key-label { color: var(--green); font-size: 0.75rem; font-weight: 700; align-self: center; }
.pager { display: flex; align-items: center; justify-content: center; gap: 0.875rem; margin-top: 1.25rem; }
.filter-bar { display: grid; grid-template-columns: minmax(0, 1fr) 13rem auto; gap: 0.625rem; margin-top: 1.25rem; }
.heading-count { margin-left: 0.25rem; color: var(--ink-soft); font-size: 1.125rem; font-weight: 600; }
.badge { display: inline-block; padding: 0.0625rem 0.5rem; border-radius: 6px; background: #edeff3; color: var(--ink-soft); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.badge-live { background: var(--amber-tint); color: #5f3a00; }
.badge-done { background: var(--green-tint); color: #0f5236; }
.row-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; min-width: 11rem; }
.logo-editor { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 1.5rem; margin-top: 1rem; }
.logo-swatches { display: flex; gap: 0.5rem; }
.logo-swatch { display: grid; place-items: center; width: 6.5rem; height: 6.5rem; padding: 0.625rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.logo-swatch-dark { border-color: var(--brand-deep); background: var(--brand-deep); }
.logo-swatch img { width: 100%; height: 100%; object-fit: contain; }
.logo-swatch-dark img { padding: 0.25rem; border-radius: 8px; background: #fff; }
.logo-submit { margin-top: 0.875rem; }
.logo-remove { margin-top: 0.75rem; }
.logo-notice { margin-top: 0.875rem; font-size: 0.875rem; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1.125rem; margin-top: 1rem; }
.field-wide { grid-column: 1 / -1; }
.facts-editor { display: grid; gap: 0.5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.facts-editor legend { padding: 0; font-size: 0.875rem; font-weight: 600; }
.fact-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0.5rem; }

/* Layar sedang */
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-panel { gap: 1.25rem; padding: 1.25rem 1.5rem; }
  .auth-intro h1 { font-size: 1.375rem; }
  .ljk { display: none; }
  .auth-facts { gap: 0.25rem 0.75rem; margin-top: 0.875rem; font-size: 0.875rem; }
  .auth-note { margin-top: 0.625rem; font-size: 0.875rem; }
  .logo-editor, .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .auth-main { align-items: flex-start; padding: 1.75rem 1.25rem 3rem; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-steps { grid-template-columns: 1fr; }
  .admin-nav { order: 3; width: 100%; margin-left: 0; }

  .tes-layout { display: block; padding: 1.25rem 1rem 6rem; }
  .q-hint { display: none; }
  .q-nav {
    position: fixed; right: 0; bottom: 0; left: 0; z-index: 15; margin: 0;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--surface);
  }
  .q-nav .btn { flex: 1; padding-inline: 0.5rem; font-size: 0.875rem; white-space: nowrap; }
  .q-sheet-btn { display: inline-flex; }
  .sheet-close { display: inline; }

  .sheet {
    position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 30;
    max-height: 78vh; border: 0; border-radius: 16px 16px 0 0;
    padding-bottom: calc(1.125rem + env(safe-area-inset-bottom));
    box-shadow: 0 -12px 40px rgba(15, 31, 61, 0.25);
    transform: translateY(105%); visibility: hidden;
    transition: transform 200ms ease, visibility 200ms;
  }
  .sheet.is-open { transform: none; visibility: visible; }
  .sheet-grid { grid-template-columns: repeat(auto-fill, minmax(3.25rem, 1fr)); max-height: 56vh; }
  .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(15, 31, 61, 0.45); }
}

/* Layar ponsel */
@media (max-width: 560px) {
  h1 { font-size: 1.375rem; }
  .topbar { padding: 0.625rem 1rem; }
  .page { padding: 1.5rem 1rem 3rem; }
  .card { padding: 1.125rem; }
  .identity { grid-template-columns: 1fr 1fr; padding: 0.875rem 1rem; }
  .identity > div:first-child { grid-column: 1 / -1; }
  .start-row .btn { width: 100%; }
  .score-card { grid-template-columns: 1fr; padding: 1.25rem; }
  .table-score { font-size: 0.875rem; }
  .table-score th, .table-score td { padding: 0.5rem 0.25rem; }
  .table-score th { font-size: 0.75rem; }
  .table-score th:first-child, .table-score td:first-child { padding-left: 0; }
  .table-score th:last-child, .table-score td:last-child { padding-right: 0; }
  .filter-bar { grid-template-columns: 1fr; }
  .fact-row { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .finish-stats li { padding: 0.5rem 0.625rem; }
  .dialog-actions .btn { flex: 1; }

  .tes-bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .tes-brand div { display: none; }
  .timer { justify-self: center; justify-items: center; }
  .timer-value { font-size: 1.25rem; }
  .btn-finish { min-height: 40px; padding-inline: 0.75rem; font-size: 0.875rem; }
  .tes-progress { top: 56px; }
  .q-body { font-size: 1.0625rem; }
  .save-status { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .topbar, .score-download { display: none; }
}
