/* ==========================================================================
   LATIHAN UJIAN INFORMATIKA — Phone-First Academic Stylesheet
   Sistem warna segar & fokus belajar: Deep Teal + Slate Paper + Crisp White
   ========================================================================== */

:root {
  --bg-page: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #e2e8f0;

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --brand: #0f766e;
  --brand-hover: #115e59;
  --brand-active: #134e4a;
  --brand-soft: #f0fdfa;
  --brand-border: #99f6e4;

  --accent-indigo: #4338ca;
  --accent-indigo-soft: #eef2ff;
  --accent-indigo-border: #c7d2fe;

  --gcr-text: #1d4ed8;
  --gcr-bg: #eff6ff;
  --gcr-border: #bfdbfe;

  --kisi-text: #6d28d9;
  --kisi-bg: #f5f3ff;
  --kisi-border: #ddd6fe;

  --success-text: #15803d;
  --success-bg: #f0fdf4;
  --success-border: #86efac;
  --success-solid: #16a34a;

  --warning-text: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fcd34d;
  --warning-solid: #d97706;

  --danger-text: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-border: #fca5a5;
  --danger-solid: #dc2626;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);

  --header-height: 76px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--bg-page);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

/* Icons */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon--sm {
  width: 17px;
  height: 17px;
}

/* Container */
.container {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: 14px;
}

.container--narrow {
  max-width: 640px;
}

/* Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn:focus-visible,
.option-btn:focus-visible,
.nav-num:focus-visible,
.btn-flag:focus-visible,
.btn-nav-trigger:focus-visible,
.btn-icon:focus-visible,
.filter-chip:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 2px;
}

.btn--lg {
  min-height: 54px;
  padding: 14px 22px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.btn--sm {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.875rem;
}

.btn--full {
  width: 100%;
}

.btn--primary {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.28);
}

.btn--primary:hover {
  background: var(--brand-hover);
}

.btn--outline {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn--outline:hover {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn--soft {
  background: var(--brand-soft);
  border-color: var(--brand-border);
  color: var(--brand-hover);
}

.btn--soft:hover {
  background: #ccfbf1;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn--ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.btn--danger {
  background: var(--danger-solid);
  color: #ffffff;
}

.btn--danger:hover {
  background: var(--danger-text);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--bg-subtle);
}

/* ==========================================================================
   LAYAR AWAL (START SCREEN)
   ========================================================================== */

.screen--start {
  min-height: 100vh;
  padding: 18px 0 36px;
}

.start-hero {
  padding: 22px 18px;
  border-top: 5px solid var(--brand);
  margin-bottom: 14px;
}

.start-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  color: var(--brand-hover);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.start-hero__title {
  margin: 0 0 6px;
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.start-hero__subtitle {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.meta-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  min-width: 0;
}

.meta-item__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.meta-item__value {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

.composition-box {
  background: linear-gradient(135deg, #f0fdfa 0%, #eff6ff 100%);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  margin-bottom: 18px;
}

.composition-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.composition-stat {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.composition-stat__num {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-primary);
}

.composition-stat--total .composition-stat__num {
  color: var(--brand-hover);
}

.composition-stat__desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.composition-divider {
  width: 1px;
  height: 30px;
  background: var(--border-strong);
  flex-shrink: 0;
}

.start-actions {
  margin-top: 4px;
}

.info-card {
  padding: 16px 18px;
  margin-bottom: 14px;
}

.section-heading {
  margin: 0 0 10px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.instruction-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.instruction-list li {
  margin-bottom: 6px;
}

.instruction-list li:last-child {
  margin-bottom: 0;
}

.storage-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.storage-hint .icon {
  color: var(--brand);
  margin-top: 1px;
}

/* Coverage collapsible */
.coverage-details {
  padding: 0;
  overflow: hidden;
}

.coverage-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  list-style: none;
  cursor: pointer;
}

.coverage-summary::-webkit-details-marker {
  display: none;
}

.coverage-details[open] .chevron-icon,
.inline-nav[open] .chevron-icon {
  transform: rotate(180deg);
}

.chevron-icon {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.coverage-list {
  border-top: 1px solid var(--border);
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coverage-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}

.coverage-item__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.coverage-item__topic {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.coverage-item__nums {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-hover);
}

.coverage-item__source {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.footnote {
  margin: 14px 2px 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   STICKY EXAM HEADER & SECTION BAR
   ========================================================================== */

.exam-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.exam-header__inner {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
  padding: 10px 14px 9px;
}

.exam-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.exam-header__brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.exam-header__title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--brand-hover);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.exam-header__progress-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.exam-header__controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--brand-soft);
  border: 1.5px solid var(--brand-border);
  color: var(--brand-hover);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  font-weight: 800;
  min-height: 38px;
}

.timer-badge.is-warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.timer-badge.is-urgent {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
  animation: pulse-urgent 1.2s ease-in-out infinite;
}

@keyframes pulse-urgent {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.25); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
}

.btn-nav-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 6px 11px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.84rem;
  font-weight: 700;
}

.btn-nav-trigger:hover {
  background: var(--bg-subtle);
}

.nav-flag-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning-solid);
  border: 2px solid #ffffff;
}

