/* ============================================================
   Dokumentasi Motion (Bahasa Indonesia) — visual redesign
   Dark ink + acid-lime accent (Motion's sporty world),
   light readable docs body. Plain HTML + this one file.
   ============================================================ */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f8f5;
  --ink: #101613;
  --ink-soft: #2a332e;
  --muted: #5d6b62;
  --line: #e3e8e3;
  --dark: #0a0f0d;
  --dark-2: #101713;
  --lime: #9aff47;
  --lime-deep: #6fd61f;
  --green: #157a37;
  --green-deep: #0e5c28;
  --green-soft: #eaf7ee;
  --amber-soft: #fff8e6;
  --amber-line: #ecd9a0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(10, 15, 13, .06), 0 8px 24px rgba(10, 15, 13, .07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 17px;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--lime); color: var(--dark); }

/* ---------- topbar (slim) ---------- */
header.topbar {
  background: var(--dark);
  color: #fff;
  padding: 7px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--lime);
}
header.topbar .brand {
  font-weight: 800;
  letter-spacing: .05em;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}
header.topbar .brand span { color: var(--lime); }
header.topbar .brand-link { color: #fff; }
header.topbar .brand-link:hover { text-decoration: none; }
header.topbar .badge-id {
  background: var(--lime);
  color: var(--dark);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
header.topbar .orig {
  margin-left: auto;
  color: #cfd8d2;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #33453a;
  border-radius: 999px;
  padding: 4px 11px;
  transition: border-color .15s, background .15s, color .15s;
}
header.topbar .orig:hover { border-color: var(--lime); background: rgba(154, 255, 71, .08); color: #fff; text-decoration: none; }

/* hamburger — like docs.motion.game, top-left */
.hamburger {
  flex: none;
  width: 34px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid #33453a;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color .15s, background .15s;
}
.hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: background .15s;
}
.hamburger:hover { border-color: var(--lime); background: rgba(154, 255, 71, .08); }
.hamburger:hover span { background: var(--lime); }

/* backdrop for the mobile drawer */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 13, .55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 25;
}
body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

/* desktop: hamburger collapses the sidebar */
body.nav-collapsed nav.sidebar { display: none; }

/* ---------- layout ---------- */
.layout { display: flex; align-items: flex-start; max-width: 1200px; margin: 0 auto; }
nav.sidebar {
  flex: 0 0 258px;
  position: sticky;
  top: 38px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 24px 14px 32px 24px;
  border-right: 1px solid var(--line);
  background: var(--bg);
}
nav.sidebar h3 {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 24px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
nav.sidebar h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lime);
  flex: none;
}
nav.sidebar h3:first-child { margin-top: 0; }
nav.sidebar a {
  display: block;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.45;
  padding: 7px 10px 7px 12px;
  border-radius: 8px;
  margin: 1px 0;
  border-left: 3px solid transparent;
  transition: background .12s, border-color .12s;
}
nav.sidebar a:hover { background: var(--bg-soft); text-decoration: none; color: var(--ink); }
nav.sidebar a.active {
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 700;
  border-left-color: var(--lime-deep);
}

main.content { flex: 1; min-width: 0; padding: 36px 44px 72px; }
main.content article { max-width: 780px; }
main.content h1 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
  margin: 6px 0 18px;
}
main.content h2 {
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -.01em;
  font-weight: 800;
  margin: 40px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
main.content h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--lime);
  margin-right: 10px;
  vertical-align: 1px;
}
main.content h3 { font-size: 19px; line-height: 1.35; font-weight: 750; margin: 28px 0 10px; }
main.content h4 { font-size: 16.5px; font-weight: 750; margin: 22px 0 8px; }
main.content p { margin: 0 0 15px; }
main.content ul, main.content ol { margin: 0 0 17px; padding-left: 24px; }
main.content li { margin: 6px 0; }
main.content li > p { margin: 0; }
main.content img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 10px 0 18px;
  box-shadow: var(--shadow);
  display: block;
}
main.content strong { font-weight: 700; }
main.content hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }

/* tables — dark header, zebra rows, scroll on small screens */
.table-wrap { overflow-x: auto; margin: 10px 0 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table { border-collapse: collapse; width: 100%; margin: 0; font-size: 15px; }
main.content th, main.content td { border-bottom: 1px solid var(--line); padding: 10px 14px; text-align: left; }
main.content th {
  background: var(--dark);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
main.content tbody tr:nth-child(even) { background: var(--bg-soft); }
main.content tbody tr:last-child td { border-bottom: none; }
main.content td { font-variant-numeric: tabular-nums; }
main.content code {
  background: #eef2ee;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: .88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- hero (home) ---------- */
.hero {
  background:
    radial-gradient(420px 180px at 85% -10%, rgba(154, 255, 71, .35), transparent 70%),
    radial-gradient(300px 160px at 8% 110%, rgba(154, 255, 71, .16), transparent 70%),
    linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 34px 32px 30px;
  margin: 0 0 30px;
  box-shadow: var(--shadow);
}
.hero h2 {
  border: none;
  margin: 14px 0 10px;
  padding: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.hero h2::before { display: none; }
.hero p { color: #c9d4cc; margin: 0 0 12px; font-size: 16.5px; }
.hero p:last-child { margin-bottom: 0; }
.hero a { color: var(--lime); font-weight: 600; }
.hero .hero-badge {
  display: inline-block;
  background: var(--lime);
  color: var(--dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 12px;
}
.hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.hero .btn {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  border-radius: 999px;
  padding: 10px 20px;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.hero .btn:hover { text-decoration: none; transform: translateY(-1px); }
.hero .btn-primary { background: var(--lime); color: var(--dark); box-shadow: 0 4px 16px rgba(154, 255, 71, .35); }
.hero .btn-primary:hover { background: #b2ff70; }
.hero .btn-ghost { border: 1px solid #4a5a4f; color: #fff; }
.hero .btn-ghost:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- section cards (home) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0 0 34px;
}
.cards a.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: #fff;
  color: var(--ink);
  border-top: 3px solid var(--lime);
  box-shadow: 0 1px 2px rgba(10, 15, 13, .04);
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.cards a.card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #c9d4c9;
  border-top-color: var(--lime-deep);
}
.cards .card-kicker {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--green);
}
.cards .card-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; margin: 4px 0 4px; }
.cards .card-title::after { content: " \2192"; color: var(--lime-deep); }
.cards .card-desc { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin: 0; }

/* ---------- prev / next ---------- */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  background: #fff;
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
.pager a:hover { text-decoration: none; border-color: var(--lime-deep); box-shadow: var(--shadow); transform: translateY(-1px); }
.pager .lbl { display: block; font-size: 11.5px; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px; }
.pager .next { text-align: right; }
.pager .prev, .pager .next { flex: 1; }
.pager .prev:empty, .pager .next:empty { border: none; padding: 0; }

footer.site {
  background: var(--dark);
  color: #9fb0a4;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 22px 24px 30px;
  text-align: center;
  border-top: 2px solid var(--lime);
}
footer.site a { color: var(--lime); }
footer.site .foot-brand { color: #fff; font-weight: 800; letter-spacing: .05em; }
footer.site .foot-note {
  font-size: 12px;
  color: #7e9084;
  max-width: 720px;
  margin: 8px auto 0;
  line-height: 1.55;
}
footer.site .foot-note a { color: #a9b8ae; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  main.content { padding: 28px 28px 56px; }
  main.content h1 { font-size: 32px; }
  .hero h2 { font-size: 26px; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .layout { flex-direction: column; align-items: stretch; }
  /* mobile: sidebar becomes a slide-in drawer, hidden behind the hamburger */
  nav.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 30;
    width: min(300px, 85vw);
    height: 100dvh;
    flex: none;
    display: block;
    border-right: 1px solid var(--line);
    border-bottom: none;
    padding: 20px 16px 32px 20px;
    background: #fff;
    box-shadow: 0 0 40px rgba(10, 15, 13, .3);
    transform: translateX(-102%);
    transition: transform .22s ease;
    overflow-y: auto;
  }
  body.nav-open nav.sidebar { transform: translateX(0); }
  nav.sidebar h3 { margin-top: 20px; }
  nav.sidebar h3:first-child { margin-top: 0; }
  main.content { padding: 24px 20px 48px; }
  header.topbar { padding: 7px 14px; gap: 8px; }
  header.topbar .orig { margin-left: 0; }
  .hero { padding: 26px 22px; border-radius: 14px; }
  .pager { flex-direction: column; }
  .pager .next { text-align: left; }
}
@media (max-width: 480px) {
  nav.sidebar { grid-template-columns: 1fr; }
  main.content h1 { font-size: 28px; }
  .hero h2 { font-size: 23px; }
  .notice { font-size: 13px; }
}
