:root {
  color-scheme: light;
  --outer-bg: #eeeae2;
  --bg: #f7f5f0;
  --topbar-bg: #f7f5f0;
  --nav-bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #eeeae2;
  --surface-elev: #ffffff;
  --border: #dcd6c9;
  --border-strong: #b8af9c;
  --shell-frame: #dcd6c9;

  --primary: #0f5c52;
  --primary-fg: #ffffff;
  --primary-soft: #e5f1ef;
  --primary-ink: #0c4b43;

  --accent: #0f5c52;
  --accent-soft: #e5f1ef;
  --accent-ink: #0c4b43;

  --inverted-bg: #162422;
  --inverted-fg: #f7f5f0;
  --inverted-muted: #b8c5c1;
  --inverted-border: #263b38;

  --coral: #be123c;
  --coral-soft: #ffe4e6;
  --coral-ink: #9f1239;

  --mint: #0b6e4f;
  --mint-soft: #e6f4ee;
  --mint-ink: #0b6e4f;

  --amber: #b45309;
  --amber-soft: #fef3c7;
  --amber-ink: #92400e;

  --sky: #075985;
  --sky-soft: #e0f2fe;
  --sky-ink: #075985;

  --ink: #141a18;
  --muted: #4b5451;

  --check-done-bg: #e6f4ee;
  --check-done-border: #9ad8bd;
  --progress-track: #dcd6c9;
  --handle-bg: #c2baa9;
  --hist-bg: #f4f1ea;
  --hist-border: #dcd6c9;
  --toast-bg: #162422;
  --toast-ink: #f7f5f0;

  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --nav-h: 64px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --outer-bg: #080b0a;
  --bg: #0d1211;
  --topbar-bg: #0d1211;
  --nav-bg: #141b19;
  --surface: #141b19;
  --surface-soft: #1c2522;
  --surface-elev: #141b19;
  --border: #2b3834;
  --border-strong: #3e504a;
  --shell-frame: #2b3834;

  --primary: #2dd4bf;
  --primary-fg: #072320;
  --primary-soft: #13352f;
  --primary-ink: #5eead4;

  --accent: #2dd4bf;
  --accent-soft: #13352f;
  --accent-ink: #5eead4;

  --inverted-bg: #182422;
  --inverted-fg: #f2f0eb;
  --inverted-muted: #b8c5c1;
  --inverted-border: #2e4440;

  --coral: #fb7185;
  --coral-soft: #3b181a;
  --coral-ink: #fca5a5;

  --mint: #34d399;
  --mint-soft: #13352f;
  --mint-ink: #5eead4;

  --amber: #fbbf24;
  --amber-soft: #36280e;
  --amber-ink: #fde68a;

  --sky: #38bdf8;
  --sky-soft: #112c3c;
  --sky-ink: #7dd3fc;

  --ink: #f2f0eb;
  --muted: #a3b0ac;

  --check-done-bg: #13352f;
  --check-done-border: #255d53;
  --progress-track: #2b3834;
  --handle-bg: #3e504a;
  --hist-bg: #18211e;
  --hist-border: #2b3834;
  --toast-bg: #f2f0eb;
  --toast-ink: #0d1211;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--outer-bg);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
}

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

/* Base Interactive Affordances & Focus (R-32, R-39) */
a[href],
button:not(:disabled),
summary,
select:not(:disabled),
label[for],
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled) {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* Mobile App Shell */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px);
}

@media (min-width: 520px) and (max-width: 767px) {
  body {
    padding: 18px 12px;
  }
  .app-shell {
    min-height: calc(100dvh - 36px);
    border-radius: 18px;
    border: 1px solid var(--shell-frame);
    overflow-x: clip;
  }
}

/* Flat Splash Loader */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #162422;
  color: #f7f5f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  transition: opacity 0.2s ease;
}

