/* Dokumentasi Noviot — tema terang bersih, aksen navy & amber Noviot. */
:root {
  --navy: #0b101d;
  --amber: #f59e0b;
  --ink: #1c2432;
  --muted: #5b6a80;
  --line: #e3e8f0;
  --bg-soft: #f6f8fb;
  --code-bg: #0b101d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
}
a { color: #b45309; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  background: var(--navy); color: #fff;
  padding: 10px 20px;
}
.brand { color: #fff; font-weight: 800; letter-spacing: 0.4px; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; flex: 0 0 auto; }
.brand-iot { color: var(--amber); }
.brand-sub { color: #93a4bd; font-weight: 600; margin-left: 2px; }
.menu-btn { display: none; background: none; border: 1px solid #2a3448; color: #fff; border-radius: 8px; padding: 4px 10px; font-size: 1rem; cursor: pointer; }
.search { position: relative; flex: 0 1 380px; margin-left: auto; }
.search input {
  width: 100%; padding: 8px 12px; border-radius: 9px; border: 1px solid #2a3448;
  background: #131b2c; color: #e7edf6; outline: none;
}
.search input::placeholder { color: #8494ad; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 14px 34px rgba(11, 16, 29, 0.22); overflow: hidden; display: none;
}
.search-results a { display: block; padding: 9px 13px; color: var(--ink); }
.search-results a:hover { background: var(--bg-soft); text-decoration: none; }
.search-results .sr-title { font-weight: 700; display: block; }
.search-results .sr-text { font-size: 0.84rem; color: var(--muted); display: block; }
.top-links { display: flex; gap: 16px; }
.top-links a { color: #d7dee9; font-size: 0.95rem; white-space: nowrap; }

.shell { display: flex; align-items: flex-start; max-width: 1440px; margin: 0 auto; }
.sidebar {
  position: sticky; top: 57px; flex: 0 0 264px; max-height: calc(100vh - 57px);
  overflow-y: auto; padding: 20px 14px 30px 20px; border-right: 1px solid var(--line);
  font-size: 0.94rem;
}
.side-section { margin-top: 16px; }
.side-section-title { font-weight: 800; color: var(--navy); margin-bottom: 5px; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.5px; }
.side-link { display: block; padding: 4px 9px; border-radius: 7px; color: #33415a; }
.side-link:hover { background: var(--bg-soft); text-decoration: none; }
.side-link.is-active { background: #fdf1dc; color: #92400e; font-weight: 700; }

.content { flex: 1 1 auto; min-width: 0; padding: 28px 40px 40px; max-width: 860px; }
.content h1 { font-size: 2rem; line-height: 1.25; margin: 4px 0 16px; color: var(--navy); }
.content h2 { font-size: 1.35rem; margin: 30px 0 10px; color: var(--navy); scroll-margin-top: 76px; }
.content h3 { font-size: 1.12rem; margin: 22px 0 8px; }
.content p, .content li { font-size: 1rem; }
.content code { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; }
.content pre { background: var(--code-bg); color: #d7dee9; border-radius: 12px; padding: 16px 18px; overflow-x: auto; }
.content pre code { background: none; border: none; padding: 0; color: inherit; }
.content table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 0.95rem; }
.content th, .content td { border: 1px solid var(--line); padding: 7px 11px; text-align: left; }
.content th { background: var(--bg-soft); }
.content blockquote { border-left: 4px solid var(--amber); background: #fffaf0; margin: 16px 0; padding: 10px 16px; border-radius: 0 10px 10px 0; }
.content img { max-width: 100%; height: auto; }
.crumb { color: var(--muted); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.comp-list { columns: 2; line-height: 1.9; padding-left: 20px; }
.pin-table td code { white-space: nowrap; }

.toc { position: sticky; top: 57px; flex: 0 0 210px; padding: 28px 18px; font-size: 0.88rem; }
.toc-title { font-weight: 800; margin-bottom: 8px; color: var(--navy); }
.toc a { display: block; padding: 3px 0; color: var(--muted); }

.prev-next { display: flex; justify-content: space-between; gap: 14px; margin-top: 44px; }
.pn { border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; color: var(--ink); font-weight: 700; max-width: 48%; }
.pn span { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.pn.next { text-align: right; margin-left: auto; }
.pn:hover { border-color: var(--amber); text-decoration: none; }
.doc-footer { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 1080px) { .toc { display: none; } }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .top-links { display: none; }
  .search { flex: 1 1 auto; }
  .sidebar { display: none; position: fixed; top: 57px; left: 0; bottom: 0; width: 272px; background: #fff; z-index: 30; box-shadow: 8px 0 24px rgba(11,16,29,0.18); }
  .sidebar.is-open { display: block; }
  .content { padding: 20px; }
  .comp-list { columns: 1; }
}