.progress-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--bg-muted);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, #14b8a6 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* Section Jump Bar */
.section-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.section-bar__inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.section-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-height: 40px;
}

.section-pill:hover {
  border-color: var(--brand);
  color: var(--brand-hover);
  background: var(--brand-soft);
}

.section-pill__count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.76rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

/* ==========================================================================
   MAIN EXAM CONTENT & NAVIGATOR
   ========================================================================== */

.exam-main {
  padding-top: 14px;
  padding-bottom: 40px;
}

/* Inline Navigator */
.inline-nav {
  margin-bottom: 16px;
  overflow: hidden;
}

.inline-nav__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  list-style: none;
  cursor: pointer;
}

.inline-nav__summary::-webkit-details-marker {
  display: none;
}

.inline-nav__summary-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.inline-nav__summary-left strong {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.inline-nav__stats {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.inline-nav__body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}

.nav-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  border: 1.5px solid transparent;
}

.legend-dot--unanswered {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.legend-dot--answered {
  background: var(--brand);
  border-color: var(--brand);
}

.legend-dot--flagged {
  background: var(--warning-bg);
  border-color: var(--warning-solid);
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.nav-grid--essay {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.nav-num {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 4px;
  border-radius: 10px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.nav-num:hover {
  border-color: var(--brand);
}

.nav-num.is-answered {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.nav-num.is-flagged {
  background: var(--warning-bg);
  border-color: var(--warning-solid);
  color: var(--warning-text);
}

.nav-num.is-answered.is-flagged {
  background: var(--warning-solid);
  border-color: var(--warning-text);
  color: #ffffff;
}

.nav-num.is-flagged::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning-solid);
}

.nav-num.is-answered.is-flagged::after {
  background: #ffffff;
}

/* Section Banner */
.exam-section {
  scroll-margin-top: calc(var(--header-height) + 12px);
  margin-bottom: 22px;
}

.section-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
  color: #ffffff;
  margin-bottom: 14px;
}

.section-banner--essay {
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%);
}

.section-banner__eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.88;
}

.section-banner__title {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}

.section-banner__meta {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

/* Question Cards */
.question-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.q-card {
  padding: 16px;
  scroll-margin-top: calc(var(--header-height) + 12px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.q-card.is-flagged {
  border-color: var(--warning-border);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.18), var(--shadow-sm);
}

.q-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.q-card__left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}

.q-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--text-primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
}

.q-points {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* Source Labels */
.source-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: break-word;
}

.source-tag--gcr {
  background: var(--gcr-bg);
  color: var(--gcr-text);
  border: 1px solid var(--gcr-border);
}

.source-tag--kisi {
  background: var(--kisi-bg);
  color: var(--kisi-text);
  border: 1px solid var(--kisi-border);
}

.q-card__source-row {
  margin-bottom: 10px;
}

/* Flag Button */
.btn-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.btn-flag:hover {
  border-color: var(--warning-solid);
  color: var(--warning-text);
  background: var(--warning-bg);
}

.btn-flag.is-active {
  background: var(--warning-bg);
  border-color: var(--warning-solid);
  color: var(--warning-text);
}

.q-text {
  margin: 0 0 14px;
  font-size: 1rem;
  line-height: 1.58;
  font-weight: 500;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

/* PG Options */
.options-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.option-btn {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  text-align: left;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.option-btn:hover {
  border-color: var(--brand);
  background: #f8fffe;
}

.option-btn.is-selected {
  background: var(--brand-soft);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-strong);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-top: 1px;
}

.option-btn.is-selected .option-letter {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

.option-text {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.48;
  color: var(--text-primary);
  overflow-wrap: break-word;
  padding-top: 2px;
}

/* Essay Cards */
.essay-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-indigo);
}

.essay-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.essay-status.is-filled {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-border);
}

.essay-textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.55;
  resize: vertical;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.essay-textarea:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.12);
}

.essay-textarea::placeholder {
  color: var(--text-muted);
}

/* Submit Card */
.submit-card {
  padding: 20px 18px;
  text-align: center;
}

.submit-card__title {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 800;
}

.submit-card__desc {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.submit-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   DRAWER NAVIGATOR
   ========================================================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}

.nav-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg);
}

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

.nav-drawer__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
}

.nav-drawer__subtitle {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-drawer__body {
  padding: 6px 18px 18px;
  overflow-y: auto;
  flex: 1;
}

.nav-drawer__group-title {
  margin: 12px 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.nav-drawer__footer {
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

/* ==========================================================================
   LAYAR HASIL (RESULT SCREEN)
   ========================================================================== */

.result-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.result-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.result-topbar__title {
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--brand-hover);
}

.result-main {
  padding-top: 16px;
  padding-bottom: 44px;
}

.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 600;
}

.alert-banner--warning {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning-border);
  color: var(--warning-text);
}