.splash-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-orb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: #0f5c52;
  border: 1px solid #263b38;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.splash-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.splash-sub {
  margin: 0;
  font-size: 0.86rem;
  color: #b8c5c1;
}

/* Sticky 2-Row Flat Topbar (Zero Backdrop-Filter) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--topbar-bg);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

.brand-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 1px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.theme-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  display: grid;
  place-items: center;
}

.theme-btn:hover {
  background: var(--surface-soft);
  border-color: var(--border-strong);
}

.status-pill {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-pill.is-free {
  background: var(--primary);
  color: var(--primary-fg);
}

.status-pill.is-free:hover {
  opacity: 0.92;
}

.status-pill.is-pro {
  background: var(--mint-soft);
  color: var(--mint-ink);
  border: 1px solid var(--mint);
}

.topbar-meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 4px 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.meta-live-text {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radar-pill-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--border);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.radar-pill-btn:hover {
  border-color: var(--border-strong);
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.offline-banner {
  padding: 8px 11px;
  border-radius: var(--radius-md);
  background: var(--amber-soft);
  color: var(--amber-ink);
  border: 1px solid var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Main Content */
.main-content {
  padding: 16px 16px 12px;
  flex: 1;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
}

/* Flat Editorial Hero Card */
.hero-card {
  background: var(--inverted-bg);
  color: var(--inverted-fg);
  border: 1px solid var(--inverted-border);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.hero-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--inverted-muted);
  line-height: 1.42;
}

/* 1-Click Jurusan Picker Trigger */
.jurusan-trigger {
  width: 100%;
  min-height: 48px;
  background: #ffffff;
  color: #141a18;
  border: 1px solid #dcd6c9;
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.jurusan-trigger:hover {
  border-color: var(--primary);
}

.jurusan-trigger.surface-mode {
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--border);
}

.jurusan-trigger-content {
  min-width: 0;
  flex: 1;
  display: block;
}

.jurusan-trigger-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4b5451;
}

.jurusan-trigger.surface-mode .jurusan-trigger-label {
  color: var(--muted);
}

.jurusan-trigger-value {
  display: block;
  font-size: 0.87rem;
  font-weight: 700;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jurusan-trigger-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: #eeeae2;
  color: #141a18;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
}

.jurusan-trigger.surface-mode .jurusan-trigger-icon {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

/* Quick Major Chips (44px Touch Target + Visible Horizontal Scrollbar) */
.quick-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: #547771 #1e2d2a;
}

.quick-chips-row::-webkit-scrollbar {
  height: 7px;
}

.quick-chips-row::-webkit-scrollbar-track {
  background: #1e2d2a;
  border-radius: 999px;
}

.quick-chips-row::-webkit-scrollbar-thumb {
  background: #547771;
  border-radius: 999px;
}

.quick-chips-row::-webkit-scrollbar-thumb:hover {
  background: #739b94;
}

.quick-chip {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: #223532;
  color: #e4eae8;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #35504c;
  display: inline-flex;
  align-items: center;
}

.quick-chip:hover {
  background: #2b423e;
}

.quick-chip.active {
  background: #ffffff;
  color: #141a18;
  border-color: #ffffff;
  font-weight: 700;
}

/* Search + Sort Chips Toolbar */
.toolbar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 12px;
  margin-bottom: 14px;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px 10px 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: var(--primary);
  background: var(--surface);
}

.filter-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.filter-btn:hover {
  border-color: var(--border-strong);
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.filter-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

.sort-chips-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.sort-chips-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 7px;
}

.sort-chips-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--surface-soft);
}

.sort-chip {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sort-chip:hover {
  border-color: var(--border-strong);
}

.sort-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
}

.sort-pro-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--coral-soft);
  color: var(--coral-ink);
}

.sort-chip.active .sort-pro-tag {
  background: rgba(255, 255, 255, 0.22);
  color: var(--primary-fg);
}

