/* Ashlar Slot Docs — MDN Web Docs style redesign
   Header gelap #1b1b1b + search besar, breadcrumb, sidebar sticky,
   content 45rem, spec table, callouts, docs blockquote, .term emphasis. */
:root {
  --bg: #ffffff;
  --bg-alt: #fbfbfb;
  --ink: #1b1b1b;
  --ink-mute: #6f6f6f;
  --line: #d9d9d9;
  --brand: #0b57d0;
  --header: #1b1b1b;
  --header-ink: #f2f2f2;
  --note-bg: #fffbd6;      /* info: kuning muda */
  --note-line: #e6d478;
  --warn-bg: #ffdbe5;      /* warning: merah muda */
  --warn-line: #d6386b;
  --code-bg: #f0f0f0;
  --sidebar-w: 280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------- MDN dark header + big centered search ---------- */
.site-header { background: var(--header); color: var(--header-ink); border-bottom: 4px solid #000; }
.site-header .wrap { display: flex; flex-direction: column; gap: 12px; padding: 18px 24px 24px; }
.logo { display: flex; align-items: center; gap: 12px; color: var(--header-ink); align-self: center; }
.logo:hover { text-decoration: none; }
.logo .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 8px; background: var(--brand);
  font-weight: 700; font-size: 24px; color: #fff;
}
.logo strong { font-size: 22px; line-height: 1.1; display: block; }
.logo small { color: #b8b8b8; font-size: 12px; display: block; }
.top-nav { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.top-nav a { color: #cfcfcf; font-size: 14px; padding: 4px 0; }
.top-nav a.on, .top-nav a:hover { color: #fff; text-decoration: none; border-bottom: 2px solid #fff; }
.site-search {
  display: flex; max-width: 560px; width: 100%; margin: 0 auto;
  border-radius: 6px; overflow: hidden; border: 1px solid #4a4a4a; background: #2e2e2e;
}
.site-search input {
  flex: 1; border: 0; background: #2e2e2e; color: #f2f2f2;
  padding: 12px 16px; font-size: 16px; outline: none;
}
.site-search input::placeholder { color: #9e9e9e; }
.site-search button {
  border: 0; background: #4a4a4a; color: #fff; padding: 0 22px;
  font-size: 15px; cursor: pointer;
}
.site-search button:hover { background: var(--brand); }

/* ---------- layout: sticky sidebar + main ---------- */
.layout { display: flex; max-width: 1280px; margin: 0 auto; padding: 24px; gap: 48px; align-items: flex-start; }
.sidebar {
  position: sticky; top: 24px; width: var(--sidebar-w); flex: none;
  max-height: calc(100vh - 48px); overflow-y: auto;
  font-size: 14px; line-height: 1.5; padding: 4px;
}
.sidebar nav ul { list-style: none; margin: 0 0 18px; padding: 0; }
.sidebar .sb-h {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-mute); font-weight: 700; margin: 0 0 6px 10px;
}
.sidebar a { color: var(--ink); display: block; padding: 4px 10px; border-radius: 4px; }
.sidebar a:hover { background: #ededf0; text-decoration: none; }
.sidebar .cat-tree > li { margin-bottom: 8px; }
.sidebar .cat-tree > li > .cat-h { font-weight: 600; }
.sidebar .cat-tree ul { margin: 2px 0 8px; padding-left: 14px; border-left: 2px solid var(--line); }
.sidebar .cnt { color: var(--ink-mute); font-size: 12px; }
.page-toc { border-left: 3px solid var(--line); margin-left: 10px; }
.page-toc a { color: var(--ink-mute); font-size: 13px; }
.page-toc a:hover { color: var(--brand); background: none; }

/* ---------- content column ~45rem ---------- */
.main { flex: 1; min-width: 0; }
.doc, .main > .crumb, .main > h1, .main > .doc-meta, .main > .grid, .main > section, .main .az-letter, .main .idx {
  max-width: 45rem;
}

/* breadcrumb above title */
.crumb { font-size: 13px; color: var(--ink-mute); margin-bottom: 10px; }
.crumb span { color: var(--ink-mute); margin: 0 4px; }
.crumb a { color: var(--ink-mute); }
.crumb a:hover { color: var(--brand); }
.crumb span:last-child { color: var(--ink); }

.doc-head h1 {
  font-size: 30px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -0.01em;
}
.doc-meta { color: var(--ink-mute); font-size: 13px; margin: 0 0 18px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }

/* docs "notecard" answer/summary */
.answer {
  background: var(--bg-alt); border-left: 4px solid var(--brand);
  padding: 12px 16px; margin: 18px 0; border-radius: 0 4px 4px 0;
}

/* spec table (nama: nilai) */
table.spec {
  border-collapse: collapse; margin: 18px 0; width: 100%; font-size: 14px;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}
table.spec caption {
  caption-side: top; text-align: left; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); padding-bottom: 6px;
}
table.spec th, table.spec td { border: 1px solid var(--line); padding: 7px 12px; text-align: left; vertical-align: top; }
table.spec th[scope="row"] { background: var(--bg-alt); font-weight: 600; width: 38%; }

/* topic illustration */
.topic-img { margin: 18px 0; }
.topic-img img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
.topic-img figcaption { font-size: 12px; color: var(--ink-mute); margin-top: 6px; }

/* ---------- callouts ---------- */
.callout {
  padding: 12px 16px; margin: 14px 0; border-radius: 4px; font-size: 15px;
  border-left: 4px solid; page-break-inside: avoid;
}
.callout p { margin: 0; }
.callout.note { background: var(--note-bg); border-color: var(--note-line); }
.callout.note strong { color: #6b5d00; }
.callout.warning { background: var(--warn-bg); border-color: var(--warn-line); }
.callout.warning strong { color: #a30040; }

/* docs blockquote */
.doc-body blockquote {
  margin: 14px 0; padding: 6px 16px; color: var(--ink-mute);
  border-left: 4px solid #c9c9c9; background: var(--bg-alt);
  font-style: italic; border-radius: 0 4px 4px 0;
}

/* inline term emphasis (MDN inline-code look) */
.term, .doc-body .term {
  font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  background: var(--code-bg); padding: 1px 5px; border-radius: 3px;
  font-size: 0.9em; color: #121212; white-space: nowrap;
}

/* body typography */
.doc-body h2 {
  font-size: 22px; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}
.doc-body h3 { font-size: 17px; margin: 20px 0 8px; }
.doc-body p { margin: 10px 0; }
.doc-body ul, .kp-box ul { margin: 10px 0; padding-left: 22px; }
.doc-body li { margin: 4px 0; }
.kp-box, .faq-box { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 6px; padding: 6px 18px 12px; margin: 20px 0; }
.kp-box h2, .faq-box h2 { border: none; margin: 14px 0 6px; }
.faq-item { border-top: 1px solid var(--line); padding: 8px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; }
.faq-item p { color: #333; }

/* prev/next nav */
.pn { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 32px; padding-top: 14px; font-size: 14px; }

/* cards / index grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; max-width: 72rem; }
.card { display: block; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; color: var(--ink); }
.card:hover { border-color: var(--brand); text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; font-size: 13px; color: var(--ink-mute); }
.idx { list-style: none; padding: 0; margin: 8px 0; }
.idx li { padding: 5px 0; border-bottom: 1px solid #efefef; }
.idx small { color: var(--ink-mute); margin-left: 8px; }
.az-letter { font-size: 20px; border-bottom: 2px solid var(--line); margin-top: 26px; padding-bottom: 4px; }
.section h2 { font-size: 22px; margin: 26px 0 10px; }

/* hero (homepage) */
.hero { background: var(--header); color: var(--header-ink); border-radius: 8px; padding: 28px 32px; margin-bottom: 8px; }
.hero h1 { color: #fff; margin: 0 0 8px; font-size: 28px; }
.hero p { margin: 0; color: #cfcfcf; max-width: 40rem; }

/* footer */
.site-foot { background: var(--bg-alt); border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0; font-size: 13px; color: var(--ink-mute); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* responsive: sidebar collapses */
@media (max-width: 900px) {
  .layout { flex-direction: column; padding: 16px; }
  .sidebar { position: static; width: 100%; max-height: none; }
  .site-header .wrap { padding: 14px 16px 18px; }
}

/* ===== HowTo Guide Styles (guides/rtp-live-guide.html) ===== */
.howto-guide { max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
.howto-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 2rem; border-radius: 12px 12px 0 0; }
.howto-header h1 { margin: 0 0 1rem 0; font-size: 2rem; }
.howto-meta { display: flex; gap: 2rem; font-size: 0.9rem; opacity: 0.9; flex-wrap: wrap; }
.progress-bar { background: rgba(255,255,255,0.2); height: 8px; border-radius: 4px; margin-top: 1rem; overflow: hidden; }
.progress-fill { background: #4ade80; height: 100%; width: 0%; transition: width 0.3s ease; }
.howto-step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; margin: 1rem 0; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.howto-step.completed { background: #f0fdf4; border-left: 4px solid #4ade80; }
.howto-step h3 { color: var(--ink); margin: 0 0 1rem 0; }
.direction { background: #eff6ff; border-left: 3px solid #3b82f6; padding: 1rem; margin: 1rem 0; border-radius: 4px; }
.tools, .supply { margin: 0.5rem 0; font-size: 0.9rem; }
.step-complete-btn { background: #667eea; color: white; border: none; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; margin-top: 1rem; }
.step-complete-btn:hover { background: #5568d3; }
.export-btn { background: #10b981; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 8px; cursor: pointer; margin: 2rem auto; display: block; }
@media (max-width: 768px) { .howto-header h1 { font-size: 1.5rem; } .howto-meta { flex-direction: column; gap: 0.5rem; } }
