/* ============================================================
   Ashlar Docs — style-v4 · Premium MDN-2024 documentation UI
   Dark modern header · sticky sidebar + live filter · right-rail
   TOC (two-sided) · breadcrumbs · soft callouts · syntax-highlight
   terms · monospace code · 8px spacing grid · responsive off-canvas
   Supersedes style-v2.css / style-v3.css / style.css
   ============================================================ */
:root {
  /* palette */
  --bg: #ffffff;
  --bg-alt: #f7f7f8;
  --ink: #1b1b1b;
  --ink-mute: #6b6b77;
  --line: #dadade;
  --line-soft: #ebebee;
  --brand: #0b57d0;
  --brand-ink: #0847a8;
  --brand-soft: #eef3fd;
  --header: #1b1b1b;
  --header-2: #141414;
  --header-ink: #f4f4f5;
  --header-mute: #b3b3bb;
  /* soft callouts */
  --note-bg: #eef4fe;  --note-line: #4c8dff;  --note-ink: #143d82;
  --tip-bg: #ecfdf3;   --tip-line: #2da44e;   --tip-ink: #116329;
  --warn-bg: #fff4e5;  --warn-line: #f0883a;  --warn-ink: #7c3d0c;
  /* code */
  --code-bg: #f1f0f2;
  --code-ink: #15151a;
  --code-line: #dcdce2;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
  /* 8px grid tokens */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px;
  --sidebar-w: 288px;
  --rail-w: 224px;
  --radius: 8px;
  --shadow-1: 0 1px 2px rgba(27, 27, 27, .05), 0 4px 12px rgba(27, 27, 27, .05);
  --shadow-2: 0 2px 6px rgba(27, 27, 27, .08), 0 12px 32px rgba(27, 27, 27, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.68 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: #cfe0fb; }

a { color: var(--brand); text-decoration: none; border-radius: 2px; }
a:hover { color: var(--brand-ink); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--s3); }

/* ============================================================
   Header — dark modern (grid: logo | nav, search row below)
   ============================================================ */
.site-header {
  background: linear-gradient(180deg, var(--header-2), var(--header) 72%);
  color: var(--header-ink);
  border-bottom: 1px solid #000;
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 4px 16px rgba(0,0,0,.18);
  position: sticky; top: 0; z-index: 60;
}
.site-header .wrap {
  display: grid;
  grid-template-columns: minmax(0, auto) 1fr;
  grid-template-areas: "logo nav" "search search";
  align-items: center;
  column-gap: var(--s3); row-gap: var(--s1);
  padding: var(--s2) var(--s3);
}
.logo { grid-area: logo; display: flex; align-items: center; gap: 12px; color: var(--header-ink); }
.logo:hover { text-decoration: none; }
.logo .mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--radius);
  background: linear-gradient(135deg, #1a6dff, var(--brand));
  font-weight: 800; font-size: 22px; color: #fff;
  box-shadow: 0 2px 8px rgba(11,87,208,.45);
  transition: transform .16s ease;
}
.logo:hover .mark { transform: translateY(-1px); }
.logo strong { font-size: 19px; line-height: 1.15; display: block; letter-spacing: -.01em; }
.logo small { color: var(--header-mute); font-size: 12px; display: block; margin-top: 2px; }
.top-nav { grid-area: nav; display: flex; flex-wrap: wrap; gap: 2px var(--s2); justify-content: flex-end; align-items: center; }
.top-nav a {
  color: var(--header-mute); font-size: 14px; font-weight: 500;
  padding: var(--s1) 10px; border-radius: 6px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, background .15s ease;
}
.top-nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.top-nav a.on { color: #fff; border-bottom-color: #fff; }
.site-search {
  grid-area: search;
  display: flex; max-width: 640px; width: 100%; margin: 0 auto;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid #3d3d43; background: #27272c;
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 1px 0 rgba(255,255,255,.05) inset;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.site-search:focus-within { border-color: #6ea8ff; box-shadow: 0 0 0 3px rgba(74,138,255,.25); }
.site-search input {
  flex: 1; min-width: 0; border: 0; background: #27272c; color: var(--header-ink);
  padding: 10px var(--s2); font-size: 15px; outline: none;
}
.site-search input::placeholder { color: #90909a; }
.site-search button {
  border: 0; background: #3a3a41; color: #fff; padding: 0 var(--s2);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s ease;
}
.site-search button:hover { background: var(--brand); }

/* mobile sidebar toggle (injected by docs-ui-v4.js) */
.sb-toggle {
  display: none; grid-area: nav;
  justify-self: end;
  background: #27272c; color: var(--header-ink);
  border: 1px solid #3d3d43; border-radius: 6px;
  width: 40px; height: 40px; font-size: 18px; line-height: 1;
  cursor: pointer; align-items: center; justify-content: center;
}
.sb-toggle:hover { background: #3a3a41; }

/* ============================================================
   Layout — left sticky sidebar · main · right TOC rail
   ============================================================ */
.layout {
  display: flex; max-width: 1280px; margin: 0 auto;
  padding: var(--s3); gap: var(--s4); align-items: flex-start;
}
.layout > .main { flex: 1; min-width: 0; }

/* ---- sidebar ---- */
.sidebar {
  position: sticky; top: 88px; width: var(--sidebar-w); flex: none;
  max-height: calc(100vh - 112px); overflow-y: auto;
  font-size: 14px; line-height: 1.5;
  padding: 4px 8px 24px 0;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.sidebar nav ul { list-style: none; margin: 0 0 var(--s2); padding: 0; }
.sidebar .sb-h {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-mute); font-weight: 700; margin: 0 0 6px 10px;
}
.sidebar a {
  color: var(--ink); display: block; padding: 5px 10px; border-radius: 6px;
  transition: background .13s ease, color .13s ease;
}
.sidebar a:hover { background: var(--bg-alt); color: var(--brand); text-decoration: none; }
.sidebar a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.sidebar .cat-tree > li { margin-bottom: var(--s1); }
.sidebar .cat-tree > li > .cat-h { font-weight: 650; }
.sidebar .cat-tree ul {
  margin: 2px 0 var(--s1); padding-left: 12px;
  border-left: 2px solid var(--line-soft);
}
.sidebar .cnt { color: var(--ink-mute); font-size: 12px; font-weight: 500; }
.page-toc { border-left: 2px solid var(--line-soft); margin-left: 10px; }
.page-toc a { color: var(--ink-mute); font-size: 13px; padding: 4px 10px; }
.page-toc a:hover { color: var(--brand); background: transparent; }

/* sidebar live filter (injected by docs-ui-v4.js) */
.sb-filter { padding: 2px 0 var(--s1); }
.sb-filter-box {
  display: flex; align-items: center; gap: var(--s1);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-alt); padding: 0 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sb-filter-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,87,208,.12); background: #fff; }
.sb-filter-box svg { flex: none; color: var(--ink-mute); }
.sb-filter input {
  width: 100%; border: 0; background: transparent; outline: none;
  padding: 8px 0; font-size: 13.5px; color: var(--ink);
}
.sb-filter input::placeholder { color: #9a9aa5; }
.sb-filter .sb-clear {
  border: 0; background: transparent; color: var(--ink-mute);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 4px; border-radius: 4px;
}
.sb-filter .sb-clear:hover { color: var(--ink); background: var(--line-soft); }
.sb-empty { color: var(--ink-mute); font-size: 13px; padding: var(--s1) 10px; }
.sidebar .cat-tree > li[data-empty="1"] > .cat-h,
.sidebar .cat-tree > li[data-empty="1"] > ul { display: none; }

/* ============================================================
   Right rail — "On this page" TOC (injected by docs-ui-v4.js)
   ============================================================ */
.toc-side {
  position: sticky; top: 88px; width: var(--rail-w); flex: none;
  max-height: calc(100vh - 112px); overflow-y: auto;
  font-size: 13px; line-height: 1.5; padding: 4px 0 24px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.toc-side .toc-h {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-mute); font-weight: 700; margin: 0 0 6px 12px;
}
.toc-side ol { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--line-soft); }
.toc-side a {
  display: block; padding: 4px 12px; color: var(--ink-mute);
  border-left: 2px solid transparent; margin-left: -12px;
  transition: color .13s ease, border-color .13s ease;
}
.toc-side a:hover { color: var(--brand); text-decoration: none; }
.toc-side a.on { color: var(--brand-ink); font-weight: 600; border-left-color: var(--brand); }
body:not(.has-rail) .toc-side { display: none; }

/* hide the inline mid-article TOC once the right rail is active */
body.has-rail .doc > .toc, body.has-rail .main > .toc { display: none; }

/* ============================================================
   Content column (~45rem, 8px rhythm)
   ============================================================ */
.doc, .main > .crumb, .main > h1, .main > .doc-meta, .main > .grid,
.main > section, .main .az-letter, .main .idx, .main > .hero, .main > .section {
  max-width: 45rem;
}

/* breadcrumb */
.crumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-mute); margin-bottom: var(--s1);
  padding: 6px 10px; background: var(--bg-alt); border-radius: 6px;
  border: 1px solid var(--line-soft);
}
.crumb::before { content: "\2039"; color: var(--ink-mute); font-size: 15px; margin-right: 2px; }
.crumb a { color: var(--ink-mute); padding: 1px 4px; border-radius: 4px; }
.crumb a:hover { color: var(--brand); text-decoration: none; background: #fff; }
.crumb span, .crumb > span:last-child { color: var(--ink); margin: 0; }
.crumb > span:not(:last-child)::after { content: "\2044"; color: #b9b9c0; margin-left: 6px; font-size: 12px; }

.doc-head h1 {
  font-size: 32px; line-height: 1.2; margin: 0 0 var(--s1);
  letter-spacing: -.02em; font-weight: 750;
}
.doc-meta {
  color: var(--ink-mute); font-size: 13px; margin: 0 0 var(--s2);
  border-bottom: 1px solid var(--line-soft); padding-bottom: var(--s2);
  display: flex; flex-wrap: wrap; gap: var(--s1);
}
.doc-meta::before { content: "\1F553"; opacity: .55; }

/* summary "answer" — MDN notecard (note, soft blue) */
.answer {
  background: var(--note-bg); border: 1px solid #d3e2fb; border-left: 4px solid var(--note-line);
  padding: var(--s2); margin: var(--s2) 0 var(--s3);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 15.5px; color: #242a33;
}
.answer::before {
  content: "Ringkasan"; display: block;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em;
  color: var(--note-ink); margin-bottom: 6px;
}

/* ============================================================
   Inline note / tip / warning boxes — soft backgrounds
   ============================================================ */
.callout, .note, .tip, .warning,
.doc-body .callout, .doc-body .note, .doc-body .tip, .doc-body .warning {
  padding: var(--s2); margin: var(--s2) 0; border-radius: var(--radius);
  font-size: 15px; border: 1px solid; border-left-width: 4px;
  page-break-inside: avoid;
}
.callout p, .note p, .tip p, .warning p { margin: 0; }
.callout.note, .note { background: var(--note-bg); border-color: #d3e2fb var(--line-soft) #d3e2fb #4c8dff; }
.callout.note strong, .note strong { color: var(--note-ink); }
.callout.tip, .tip { background: var(--tip-bg); border-color: #c9ecd6 var(--line-soft) #c9ecd6 var(--tip-line); }
.callout.tip strong, .tip strong { color: var(--tip-ink); }
.callout.warning, .warning { background: var(--warn-bg); border-color: #f7ddb7 var(--line-soft) #f7ddb7 var(--warn-line); }
.callout.warning strong, .warning strong { color: var(--warn-ink); }

/* key-points & FAQ boxes as soft callouts */
.kp-box {
  background: var(--tip-bg); border: 1px solid #c9ecd6; border-left: 4px solid var(--tip-line);
  border-radius: var(--radius); padding: var(--s1) var(--s2) var(--s2);
  margin: var(--s3) 0; page-break-inside: avoid;
}
.kp-box h2 { color: var(--tip-ink); }
.faq-box {
  background: var(--bg-alt); border: 1px solid var(--line-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: var(--s1) var(--s2) var(--s2);
  margin: var(--s3) 0;
}
.kp-box h2, .faq-box h2 { border: none; margin: var(--s1) 0 6px; }
.faq-item { border-top: 1px solid var(--line-soft); padding: var(--s1) 0; }
.faq-item:first-of-type { border-top: 0; }
.faq-item summary {
  cursor: pointer; font-weight: 650; list-style: none;
  display: flex; align-items: baseline; gap: var(--s1);
  padding: 4px 0; border-radius: 4px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "\25B8"; color: var(--ink-mute); transition: transform .15s ease; }
.faq-item[open] summary::before { transform: rotate(90deg); }
.faq-item summary:hover { color: var(--brand-ink); }
.faq-item p { color: #333340; margin: 6px 0 var(--s1) 22px; }

/* docs blockquote — muted quote card */
.doc-body blockquote {
  margin: var(--s2) 0; padding: var(--s1) var(--s2);
  color: var(--ink-mute); background: var(--bg-alt);
  border-left: 4px solid #c9c9cf; font-style: italic;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* interlink / seo-note (inline-styled in markup; gentle overrides) */
.interlink, .seo-note { border-radius: var(--radius); }

/* ============================================================
   Syntax-highlight look — terms, inline code, code blocks
   ============================================================ */
.term, .doc-body .term, .answer .term, code:not(pre code) {
  font-family: var(--mono);
  font-size: .875em; line-height: 1.45;
  color: var(--code-ink);
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  padding: 1px 6px; border-radius: 5px;
  white-space: nowrap;
  overflow-wrap: normal;
}
a .term:hover, .term:hover { border-color: #b6b6c2; }
pre, .doc-body pre {
  font-family: var(--mono); font-size: 14px; line-height: 1.7;
  background: #1e1e24; color: #e8e8ee;
  border-radius: var(--radius); border: 1px solid #101014;
  padding: var(--s2); margin: var(--s2) 0; overflow-x: auto;
  tab-size: 2;
  box-shadow: var(--shadow-1);
}
pre code { background: transparent; border: 0; padding: 0; color: inherit; font-size: inherit; white-space: pre; }
/* token tinting hooks (JS highlighter may add these) */
.tok-kw { color: #c792ea; } .tok-str { color: #a5e075; } .tok-num { color: #f78c6c; }
.tok-com { color: #737390; font-style: italic; } .tok-fn { color: #82aaff; }

/* ============================================================
   Body typography & tables
   ============================================================ */
.doc-body h2 {
  font-size: 24px; margin: var(--s4) 0 10px; padding-bottom: var(--s1);
  border-bottom: 1px solid var(--line-soft);
  scroll-margin-top: 96px; letter-spacing: -.01em; font-weight: 700;
}
.doc-body h3 { font-size: 17.5px; margin: var(--s3) 0 var(--s1); scroll-margin-top: 96px; }
.doc-body p { margin: var(--s1) 0; }
.doc-body ul, .kp-box ul { margin: var(--s1) 0; padding-left: var(--s3); }
.doc-body li { margin: 6px 0; }
.doc-body li::marker { color: var(--ink-mute); }
.doc-body a:hover, .doc-body a.term { text-decoration-thickness: 1px; text-underline-offset: 3px; }

table, table.spec {
  border-collapse: collapse; margin: var(--s2) 0; width: 100%; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-1);
}
table.spec caption {
  caption-side: top; text-align: left; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-mute);
  padding-bottom: var(--s1);
}
table.spec th, table.spec td, table th, table td {
  border: 1px solid var(--line-soft); padding: var(--s1) 12px;
  text-align: left; vertical-align: top;
}
table.spec th[scope="row"], table th[scope="row"] { background: var(--bg-alt); font-weight: 650; width: 38%; }
tbody tr:nth-child(even) { background: #fafafb; }
tbody tr:hover { background: var(--brand-soft); }

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

/* prev/next nav */
.pn {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2);
  border-top: 1px solid var(--line-soft); margin-top: var(--s4);
  padding-top: var(--s2); font-size: 14px;
}
.pn a {
  display: block; padding: var(--s1) var(--s2);
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.pn a:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.pn .pn-next { grid-column: 2; text-align: right; }

/* cards / index grids */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s2); margin: var(--s2) 0; max-width: 72rem;
}
.card {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s2); color: var(--ink); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover {
  border-color: var(--brand); text-decoration: none;
  box-shadow: var(--shadow-2); transform: translateY(-2px);
}
.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: var(--s1) 0; }
.idx li { padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.idx li:hover { background: var(--bg-alt); }
.idx small { color: var(--ink-mute); margin-left: var(--s1); }
.az-letter {
  font-size: 22px; border-bottom: 2px solid var(--line);
  margin-top: var(--s3); padding-bottom: 6px; scroll-margin-top: 96px;
}
.section h2 { font-size: 24px; margin: var(--s3) 0 10px; }
.tag {
  display: inline-block; background: var(--brand-soft); color: var(--brand-ink);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}

/* hero (homepage) */
.hero {
  background: linear-gradient(135deg, #101014 0%, var(--header) 60%, #26262c 100%);
  color: var(--header-ink); border-radius: 12px;
  padding: var(--s4) var(--s4); margin-bottom: var(--s1);
  border: 1px solid #000; box-shadow: var(--shadow-2);
}
.hero h1 { color: #fff; margin: 0 0 var(--s1); font-size: 30px; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--header-mute); max-width: 40rem; }
.stats { display: flex; gap: var(--s3); flex-wrap: wrap; margin: var(--s2) 0; color: var(--ink-mute); font-size: 14px; }
.stats b { color: var(--ink); font-size: 20px; display: block; }

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

/* ============================================================
   Responsive — sidebar off-canvas, header compact, rail hidden
   ============================================================ */
@media (max-width: 1279px) {
  .toc-side { display: none; }
}
@media (max-width: 1080px) {
  .layout { gap: var(--s3); }
}
@media (max-width: 900px) {
  .site-header { position: static; }
  .site-header .wrap { grid-template-areas: "logo nav"; grid-template-columns: 1fr auto; row-gap: 0; padding: var(--s1) var(--s2); }
  .site-search { grid-area: search; max-width: none; }
  .site-header .wrap { grid-template-areas: "logo nav" "search search"; }
  .top-nav { display: none; }
  .sb-toggle { display: inline-flex; }
  .layout { flex-direction: column; padding: var(--s2); gap: var(--s2); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 80;
    width: min(84vw, 320px); max-height: none;
    background: var(--bg); border-right: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    padding: var(--s2); margin: 0;
    transform: translateX(-102%); transition: transform .22s ease;
    overflow-y: auto; overscroll-behavior: contain;
  }
  body.sb-open .sidebar { transform: translateX(0); }
  .sb-overlay {
    position: fixed; inset: 0; z-index: 70; background: rgba(27,27,27,.45);
    backdrop-filter: blur(1px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  body.sb-open .sb-overlay { opacity: 1; pointer-events: auto; }
  .doc-head h1 { font-size: 26px; }
  .doc-body h2 { font-size: 21px; }
  .pn { grid-template-columns: 1fr; }
  .pn .pn-next { grid-column: 1; text-align: left; }
}

/* ============================================================
   HowTo Guide styles (guides/rtp-live-guide.html) — v4 refresh
   ============================================================ */
.howto-guide { max-width: 800px; margin: var(--s3) auto; padding: 0 var(--s1); }
.howto-header {
  background: linear-gradient(135deg, #1b1b1b 0%, #3b3b46 60%, #4a4a5a 100%);
  color: #fff; padding: var(--s4); border-radius: 12px 12px 0 0;
}
.howto-header h1 { margin: 0 0 var(--s1); font-size: 28px; letter-spacing: -.01em; }
.howto-meta { display: flex; gap: var(--s3); font-size: 14px; opacity: .92; flex-wrap: wrap; }
.progress-bar { background: rgba(255,255,255,.18); height: 8px; border-radius: 4px; margin-top: var(--s1); overflow: hidden; }
.progress-fill { background: #4ade80; height: 100%; width: 0%; transition: width .3s ease; }
.howto-step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s3); margin: var(--s2) 0; box-shadow: var(--shadow-1);
  list-style: none;
}
.howto-step.completed { background: var(--tip-bg); border-left: 4px solid #4ade80; }
.howto-step h3 { color: var(--ink); margin: 0 0 var(--s1); }
.direction {
  background: var(--note-bg); border: 1px solid #d3e2fb; border-left: 4px solid var(--note-line);
  padding: var(--s2); margin: var(--s2) 0; border-radius: var(--radius);
}
.tools, .supply { margin: 6px 0; font-size: 14px; }
.step-complete-btn {
  background: var(--brand); color: #fff; border: 0;
  padding: var(--s1) var(--s2); border-radius: 6px; cursor: pointer;
  margin-top: var(--s1); font-weight: 600;
  transition: background .15s ease, transform .15s ease;
}
.step-complete-btn:hover { background: var(--brand-ink); transform: translateY(-1px); }
.export-btn {
  background: #0d9488; color: #fff; border: 0;
  padding: 12px var(--s3); border-radius: var(--radius); cursor: pointer;
  margin: var(--s3) auto; display: block; font-weight: 700;
  transition: background .15s ease, transform .15s ease;
}
.export-btn:hover { background: #0b7c72; transform: translateY(-1px); }
@media (max-width: 768px) {
  .howto-header h1 { font-size: 22px; }
  .howto-meta { flex-direction: column; gap: 6px; }
}

/* print */
@media print {
  .site-header, .sidebar, .toc-side, .site-foot, .pn, .seo-note, .interlink, .sb-toggle { display: none !important; }
  .layout { display: block; padding: 0; }
  body.has-rail .doc > .toc, body.has-rail .main > .toc { display: block; }
}