.meta-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.result-summary {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.result-summary strong {
  color: var(--ink);
}

.btn-link-reset {
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--coral-ink);
  display: inline-flex;
  align-items: center;
}

.btn-link-reset:hover {
  background: var(--coral-soft);
}

/* Active Filter Pills */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.active-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 6px 0 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
}

.active-pill button {
  min-width: 34px;
  min-height: 34px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  color: var(--coral-ink);
  display: grid;
  place-items: center;
}

.active-pill button:hover {
  background: var(--coral-soft);
}

/* Formation Card */
.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.f-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.f-card:hover {
  border-color: var(--border-strong);
}

.f-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.badge-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-block;
}

.dot-high { background: var(--mint); }
.dot-medium { background: var(--amber); }
.dot-tight { background: var(--coral); }
.dot-ramai { background: #c2410c; }

[data-theme="dark"] .dot-ramai {
  background: #fdba74;
}

.comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
}

.comp-high {
  background: var(--mint-soft);
  color: var(--mint-ink);
}

.comp-medium {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.comp-tight {
  background: var(--coral-soft);
  color: var(--coral-ink);
}

.jf-badge {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--border);
}

.jf-badge.rank-tag {
  background: var(--inverted-bg);
  color: var(--inverted-fg);
  border-color: var(--inverted-border);
}

/* Synchronized Bookmark Ribbon Button (44px Touch Target) */
.bookmark-btn {
  min-height: 44px;
  padding: 0 11px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
}

.bookmark-btn:hover {
  border-color: var(--border-strong);
}

.bookmark-btn.saved {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.f-instansi {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-ink);
  margin-bottom: 2px;
}

.f-jabatan {
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.f-lokasi {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 10px;
  line-height: 1.38;
}

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

.metric-pill {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 9px;
}

.metric-k {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.metric-v {
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Live BKN 2026 Agency Strip */
.radar26-strip {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radar26-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.radar26-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.zona-badge {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.zona-longgar {
  background: var(--mint-soft);
  color: var(--mint-ink);
}

.zona-sedang {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.zona-ramai {
  background: #ffedd5;
  color: #9a3412;
}

[data-theme="dark"] .zona-ramai {
  background: rgba(251, 146, 60, 0.16);
  color: #fdba74;
}

.zona-brutal {
  background: var(--coral-soft);
  color: var(--coral-ink);
}

.radar26-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.radar26-note {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.38;
}

/* PRO Histori CPNS 2024 Panel */
.hist24-box {
  background: var(--hist-bg);
  border: 1px solid var(--hist-border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin-bottom: 10px;
}

.hist24-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.hist24-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}

.hist24-ratio {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.hist24-ratio.r-low {
  background: var(--mint-soft);
  color: var(--mint-ink);
}

.hist24-ratio.r-mid {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.hist24-ratio.r-high {
  background: var(--coral-soft);
  color: var(--coral-ink);
}

.hist24-stats {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.hist24-eks {
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.35;
}

.hist24-locked {
  width: 100%;
  min-height: 44px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
}

.hist24-locked:hover {
  border-color: var(--primary);
}

.hist24-locked-cta {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.7rem;
  font-weight: 700;
}

/* PRO Acuan Nilai SKD 2024 Panel & Tryout Simulator */
.skd24-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  margin-bottom: 10px;
}

.skd24-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 5px;
}

.skd24-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}

.skd24-tier {
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
}

.skd24-tier.s-low {
  background: var(--mint-soft);
  color: var(--mint-ink);
}

.skd24-tier.s-mid {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.skd24-tier.s-high {
  background: var(--coral-soft);
  color: var(--coral-ink);
}

.skd24-line {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

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

.skd24-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}

.skd24-k {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
}

.skd24-v {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  margin: 2px 0;
}

.skd24-sub {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.3;
}

.skd24-note {
  margin-top: 4px;
  font-size: 0.71rem;
  color: var(--muted);
  line-height: 1.38;
}

.skd-sim-details {
  margin-top: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}

.skd-sim-summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary-ink);
  cursor: pointer;
  user-select: none;
}

.skd-sim-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 4px;
}

.skd-sim-field label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 3px;
}

.skd-sim-input {
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.skd-sim-result {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}

.skd-sim-result.ok {
  background: var(--mint-soft);
  border-color: var(--mint);
  color: var(--mint-ink);
}

.skd-sim-result.warn {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--amber-ink);
}

.skd-sim-result.fail {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral-ink);
}

.f-card-actions {
  display: flex;
  gap: 8px;
}

.btn-soft {
  flex: 1;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface-soft);
  color: var(--ink);
  border: 1px solid var(--border);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-soft:hover {
  border-color: var(--border-strong);
  background: var(--primary-soft);
  color: var(--primary-ink);
}

.btn-outline {
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-outline:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.btn-outline.active {
  background: var(--mint-soft);
  border-color: var(--mint);
  color: var(--mint-ink);
}

/* Blurred Preview & Flat Paywall */
.f-card.blurred-teaser {
  position: relative;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
}

.f-card.blurred-teaser .blur-inner {
  filter: blur(5px);
  opacity: 0.55;
}

.paywall-card {
  background: var(--inverted-bg);
  color: var(--inverted-fg);
  border: 1px solid var(--inverted-border);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
  text-align: center;
  margin-top: 4px;
}

.paywall-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #223532;
  color: #e4eae8;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 10px;
}

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

.paywall-desc {
  margin: 0 0 14px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--inverted-muted);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 800;
  background: #2dd4bf;
  color: #072320;
  margin-bottom: 9px;
}

.btn-cta:hover {
  opacity: 0.92;
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  background: #223532;
  color: #f7f5f0;
  border: 1px solid #35504c;
}

.btn-cta-secondary:hover {
  background: #2b423e;
}

.btn-load-more {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  margin-top: 4px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.84rem;
}

.btn-load-more:hover {
  background: var(--surface-soft);
}

/* Section Card (Wizard / Checklist / Empty / Error) */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 12px;
}

