
:root {
  --hl: #14a39d;
  --ok: #4cc38a; --ok-bg: rgba(76, 195, 138, .14);
  --warn: #f2b84b; --warn-bg: rgba(242, 184, 75, .14);
  --bad: #ff6b6b; --bad-bg: rgba(255, 107, 107, .14);
}
:root[data-theme="light"] {
  --hl: #00726f;
  --ok: #1d7a4c; --ok-bg: #e3f4ea;
  --warn: #8a5a00; --warn-bg: #fdf1d8;
  --bad: #b42318; --bad-bg: #fdecea;
}
body.rg-site { --max: 1200px; overflow-x: hidden; }
.rg-page { padding-top: 24px; padding-bottom: 64px; min-width: 0; }
nav.rg-crumbs, nav.rg-years, nav.rg-pager, nav.rg-toc { position: static; z-index: auto; border-bottom: 0; background: none; backdrop-filter: none; transition: none; }
.rg-page a:focus-visible, .rg-page summary:focus-visible { outline: 2px solid var(--hl); outline-offset: 3px; border-radius: 4px; }
.rg-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13.5px; color: var(--faint); margin-bottom: 24px; }
.rg-crumbs li + li::before { content: '›'; margin-right: 8px; color: var(--faint); }
.rg-crumbs a { color: var(--muted); }
.rg-crumbs a:hover { color: var(--text); }
.rg-crumbs [aria-current] { color: var(--text); }
.rg-hero { margin-bottom: 48px; max-width: 820px; }
.rg-hero.sm { margin-bottom: 32px; }
.rg-kick { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hl); margin-bottom: 16px; }
.rg-kick a { color: inherit; }
.rg-kick a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rg-hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; overflow-wrap: anywhere; }
.rg-hero.sm h1 { font-size: clamp(26px, 3.6vw, 38px); }
.rg-lede { margin-top: 16px; font-size: 17px; color: var(--muted); max-width: 680px; }
.rg-h2 { font-size: 22px; font-weight: 750; letter-spacing: -.01em; margin-bottom: 16px; }
.rg-label { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.rg-mono { font-size: 13px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.rg-sec { margin-bottom: 48px; }
.rg-search { display: flex; gap: 8px; margin-top: 24px; max-width: 600px; }
.rg-search input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 11px 14px; }
.rg-search input::placeholder { color: var(--faint); }
.rg-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.rg-kinds { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.rg-kinds a { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); transition: background .15s, border-color .15s; }
.rg-kinds a:hover { background: var(--card-hover); border-color: var(--hl); }
.rg-kinds b { font-size: 20px; font-weight: 800; }
.rg-kinds span { grid-column: 1; font-size: 13.5px; color: var(--muted); }
.rg-kinds em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; font-size: 15px; font-weight: 700; color: var(--hl); font-variant-numeric: tabular-nums; }
.rg-years { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.rg-years a { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.rg-years a:hover { color: var(--text); border-color: var(--hl); }
.rg-years a[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
.rg-years em { font-style: normal; font-size: 12px; opacity: .7; }
.rg-list, .rg-hits { list-style: none; border-top: 1px solid var(--border-soft); }
.rg-item, .rg-hit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 0; border-bottom: 1px solid var(--border-soft); }
.rg-item > a, .rg-hit > a { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rg-item-name { font-weight: 700; font-size: 16px; }
.rg-item > a:hover .rg-item-name, .rg-hit > a:hover .rg-item-name { color: var(--hl); }
.rg-item-about { font-size: 14.5px; color: var(--muted); overflow-wrap: anywhere; }
.rg-item-note { font-size: 12.5px; color: var(--faint); }
.rg-out .rg-item-name::after { content: ' ↗'; color: var(--faint); font-weight: 500; }
.rg-hit { display: block; }
.rg-hit p { margin-top: 8px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.rg-empty { color: var(--muted); padding: 24px 0; }
.rg-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--ok-bg); color: var(--ok); }
.rg-badge.diubah { background: var(--warn-bg); color: var(--warn); }
.rg-badge.dicabut { background: var(--bad-bg); color: var(--bad); }
.rg-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; margin: 32px 0; }
.rg-doc { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.rg-main { min-width: 0; max-width: 780px; }
.rg-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 24px; max-height: calc(100vh - 104px); overflow: auto; }
.rg-facts { border: 1px solid var(--border); border-radius: 16px; background: var(--card); padding: 8px 20px; margin-bottom: 24px; }
.rg-facts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 14.5px; }
.rg-facts > div:last-child { border-bottom: 0; }
.rg-facts dt { color: var(--faint); font-weight: 600; }
.rg-facts dd { overflow-wrap: anywhere; }
.rg-facts a, .rg-status a, .rg-rel a, .rg-see a, .rg-more a, .rg-disclaimer a { color: var(--hl); font-weight: 600; }
.rg-facts a:hover, .rg-status a:hover, .rg-rel a:hover, .rg-see a:hover, .rg-more a:hover, .rg-disclaimer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rg-status { margin-left: 4px; }
.rg-note { margin-bottom: 24px; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--text); font-size: 14.5px; border-left: 3px solid var(--warn); }
.rg-note a { color: var(--hl); font-weight: 600; }
.rg-note a:hover { text-decoration: underline; text-underline-offset: 3px; }
.rg-lang { margin: 0 0 12px; font-size: 13.5px; color: var(--faint); }
.rg-lang:empty { display: none; }
.rg-rel { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 32px; margin-bottom: 32px; }
.rg-rel h3 { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.rg-rel ul { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.rg-rel summary { cursor: pointer; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.rg-rel details[open] summary { margin-bottom: 6px; }
.rg-open, .rg-lamp { margin: 0 0 32px; border: 1px solid var(--border); border-radius: 16px; padding: 4px 20px; }
.rg-open summary, .rg-lamp summary { cursor: pointer; padding: 12px 0; font-weight: 650; }
.rg-open[open] summary, .rg-lamp[open] summary { border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; }
.rg-open > p { font-size: 14.5px; color: var(--muted); margin-bottom: 8px; }
.rg-bab { margin-bottom: 16px; }
.rg-bab-h { font-size: 15px; font-weight: 800; letter-spacing: .12em; color: var(--hl); padding: 24px 0 8px; border-top: 1px solid var(--border); scroll-margin-top: 88px; }
.rg-pasal { padding: 16px 0; scroll-margin-top: 88px; }
.rg-pasal h3 { font-size: 17px; font-weight: 750; margin-bottom: 8px; }
.rg-pasal h3 a:hover { color: var(--hl); }
.rg-pasal p, .rg-close p { font-size: 16.5px; line-height: 1.75; margin-bottom: 8px; overflow-wrap: anywhere; }
.rg-pasal p.rg-li { padding-left: 28px; text-indent: -20px; }
.rg-pasal p.rg-ay { padding-left: 0; }
.rg-pasal:target { background: var(--accent-soft); border-radius: 12px; padding-left: 16px; padding-right: 16px; margin: 0 -16px; }
.rg-pasal.short { padding: 10px 0; }
.rg-pasal.short h3 { margin-bottom: 2px; }
.rg-see, .rg-more { font-size: 14px; }
.rg-close { margin: 16px 0 32px; color: var(--muted); }
.rg-expl { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border); }
.rg-expl .rg-pasal p { color: var(--muted); }
.rg-one p { font-size: 18px; }
.rg-one { margin-bottom: 16px; }
.rg-disclaimer { margin-top: 32px; padding-top: 24px; font-size: 13.5px; color: var(--faint); }
.rg-ask { border: 1px solid var(--border); border-radius: 20px; padding: 20px; background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--card); }
.rg-ask-q { font-size: 17px; font-weight: 750; margin-bottom: 8px; }
.rg-ask-sub { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.rg-ask .btn { width: 100%; justify-content: center; text-align: center; white-space: normal; }
.rg-toc ol { list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.rg-toc a { display: inline-block; padding: 4px 0; color: var(--muted); font-weight: 600; }
.rg-toc a:hover { color: var(--hl); }
.rg-toc span { color: var(--faint); font-size: 12.5px; }
@media (max-width: 1000px) {
  .rg-doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rg-side { position: static; order: -1; max-height: none; overflow: visible; }
  .rg-toc { display: none; }
}
@media (max-width: 620px) {
  .rg-page.wrap { padding-left: 16px; padding-right: 16px; }
  .rg-hero { margin-bottom: 32px; }
  .rg-facts { padding: 4px 16px; }
  .rg-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rg-search .btn { padding-left: 16px; padding-right: 16px; }
  .rg-pasal p, .rg-close p { font-size: 16px; }
  .rg-one p { font-size: 17px; }
  .rg-kinds { grid-template-columns: minmax(0, 1fr); }
}
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--card, var(--bg)); color: var(--text); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s, background .15s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--card-hover); }
.to-top:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; }
@media (max-width: 640px) { .to-top { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
