/* MANGUNI — gaya antarmuka */
:root {
  --ink: #141d3d;
  --ink-2: #3c4566;
  --muted: #6b7290;
  --line: #e3e1d8;
  --paper: #faf8f3;
  --card: #ffffff;
  --navy: #1d2b5a;
  --navy-2: #2e4185;
  --amber: #f2a93b;
  --amber-soft: #fdf1dc;
  --teal: #1f7a6d;
  --teal-soft: #e3f2ef;
  --rose: #b4413c;
  --rose-soft: #fbe9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 29, 61, .05), 0 8px 24px -12px rgba(20, 29, 61, .12);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--font); /* satu keluarga huruf di seluruh aplikasi */
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  font-size: 15.5px; line-height: 1.6;
}
a { color: var(--navy-2); }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand strong { display: block; font-family: var(--serif); font-size: 20px; letter-spacing: .06em; line-height: 1.1; }
.brand small { display: block; font-size: 11.5px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__nav { display: flex; gap: 6px; }
.topbar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.22); }
.topbar .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--navy); color: #fff; padding: 11px 20px; border-radius: 10px; font-weight: 600;
  transition: background .15s, transform .05s;
}
.btn-primary:hover { background: var(--navy-2); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; font-size: 14px; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
}
.btn-ghost:hover { background: #f1efe7; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* Composer */
.composer { padding: 48px 0 24px; }
.composer__title { font-family: var(--serif); font-size: clamp(28px, 4.2vw, 42px); line-height: 1.15; margin: 0 0 12px; max-width: 20ch; color: var(--navy); }
.composer__title em { font-style: normal; background: linear-gradient(transparent 62%, var(--amber-soft) 62%); }
.composer__lead { color: var(--ink-2); max-width: 68ch; margin: 0 0 22px; }
.composer__form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.composer__form textarea { width: 100%; border: 0; resize: vertical; min-height: 78px; outline: none; font-size: 17px; background: transparent; }
.composer__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; flex-wrap: wrap; }
.composer__row select { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; background: #fff; max-width: 100%; }
.is-embed .composer { padding-top: 20px; }
.is-embed .composer__title { font-size: 24px; }
.is-embed .composer__lead { font-size: 14px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.chips__label { font-size: 13px; color: var(--muted); }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px;
  font-size: 13px; cursor: pointer; color: var(--ink-2); text-align: left;
}
.chip:hover { border-color: var(--navy-2); color: var(--navy); }
.chip--static { cursor: default; }
.chip--static:hover { border-color: var(--line); color: var(--ink-2); }
.chip b { color: var(--muted); font-weight: 500; margin-left: 4px; }

/* Progress */
.progress { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 8px 0 20px; box-shadow: var(--shadow); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; counter-reset: s; }
.steps li { font-size: 12.5px; color: var(--muted); position: relative; padding-top: 30px; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; top: 0; left: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 12px; background: #eeece4; color: var(--muted);
}
.steps li.is-active { color: var(--ink); font-weight: 600; }
.steps li.is-active::before { background: var(--amber); color: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
.steps li.is-done { color: var(--teal); }
.steps li.is-done::before { content: "✓"; background: var(--teal); color: #fff; }
.progress__note { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(242,169,59,.25); } }

.alert { border-radius: 12px; padding: 14px 16px; margin: 0 0 20px; background: var(--rose-soft); color: var(--rose); border: 1px solid #f1c9c4; }
.alert--info { background: var(--amber-soft); color: #7a5112; border-color: #f3dcb1; }
.alert--scope { background: #eef0f8; color: var(--navy); border-color: #d5daee; }

/* Results */
.results { padding-bottom: 40px; }
.results__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0 18px; }
.results__head h2 { font-family: var(--serif); font-size: 26px; line-height: 1.25; margin: 2px 0 4px; color: var(--navy); }
.results__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 11.5px; color: var(--muted); margin: 0; font-weight: 600; }
.meta { color: var(--muted); font-size: 13.5px; margin: 0; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  background: none; border: 0; padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted);
  border-bottom: 2.5px solid transparent; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--amber); }
.tabs .count { background: #eeece4; border-radius: 999px; font-size: 11.5px; padding: 1px 7px; margin-left: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 0 0 12px; }
.card--accent { border-left: 4px solid var(--amber); }
.card--local { border-top: 3px solid var(--teal); }
.card--global { border-top: 3px solid var(--navy-2); }
.card__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.card__bar h3 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card { margin-bottom: 16px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tile b { display: block; font-family: var(--serif); font-size: 28px; color: var(--navy); line-height: 1.1; }
.tile span { font-size: 12.5px; color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 18px; }
.bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars__bar { width: 100%; max-width: 38px; background: var(--navy-2); border-radius: 5px 5px 0 0; position: relative; min-height: 2px; }
.bars--local .bars__bar { background: var(--teal); }
.bars__bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.bars__lbl { font-size: 11px; color: var(--muted); margin-top: 4px; }
.empty { color: var(--muted); font-size: 14px; font-style: italic; }

.prose p { margin: 0 0 10px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 20px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.list { margin: 0; padding-left: 18px; }
.list li { margin-bottom: 8px; }
.list--num li::marker { color: var(--amber); font-weight: 700; }

.cite {
  display: inline-block; font-size: 11.5px; font-weight: 700; line-height: 1; padding: 3px 6px; border-radius: 6px; margin: 0 1px;
  cursor: pointer; border: 0; vertical-align: 1px; background: #eef0f8; color: var(--navy-2);
}
.cite--L { background: var(--teal-soft); color: var(--teal); }
.cite--B { background: var(--amber-soft); color: #8a5a10; }

/* Ide riset */
.ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.idea { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.idea.is-best { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft), var(--shadow); }
.idea__no { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; display: flex; justify-content: space-between; }
.idea__no em { font-style: normal; color: #8a5a10; background: var(--amber-soft); border-radius: 6px; padding: 1px 7px; }
.idea h4 { font-family: var(--serif); font-size: 18px; line-height: 1.3; margin: 0; color: var(--navy); }
.meter { display: flex; align-items: center; gap: 10px; }
.meter__track { flex: 1; height: 8px; border-radius: 99px; background: #eeece4; overflow: hidden; }
.meter__fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--amber)); }
.meter b { font-size: 13px; white-space: nowrap; }
.idea dl { margin: 0; font-size: 13.5px; }
.idea dt { font-weight: 700; color: var(--ink-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }
.idea dd { margin: 2px 0 0; }
.idea p { margin: 0; font-size: 14px; }

/* Mind map */
.mindmap { overflow: auto; min-height: 280px; display: grid; place-items: center; background: #fcfbf8; border-radius: 10px; padding: 12px; }
.mindmap svg { max-width: 100%; height: auto; }
.code { background: #141d3d; color: #e6e9f5; padding: 14px; border-radius: 10px; overflow: auto; font-size: 13px; margin: 12px 0 0; white-space: pre-wrap; }

.theories { display: grid; gap: 12px; }
.theory { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.theory h4 { margin: 0 0 4px; font-size: 16px; color: var(--navy); }
.theory p { margin: 0 0 6px; font-size: 14.5px; }
.theory small { color: var(--muted); }

/* Sumber */
.sources { display: grid; gap: 20px; }
.src-group h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 0 0 10px; }
.src { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 12px 58px; position: relative; margin-bottom: 10px; transition: box-shadow .3s; }
.src.is-flash { box-shadow: 0 0 0 3px var(--amber); }
.src__code { position: absolute; left: 14px; top: 13px; font-weight: 800; font-size: 13px; border-radius: 8px; padding: 4px 0; width: 34px; text-align: center; background: #eef0f8; color: var(--navy-2); }
.src--L .src__code { background: var(--teal-soft); color: var(--teal); }
.src--B .src__code { background: var(--amber-soft); color: #8a5a10; }
.src__title { font-weight: 600; line-height: 1.35; }
.src__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.src details { margin-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.src summary { cursor: pointer; color: var(--navy-2); font-size: 13px; }

/* Chat */
.chat { margin-top: 24px; }
.chat__log { display: flex; flex-direction: column; gap: 12px; max-height: 520px; overflow-y: auto; margin-bottom: 4px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; }
.msg--user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg--bot { align-self: flex-start; background: #f4f2ec; border-bottom-left-radius: 4px; }
.msg--bot.is-typing { color: var(--muted); font-style: italic; }
.chat__form { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.chat__form textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: none; min-height: 44px; max-height: 160px; outline: none; background: #fff; }
.chat__form textarea:focus, .composer__form:focus-within { border-color: var(--navy-2); }

.skeleton { height: 70px; border-radius: 8px; background: linear-gradient(90deg, #f1efe7 25%, #f8f6f0 50%, #f1efe7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Dialog */
.dlg { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(20,29,61,.45); }
.dlg__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dlg__head h3 { margin: 0; font-size: 16px; }
.history { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow: auto; }
.history a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.history a:hover { background: #f4f2ec; }
.history small { display: block; color: var(--muted); }

.foot { color: var(--muted); font-size: 12.5px; padding: 24px 20px 40px; text-align: center; }
.is-embed .foot { padding-bottom: 16px; }

@media (max-width: 900px) {
  .ideas { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .brand small { display: none; }
  .composer { padding-top: 28px; }
  .composer__row .btn-primary { width: 100%; justify-content: center; }
  .composer__row select { width: 100%; }
  .msg { max-width: 96%; }
}

/* Cetak */
@media print {
  .topbar, .composer, .progress, .results__actions, .tabs, .chat__form, #chatSuggest, .foot, #btnSvg, #btnCode { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .panel { display: block !important; }
  .card, .idea, .src { box-shadow: none; break-inside: avoid; }
  .ideas { grid-template-columns: 1fr; }
}
.composer__alt { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--navy-2); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.src, .chat { scroll-margin-top: 84px; }
.progress { scroll-margin-top: 80px; }
/* Mode tertanam (widget SLiMS): header ringkas */
.is-embed .topbar { position: static; background: transparent; }
.is-embed .brand { display: none; }
.is-embed .topbar__inner { height: auto; padding-top: 12px; justify-content: flex-end; }
.is-embed .topbar .btn-ghost { color: var(--ink-2); border-color: var(--line); }
.is-embed .topbar .btn-ghost:hover { background: #f1efe7; }
.is-embed .composer { padding-top: 0; }
.is-embed .src, .is-embed .chat, .is-embed .progress { scroll-margin-top: 12px; }

/* v1.1 — kelompok sumber baru */
.cite--R { background: #f1e9fb; color: #6b3fa0; }
.cite--N { background: #fdecef; color: #b23a56; }
.src--R .src__code { background: #f1e9fb; color: #6b3fa0; }
.src--N .src__code { background: #fdecef; color: #b23a56; }
.card--national { border-top: 3px solid #b23a56; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-3 > .card { margin-bottom: 16px; }
.srcpick { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.srcpick__item { position: relative; cursor: pointer; }
.srcpick__item input { position: absolute; opacity: 0; pointer-events: none; }
.srcpick__item span { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: #fff; user-select: none; }
.srcpick__item input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.srcpick__item input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.oa { display: inline-block; font-size: 11px; font-weight: 700; color: #b8620a; background: var(--amber-soft); border-radius: 5px; padding: 1px 6px; margin-left: 6px; text-decoration: none; vertical-align: 1px; }
.legend { font-size: 12px; color: var(--muted); margin: 8px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.lg--L { background: var(--teal); } .lg--R { background: #8a5cc4; } .lg--N { background: #c9566f; }
.bars__stack { width: 100%; max-width: 38px; display: flex; flex-direction: column-reverse; position: relative; border-radius: 5px 5px 0 0; overflow: visible; }
.bars__seg { width: 100%; }
.bars__seg--L { background: var(--teal); } .bars__seg--R { background: #8a5cc4; } .bars__seg--N { background: #c9566f; }
.bars__stack > span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--ink-2); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; gap: 0; } }
@media (max-width: 680px) { .srcpick { flex-basis: 100%; } }

/* ================= v1.2 ================= */
h1, h2, h3, h4, .brand strong, .tile b { letter-spacing: -0.01em; }
.composer__title { font-weight: 800; }
.results__head h2, .idea h4 { font-weight: 700; }
.code, .log { font-family: var(--mono); }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* segmented control */
.seg { display: inline-flex; background: #f1efe7; border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg__btn { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg__btn.is-on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(20,29,61,.12); }
.seg--sm .seg__btn { padding: 3px 8px; font-size: 11.5px; }

/* kotak zoom */
.zoombox { position: relative; border: 1px solid var(--line); border-radius: 12px; background: #fcfbf8; overflow: hidden; }
.zoombox__stage { height: 440px; overflow: hidden; cursor: grab; touch-action: none; position: relative; display: block; padding: 0; min-height: 0; }
.zoombox--tall .zoombox__stage { height: 520px; }
.zoombox__stage.is-drag { cursor: grabbing; }
.zoombox__stage > .empty, .zoombox__stage > .skeleton { margin: 16px; }
.zoombox__inner { transform-origin: 0 0; display: inline-block; will-change: transform; }
.zoombox__inner svg { display: block; max-width: none !important; height: auto; }
.zoombox__tools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.zoombox__tools button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 16px; font-weight: 700; color: var(--ink-2); cursor: pointer; line-height: 1; }
.zoombox__tools button:hover { background: var(--amber-soft); color: var(--navy); }
.zoombox.is-max { position: fixed; inset: 10px; z-index: 1000; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.zoombox.is-max .zoombox__stage { height: 100%; }
body.has-max { overflow: hidden; }
.mindmap { display: block; min-height: 0; padding: 0; background: transparent; place-items: initial; }
.mindmap g.node.is-clickable { cursor: pointer; }
.mindmap g.node.is-clickable:hover rect, .mindmap g.node.is-clickable:hover polygon, .mindmap g.node.is-clickable:focus rect { stroke: var(--amber) !important; stroke-width: 3px !important; }

/* peta bibliometrik */
.bmap { font-family: var(--font); }
.bmap__links line { stroke-opacity: .35; transition: stroke-opacity .15s; }
.bmap__node { cursor: pointer; outline: none; }
.bmap__node circle { fill-opacity: .9; stroke: #fff; stroke-width: 2; transition: opacity .15s; }
.bmap__node text { text-anchor: middle; fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: #fcfbf8; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.bmap.is-focus .bmap__node { opacity: .18; }
.bmap.is-focus .bmap__node.is-hi { opacity: 1; }
.bmap.is-focus .bmap__links line { stroke-opacity: .05; }
.bmap.is-focus .bmap__links line.is-hi { stroke-opacity: .8; }
.ygrad { display: inline-block; width: 60px; height: 9px; border-radius: 4px; vertical-align: middle; background: linear-gradient(90deg, rgb(46,65,133), rgb(31,122,109), rgb(242,169,59)); }

/* panel referensi */
.refpanel { margin-top: 14px; border: 1px solid #f3dcb1; background: #fffaf0; border-radius: 12px; padding: 14px 16px; }
.refpanel__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.reflist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.reflist li { font-size: 14px; line-height: 1.4; }
.reflist small { display: block; color: var(--muted); margin-top: 2px; padding-left: 2px; }
.refpanel__more { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.chip--accent { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip--accent:hover { color: #fff; background: var(--navy-2); }
a.chip { text-decoration: none; }

/* latar belakang */
.bg { list-style: none; margin: 12px 0 0; padding: 0; position: relative; }
.bg::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--navy-2), var(--amber)); opacity: .35; }
.bg__item { display: grid; grid-template-columns: 36px 1fr; gap: 14px; margin-bottom: 14px; position: relative; }
.bg__num { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; display: grid; place-items: center; z-index: 1; }
.bg__item:nth-child(4) .bg__num { background: var(--amber); color: var(--ink); }
.bg__body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); min-width: 0; }
.bg__body h4 { margin: 0; font-size: 16px; color: var(--navy); }
.bg__sub { margin: 2px 0 8px; font-size: 12.5px; color: var(--muted); }
.bg__body p { margin: 0 0 8px; }
.bg__body ol { margin: 0; padding-left: 20px; }

/* teori dapat diklik */
.theory { padding: 0; overflow: hidden; transition: border-color .15s; }
.theory.is-open { border-color: var(--navy-2); }
.theory__head { display: flex; width: 100%; text-align: left; gap: 12px; justify-content: space-between; align-items: flex-start; background: none; border: 0; padding: 14px 16px; cursor: pointer; font: inherit; color: inherit; }
.theory__head:hover { background: #faf9f5; }
.theory__head strong { display: block; font-size: 16px; color: var(--navy); margin-bottom: 4px; }
.theory__desc { display: block; font-size: 14.5px; margin-bottom: 6px; }
.theory__head small { color: var(--muted); }
.theory__chev { font-size: 14px; color: var(--muted); transition: transform .2s; margin-top: 4px; }
.theory.is-open .theory__chev { transform: rotate(180deg); }
.theory__exp { border-top: 1px solid var(--line); padding: 4px 18px 14px; background: #fcfbf8; font-size: 14.5px; }
.theory__exp h3 { font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--navy); margin: 14px 0 6px; }

/* sitasi */
.citebox { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.citebox__bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.citebox__lbl { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.citebox__bar .btn-sm { margin-left: auto; }
.citebox__txt { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; padding-left: 1.6em; text-indent: -1.6em; word-break: break-word; }
.searchlinks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; }
.searchlinks__lbl { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.biblio { margin-top: 20px; }
.biblio select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; font-size: 13px; }
.biblist { margin: 6px 0 0; padding: 0; list-style: none; }
.biblist li { padding-left: 2em; text-indent: -2em; margin-bottom: 10px; font-size: 14px; line-height: 1.55; word-break: break-word; }
.biblist.is-num { list-style: none; }

/* ======= responsif ======= */
@media (max-width: 680px) {
  body { font-size: 15px; }
  .card, .bg__body { padding: 14px; }
  .composer__title { font-size: 26px; }
  .results__head h2 { font-size: 21px; }
  .results__actions .btn-ghost { padding: 6px 10px; font-size: 13px; }
  .tabs { margin-left: -16px; margin-right: -16px; padding: 0 12px; mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent); }
  .tabs button { padding: 10px 11px; font-size: 13.5px; }
  .tiles { gap: 8px; }
  .tile { padding: 12px; }
  .tile b { font-size: 22px; }
  .zoombox__stage { height: 340px; }
  .zoombox--tall .zoombox__stage { height: 400px; }
  .src { padding: 12px 12px 12px 52px; }
  .src__code { left: 10px; }
  .citebox .seg { order: 3; width: 100%; }
  .bg::before { left: 13px; }
  .bg__item { grid-template-columns: 28px 1fr; gap: 10px; }
  .bg__num { width: 28px; height: 28px; font-size: 13px; }
  .biblio .card__bar { flex-direction: column; align-items: flex-start; }
  .steps li { font-size: 11.5px; }
  .chips { gap: 6px; }
  .chip { font-size: 12.5px; }
}
/* widget (iframe) pada layar kecil: hemat ruang */
@media (max-width: 680px) {
  .is-embed .composer__title, .is-embed .composer__lead { display: none; }
  .is-embed .composer { padding-top: 4px; }
  .is-embed #examples { display: none; }
}
@media print {
  .zoombox__tools, .citebox__bar, .refpanel, .searchlinks, .biblio .btnrow { display: none !important; }
  .zoombox { border: 0; } .zoombox__stage { height: auto; overflow: visible; }
  .theory__exp { display: block !important; }
}

/* ================= v1.3: ide riset multi-pilih ================= */
.ideas { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.idea.is-hidden { display: none; }
.idea.is-sel { border-color: var(--navy-2); box-shadow: 0 0 0 3px #dfe5f7, var(--shadow); }
.idea__no em { background: var(--teal-soft); color: var(--teal); }
.ibadges { display: flex; flex-wrap: wrap; gap: 4px; }
.ibadge { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: #f1efe7; border-radius: 6px; padding: 2px 7px; }
.idea__act { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.ipick { border: 1.5px solid var(--navy-2); background: #fff; color: var(--navy-2); border-radius: 9px; padding: 7px 12px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.ipick:hover { background: #eef0f8; }
.ipick[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.ideabar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; position: sticky; top: 64px; z-index: 5; background: var(--paper); padding: 8px 0; }
.is-embed .ideabar { top: 0; }
.ideabar__act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ideabar__count { font-size: 13px; color: var(--muted); font-weight: 600; }
.ideaprefs { padding: 0; margin-bottom: 14px; }
.ideaprefs > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--navy); list-style: none; }
.ideaprefs > summary::-webkit-details-marker { display: none; }
.ideaprefs > summary::before { content: "⚙ "; }
.ideaprefs > summary .muted { font-weight: 500; font-size: 13px; }
.ideaprefs__form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; padding: 0 18px 18px; }
.ideaprefs__form label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.ideaprefs__form input, .ideaprefs__form select, .ideaprefs__form textarea { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; font-weight: 400; font-size: 14px; }
.ideaprefs__wide { grid-column: 1 / -1; }
.ideaswitch { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.ideaswitch__lbl { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ideaswitch__btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; cursor: pointer; text-align: left; font-size: 12px; font-weight: 700; color: var(--navy-2); max-width: 280px; }
.ideaswitch__btn span { display: block; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ideaswitch__btn.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.ideaswitch__btn.is-on span { color: #dfe4f5; }
.ideaswitch__btn.is-todo { border-style: dashed; }
.devph { text-align: center; padding: 40px 16px; }
.devph p { margin: 0 0 8px; }
.bg__title { font-size: 16px; color: var(--navy); margin: 4px 0 6px; text-transform: none; letter-spacing: 0; }
.bg__ph { list-style: none; }
@media (max-width: 680px) {
  .ideaprefs__form { grid-template-columns: 1fr; }
  .ideabar { top: 64px; }
  .ideabar__act { width: 100%; justify-content: space-between; }
  .ideaswitch__btn { max-width: 100%; }
}

/* v1.5 — data statistik BPS [D] */
.cite--D { background: #e6f4fb; color: #0f6c94; }
.src--D .src__code { background: #e6f4fb; color: #0f6c94; }

/* ================= v1.6: akses anggota ================= */
.who { position: relative; }
.who > summary { list-style: none; cursor: pointer; padding: 4px 10px 4px 4px; }
.who > summary::-webkit-details-marker { display: none; }
.who__av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--amber); color: var(--navy); font-weight: 800; font-size: 13px; }
.who__name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.who__menu p { margin: 0; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.35; }
.who__menu small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.who__menu a { display: block; padding: 9px 10px; margin-top: 4px; border-radius: 8px; color: var(--rose); text-decoration: none; font-weight: 600; font-size: 14px; }
.who__menu a:hover { background: var(--rose-soft); }
.is-embed .who__av { background: var(--navy); color: #fff; }
@media (max-width: 560px) { .who__name { display: none; } .who > summary { padding: 4px; } }

body.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(1200px 500px at 50% -10%, #e7ebf7, transparent), var(--paper); }
.gate__box { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 28px 26px 22px; text-align: center; }
.gate__logo { display: block; margin: 0 auto 6px; }
.gate__brand { margin: 0 0 14px; font-weight: 800; letter-spacing: .08em; color: var(--navy); font-size: 18px; line-height: 1.2; }
.gate__brand small { display: block; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.gate__title { font-size: 20px; margin: 0 0 6px; color: var(--ink); }
.gate__text { margin: 0 0 16px; color: var(--ink-2); font-size: 14.5px; }
.gate__who { margin: -6px 0 14px; font-size: 13.5px; color: var(--muted); }
.gate__err { background: var(--rose-soft); color: var(--rose); border-radius: 10px; padding: 9px 12px; font-size: 14px; margin: 0 0 14px; }
.gate__btn { width: 100%; justify-content: center; text-decoration: none; padding: 12px 18px; }
.gate__note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.gate__or { display: flex; align-items: center; gap: 10px; margin: 18px 0 12px; color: var(--muted); font-size: 12.5px; }
.gate__or::before, .gate__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gate__form { text-align: left; }
.gate__form label { display: block; font-weight: 600; font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; }
.gate__form input { display: block; width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; font-weight: 400; }
.gate__form input:focus { outline: 2px solid #c9d1ee; border-color: var(--navy-2); }
.gate__pw { position: relative; display: block; }
.gate__pw input { padding-right: 44px; }
.gate__eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); margin-top: 2px; border: 0; background: none; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-size: 15px; opacity: .7; }
.gate__eye:hover { background: #f1efe7; opacity: 1; }
.gate__links { margin: 14px 0 0; font-size: 13.5px; }
.is-embed.gate { background: var(--paper); padding: 12px; }
.is-embed .gate__box { box-shadow: none; }