.section-title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 800;
}

.section-sub {
  margin: 0 0 14px;
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.4;
}

.field-group {
  margin-bottom: 12px;
}

.field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.field-input,
.field-select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
}

.field-select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5451' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.field-input:focus,
.field-select:focus {
  border-color: var(--primary);
  background-color: var(--surface);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  min-height: 44px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chip-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-toggle {
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink);
}

.chip-toggle:hover {
  border-color: var(--border-strong);
}

.chip-toggle.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
}

.btn-primary-full {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-full:hover {
  opacity: 0.92;
}

.reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.reason-pill {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--sky-soft);
  color: var(--sky-ink);
  font-size: 0.71rem;
  font-weight: 700;
}

/* Segmented Control */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 12px;
}

.seg-btn {
  min-height: 44px;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.seg-btn.active {
  background: var(--primary);
  color: var(--primary-fg);
}

/* Comparison Matrix */
.compare-scroll {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--surface-soft);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
  font-size: 0.77rem;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
  min-width: 158px;
}

.compare-table th:first-child,
.compare-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--surface-soft);
  font-weight: 700;
  color: var(--muted);
  width: 118px;
  z-index: 2;
}

.compare-head-ins {
  font-size: 0.72rem;
  color: var(--primary-ink);
  font-weight: 700;
}

.compare-head-jab {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
  margin: 2px 0 6px;
}

.best-cell {
  background: var(--mint-soft);
  color: var(--mint-ink);
  font-weight: 700;
}

/* Checklist Pemberkasan */
.check-target-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--surface-soft);
}

.target-pill {
  flex-shrink: 0;
  max-width: 220px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.target-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
}

.progress-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px;
  margin-bottom: 12px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.77rem;
  font-weight: 700;
  margin-bottom: 7px;
}