.result-hero {
  padding: 20px 16px;
  border-top: 5px solid var(--brand);
  margin-bottom: 20px;
}

.result-hero__badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-hover);
  margin-bottom: 4px;
}

.result-hero__heading {
  margin: 0 0 16px;
  font-size: 1.32rem;
  font-weight: 800;
}

.score-display {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.score-box {
  padding: 14px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  text-align: center;
}

.score-box--primary {
  background: var(--brand-soft);
  border-color: var(--brand-border);
}

.score-box__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.score-box__value {
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.score-box__value strong {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
}

.score-box--primary .score-box__value strong {
  color: var(--brand-hover);
}

.score-box__value span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.result-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.stat-chip span {
  font-size: 0.74rem;
  font-weight: 600;
}

.stat-chip strong {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.stat-chip--correct {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.stat-chip--wrong {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

.stat-chip--blank {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.essay-self-notice {
  background: var(--accent-indigo-soft);
  border: 1px solid var(--accent-indigo-border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  margin-bottom: 14px;
}

.essay-self-notice__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--accent-indigo);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.tag--info {
  background: #ffffff;
  color: var(--accent-indigo);
  border: 1px solid var(--accent-indigo-border);
}

.essay-self-notice__text {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.self-score-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--accent-indigo-border);
  font-size: 0.84rem;
}

.self-score-summary__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-secondary);
}

.self-score-summary__item strong {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.result-hero__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.filter-chip {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* Review Cards */
.review-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.review-badge--correct {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.review-badge--wrong {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.review-badge--blank {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

.review-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.92rem;
}

.review-option--correct {
  background: var(--success-bg);
  border-color: var(--success-solid);
}

.review-option--correct .option-letter {
  background: var(--success-solid);
  border-color: var(--success-solid);
  color: #ffffff;
}

.review-option--wrong {
  background: var(--danger-bg);
  border-color: var(--danger-solid);
}

.review-option--wrong .option-letter {
  background: var(--danger-solid);
  border-color: var(--danger-solid);
  color: #ffffff;
}

.review-option__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
  vertical-align: middle;
}

.review-option__tag--correct {
  background: var(--success-solid);
  color: #ffffff;
}

.review-option__tag--wrong {
  background: var(--danger-solid);
  color: #ffffff;
}

.answer-summary-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.explanation-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #f0fdfa;
  border: 1px solid var(--brand-border);
  border-left: 4px solid var(--brand);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.explanation-box__label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-hover);
  margin-bottom: 4px;
}

.explanation-box p {
  margin: 0;
  overflow-wrap: break-word;
}

/* Essay Review Boxes */
.essay-compare {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.essay-answer-box {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  font-size: 0.9rem;
}

.essay-answer-box__label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.essay-answer-box__content {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  color: var(--text-primary);
}

.essay-answer-box__empty {
  margin: 0;
  font-style: italic;
  color: var(--text-muted);
}

.model-answer-box {
  padding: 13px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-indigo-soft);
  border: 1px solid var(--accent-indigo-border);
  border-left: 4px solid var(--accent-indigo);
  font-size: 0.9rem;
}

.model-answer-box__label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-indigo);
  margin-bottom: 5px;
}

.model-answer-box p {
  margin: 0;
  overflow-wrap: break-word;
  color: var(--text-primary);
}

.self-grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.self-grade-row label {
  font-weight: 700;
  color: var(--text-secondary);
}

.self-grade-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.self-grade-input {
  width: 72px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.self-grade-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.12);
}

.empty-filter-msg {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(2px);
}

.modal-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.modal-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.modal-card__icon--teal {
  background: var(--brand-soft);
  color: var(--brand);
}

.modal-card__icon--amber {
  background: var(--warning-bg);
  color: var(--warning-solid);
}

.modal-card__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
}

.modal-card__desc {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.modal-stats {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  text-align: left;
  font-size: 0.86rem;
}

.modal-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-stat-row strong {
  font-variant-numeric: tabular-nums;
}

.modal-stat-row--warn strong {
  color: var(--warning-text);
}

.modal-stat-row--danger strong {
  color: var(--danger-text);
}

.modal-stat-row--ok strong {
  color: var(--success-text);
}

.modal-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* ==========================================================================
   TABLET / DESKTOP ENHANCEMENTS
   ========================================================================== */

@media (min-width: 640px) {
  .container {
    padding-inline: 20px;
  }

  .start-hero {
    padding: 30px 28px;
  }

  .start-hero__title {
    font-size: 1.85rem;
  }

  .q-card {
    padding: 20px 22px;
  }

  .nav-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .nav-drawer {
    left: auto;
    top: 0;
    bottom: 0;
    width: 380px;
    max-height: 100vh;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  }

  .nav-drawer .nav-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .self-score-summary {
    flex-direction: row;
    justify-content: space-between;
  }
}