.progress-track {
  height: 7px;
  border-radius: 4px;
  background: var(--progress-track);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--mint);
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 8px;
}

.check-item.done {
  background: var(--check-done-bg);
  border-color: var(--check-done-border);
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--mint);
  margin-top: 2px;
  flex-shrink: 0;
}

.check-text {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
}

.check-item.done .check-text {
  text-decoration: line-through;
  color: var(--muted);
}

.check-del {
  color: var(--coral-ink);
  font-weight: 800;
  font-size: 0.82rem;
  min-width: 34px;
  min-height: 34px;
  border-radius: var(--radius-sm);
}

.check-del:hover {
  background: var(--coral-soft);
}

.add-check-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-add-check {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Empty & Error States (R-27) */
.empty-box,
.error-state-box {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px 18px;
  text-align: center;
}

.error-state-box {
  border-style: solid;
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral-ink);
}

.empty-title {
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 800;
}

.empty-sub {
  margin: 0 0 14px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.error-state-box .empty-sub {
  color: var(--coral-ink);
}

/* Footer Landmark (R-39) */
.app-footer {
  margin: 6px 16px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--muted);
}

.footer-link {
  font-weight: 700;
  color: var(--primary-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Bottom Nav Bar (5 Tabs) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: var(--nav-bg);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  z-index: 40;
}

@media (min-width: 520px) and (max-width: 767px) {
  .bottom-nav {
    border-radius: 0 0 18px 18px;
    bottom: 18px;
    max-width: 458px;
  }
}

.nav-item {
  position: relative;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-item.active {
  color: var(--primary-fg);
  background: var(--primary);
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: 4px;
  right: 14%;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--coral);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Bottom Sheets */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 14, 13, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-panel {
  width: 100%;
  max-width: 460px;
  max-height: 88dvh;
  background: var(--surface-elev);
  color: var(--ink);
  border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--handle-bg);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.sheet-header {
  padding: 6px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.sheet-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
}

.sheet-close {
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.sheet-close:hover {
  border-color: var(--border-strong);
}

.sheet-body {
  padding: 14px 16px 22px;
  overflow-y: auto;
  flex: 1;
}

.jurusan-item {
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.jurusan-item:hover {
  border-color: var(--border-strong);
}

.jurusan-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}

.jurusan-item-name {
  font-size: 0.81rem;
  font-weight: 700;
}

.jurusan-item-count {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}

.detail-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink);
}

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

.major-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.major-tag {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
}

.major-tag.match {
  background: var(--mint-soft);
  border-color: var(--mint);
  color: var(--mint-ink);
  font-weight: 700;
}

.demo-box {
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 11px 12px;
  margin-top: 12px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.demo-code-btn {
  margin-top: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  font-size: 0.75rem;
}

.disclaimer-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Radar 22 Instansi Sheet */
.radar-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.radar-stat-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px;
  text-align: center;
}

.radar-stat-k {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.radar-stat-v {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.radar-row-card {
  width: 100%;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 11px 12px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.radar-row-card:hover {
  border-color: var(--primary);
}

.radar-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.radar-row-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.radar-row-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.radar-row-nums strong {
  color: var(--ink);
}

.radar-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--progress-track);
  overflow: hidden;
}

.radar-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--mint);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px);
  transform: translateX(-50%) translateY(14px);
  z-index: 95;
  background: var(--toast-bg);
  color: var(--toast-ink);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   DASHBOARD ANALITIK (ARCHIVAL DECISION-FIRST LAYOUT)
   ========================================================================== */
.dash-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 14px;
}

.dash-header-top {
  margin-bottom: 10px;
}

.dash-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-quick-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--surface-soft);
}

.sort-chips-row::-webkit-scrollbar,
.check-target-scroll::-webkit-scrollbar,
.dash-quick-chips::-webkit-scrollbar,
.compare-scroll::-webkit-scrollbar {
  height: 7px;
}

.sort-chips-row::-webkit-scrollbar-track,
.check-target-scroll::-webkit-scrollbar-track,
.dash-quick-chips::-webkit-scrollbar-track,
.compare-scroll::-webkit-scrollbar-track {
  background: var(--surface-soft);
  border-radius: 999px;
}

.sort-chips-row::-webkit-scrollbar-thumb,
.check-target-scroll::-webkit-scrollbar-thumb,
.dash-quick-chips::-webkit-scrollbar-thumb,
.compare-scroll::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.sort-chips-row::-webkit-scrollbar-thumb:hover,
.check-target-scroll::-webkit-scrollbar-thumb:hover,
.dash-quick-chips::-webkit-scrollbar-thumb:hover,
.compare-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.dash-chip {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 11px;
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.73rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dash-chip:hover {
  border-color: var(--border-strong);
}

.dash-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
}

/* Archival Decision Spotlight (Replaces 4 Equal KPI Boxes) */
.dash-spotlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--ink);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-spotlight-primary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-spotlight-k {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-ink);
}

.dash-spotlight-v {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.dash-spotlight-sub {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

.dash-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  padding-top: 12px;
  gap: 10px;
}

.dash-metric-cell {
  min-width: 0;
}

.dash-metric-k {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.dash-metric-v {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Selected Major Editorial Banner */
.dash-major-banner {
  background: var(--inverted-bg);
  color: var(--inverted-fg);
  border: 1px solid var(--inverted-border);
  border-top: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 16px;
  margin-bottom: 14px;
}

.dash-major-rank {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: #223532;
  color: #e4eae8;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.dash-major-name {
  margin: 0 0 6px;
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.dash-major-sub {
  margin: 0 0 12px;
  font-size: 0.79rem;
  color: var(--inverted-muted);
  line-height: 1.42;
}

.dash-major-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-banner-btn {
  flex: 1;
  min-width: 140px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 0.79rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-banner-btn.primary {
  background: #ffffff;
  color: #141a18;
}

.dash-banner-btn.ghost {
  background: #223532;
  color: #f7f5f0;
  border: 1px solid #35504c;
}

/* Dashboard Asymmetric Panels */
.dash-panels-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.dash-stack-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 15px;
}

.dash-panel.full-span {
  grid-column: 1 / -1;
}

.dash-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-panel-title {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.25;
}

.dash-panel-sub {
  margin: 3px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.35;
}

.dash-mini-toggle {
  display: inline-flex;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}

.dash-mini-btn {
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.dash-mini-btn.active {
  background: var(--primary);
  color: var(--primary-fg);
}

.dash-stacked-bar {
  height: 10px;
  border-radius: 5px;
  background: var(--progress-track);
  overflow: hidden;
  display: flex;
  margin-bottom: 11px;
}

.dash-stacked-seg {
  height: 100%;
}

.seg-mint { background: var(--mint); }
.seg-amber { background: var(--amber); }
.seg-coral { background: var(--coral); }
.seg-violet { background: var(--primary); }
.seg-sky { background: var(--sky); }

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

.dash-legend-card {
  width: 100%;
  min-height: 44px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-legend-card:hover {
  border-color: var(--border-strong);
}

.dash-legend-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--ink);
}

.dash-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dash-legend-val {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.dash-legend-val strong {
  color: var(--ink);
}

.dash-bar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-bar-row {
  width: 100%;
  min-height: 44px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-bar-row:hover {
  border-color: var(--primary);
}

.dash-bar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dash-bar-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.index-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--primary-ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.dash-bar-val {
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dash-bar-track {
  height: 6px;
  border-radius: 3px;
  background: var(--progress-track);
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--primary);
}

.dash-bar-fill.fill-mint {
  background: var(--mint);
}

.dash-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--muted);
}

.dash-hist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.dash-hist-item {
  width: 100%;
  min-height: 44px;
  text-align: left;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-hist-item:hover {
  border-color: var(--primary);
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS-REDUCED-MOTION (R-39)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   RESPONSIVE TABLET & DESKTOP WEB LAYOUT (>= 768px & >= 960px)
   ========================================================================== */
@media (min-width: 768px) {
  body {
    padding: 0;
    background: var(--bg);
  }

  .app-shell {
    max-width: 1280px;
    width: 100%;
    min-height: 100dvh;
    padding-bottom: 32px;
  }

  .topbar {
    padding: 14px 24px 12px;
  }

  .topbar-meta-strip {
    padding: 6px 10px 6px 14px;
  }

  .main-content {
    padding: 20px 24px 24px;
  }

  .app-footer {
    margin: 8px 24px 16px;
  }

  .dash-spotlight {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
  }

  .dash-metric-strip {
    border-top: none;
    border-left: 1px solid var(--border);
    padding-top: 0;
    padding-left: 24px;
    gap: 20px;
    flex-shrink: 0;
  }

  .cards-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }

  .cards-stack .paywall-card,
  .cards-stack .empty-box,
  .cards-stack .error-state-box,
  .cards-stack .btn-load-more {
    grid-column: 1 / -1;
  }

  .sheet-backdrop {
    align-items: center;
    padding: 24px;
  }

  .sheet-panel {
    max-width: 580px;
    max-height: 85dvh;
    border-radius: 14px;
    border: 1px solid var(--border);
  }

  #sheet-radar .sheet-panel {
    max-width: 720px;
  }

  .sheet-handle {
    display: none;
  }

  .toast {
    bottom: 24px;
  }
}

@media (min-width: 960px) {
  .app-shell {
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    align-items: start;
    padding-bottom: 0;
  }

  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    padding: 14px 28px 12px;
  }

  .bottom-nav {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 132px;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    max-width: none;
    height: auto;
    margin: 20px 0 24px 24px;
    padding: 8px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
  }

  .nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.84rem;
    border-radius: var(--radius-md);
  }

  .nav-badge {
    position: static;
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .main-content {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 20px 28px 28px 20px;
  }

  .app-footer {
    grid-column: 2;
    grid-row: 3;
    margin: 0 28px 24px 20px;
  }

  .dash-panels-grid {
    grid-template-columns: 1.35fr 1fr;
    align-items: start;
  }

  .hero-card {
    padding: 20px;
  }

  .hero-title {
    font-size: 1.24rem;
  }
}

@media (min-width: 1220px) {
  .cards-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   TAB 5: SUMBER DATA & METODOLOGI ILMIAH
   ========================================================================== */
.method-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.method-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius-xl);
  padding: 16px;
}

.method-eyebrow {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.method-title {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.method-intro {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

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

.method-meta-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 11px;
}

.method-meta-k {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}

.method-meta-v {
  margin-top: 2px;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.method-meta-sub {
  margin-top: 2px;
  font-size: 0.69rem;
  color: var(--muted);
  line-height: 1.3;
}

.method-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
}

.method-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.method-num {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-ink);
  font-size: 0.74rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.method-card-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.method-lead {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--ink);
  line-height: 1.5;
}

.method-formula {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 10px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--ink);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.method-list {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.55;
}

.method-list li {
  margin-bottom: 5px;
}

.method-list strong {
  color: var(--ink);
}

.method-tier-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.method-tier-pill {
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
}

.method-tier-pill.is-mint {
  background: var(--mint-soft);
  border-color: var(--mint);
  color: var(--mint-ink);
}

.method-tier-pill.is-amber {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--amber-ink);
}

.method-tier-pill.is-coral {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral-ink);
}

.method-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.method-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  min-width: 360px;
}

.method-table th,
.method-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.method-table th {
  background: var(--surface-soft);
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.method-table tr:last-child td {
  border-bottom: none;
}

.method-details {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 8px 11px;
}

.method-details summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-ink);
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.method-details[open] summary {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .method-meta-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
