/* The MaxxERP Field Guide */
.kb-hero { padding: calc(var(--header-h) + clamp(38px, 6vw, 76px)) var(--gutter) 20px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.kb-hero h1 { margin: 0; line-height: 1.06; }
.kb-hero .eyebrow { justify-self: center; }
.kb-hero--small { padding-bottom: 0; }
.kb-search { position: relative; width: min(100%, 640px); text-align: left; }
.kb-search input { box-sizing: border-box; width: 100%; padding: 13px 44px 13px 16px; border: 1px solid var(--stroke); border-radius: 13px; background: #fff; color: var(--text); font: inherit; outline: none; box-shadow: 0 14px 30px -24px rgba(30, 60, 90, .5); transition: border-color .2s, box-shadow .2s; }
.kb-search input:focus { border-color: #2f9fe8; box-shadow: 0 0 0 3px rgba(47, 159, 232, .18); }
.kb-search--big { margin-top: 14px; }
.kb-search--big input { padding: 18px 50px 18px 22px; border-radius: 16px; font-size: 1.08rem; }
.kb-search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 2px 8px; border: 1px solid var(--stroke); border-radius: 6px; background: var(--bg, #f5f8fb); color: var(--muted); font: .78rem ui-monospace, Consolas, monospace; }
.kb-results { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 8px); max-height: 430px; overflow: auto; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--stroke); border-radius: 14px; background: #fff; box-shadow: 0 30px 60px -28px rgba(30, 60, 90, .55); }
.kb-results a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 9px; color: inherit; text-decoration: none; }
.kb-results a:hover, .kb-results a.on { background: #e6f4ff; }
.kb-results small { color: #1f7fc4; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.kb-results span { color: var(--muted); font-size: .85rem; }
.kb-results .none { padding: 14px; color: var(--muted); }
.kb-pop { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 6px 0 0; color: var(--muted); font-size: .88rem; }
.kb-pop a { color: #1877c2; }
.kb-map-wrap { overflow-x: auto; }
.kb-map { display: block; width: 100%; min-width: 760px; height: auto; }
.kb-stop { cursor: pointer; }
.kb-stop:hover text, .kb-stop:focus text { fill: #1877c2; }
.kb-paths { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kb-path, .kb-chapter { padding: 18px; border: 1px solid var(--stroke); border-radius: 16px; background: #fff; }
.kb-path h3, .kb-chapter h3 { margin: 0 0 3px; font-size: 1.12rem; letter-spacing: -.02em; }
.kb-path > p, .kb-chapter > p { margin: 0 0 10px; color: var(--muted); font-size: .86rem; }
.kb-path ol { margin: 0; padding-left: 18px; font-size: .86rem; }
.kb-path li { margin-bottom: 5px; }
.kb-path a, .kb-chapter a { color: inherit; text-decoration: none; }
.kb-path a:hover, .kb-chapter a:hover { color: #1877c2; text-decoration: underline; }
.kb-chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kb-chapter { position: relative; scroll-margin-top: 90px; }
.kb-num { position: absolute; right: 16px; top: 12px; color: #d2e6f4; font-size: 2rem; font-weight: 800; }
.kb-when { margin: 0 !important; color: #1f7fc4 !important; font-size: .7rem !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kb-chapter ul { margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.kb-chapter li { padding: 5px 0; border-top: 1px solid var(--stroke); }
.kb-help { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: clamp(20px, 3vw, 34px); border-radius: 20px; background: linear-gradient(120deg, #e6f4ff, #e3f8f6); }
.kb-help h2 { margin: 0; }
.kb-help p { margin: 2px 0 0; color: var(--muted); }

.kb-top { padding: calc(var(--header-h) + 18px) var(--gutter) 8px; }
.kb-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 220px; gap: clamp(20px, 3vw, 46px); align-items: start; padding: 10px var(--gutter) 60px; }
.kb-side, .kb-aside { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; font-size: .86rem; }
.kb-side-home { display: block; padding: 6px 0; font-weight: 700; color: inherit; text-decoration: none; }
.kb-side details { border-top: 1px solid var(--stroke); }
.kb-side summary { padding: 8px 0; font-weight: 600; cursor: pointer; }
.kb-side ul { margin: 0 0 8px; padding: 0; list-style: none; }
.kb-side li a { display: block; padding: 4px 8px; border-radius: 7px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.kb-side li a:hover { background: #e6f4ff; color: inherit; }
.kb-side li a[aria-current] { background: #e6f4ff; color: #1877c2; font-weight: 600; }
.kb-article { min-width: 0; max-width: 760px; }
.kb-article h1 { margin: 8px 0 8px; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08; letter-spacing: -.03em; }
.kb-article section { margin-top: 30px; scroll-margin-top: 90px; }
.kb-article section h2 { margin: 0 0 10px; font-size: 1.3rem; letter-spacing: -.02em; }
.kb-sum { margin: 0; color: var(--muted); font-size: 1.14rem; }
.kb-meta { margin: 8px 0 0; color: var(--muted); font-size: .84rem; }
.kb-article .kb-touch { margin-top: 20px; padding: 13px 15px; border: 1px solid var(--stroke); border-radius: 14px; background: #fff; }
.kb-touch h2 { margin: 0 0 8px !important; font-size: .72rem !important; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kb-touch ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.kb-touch li { padding: 4px 11px; border-radius: 99px; background: #eef2f6; color: #9aa8b5; font-size: .82rem; font-weight: 600; }
.kb-touch li.on { background: linear-gradient(120deg, #2f9fe8, #22c3bb); color: #06222f; }
.kb-steps { counter-reset: s; margin: 0; padding: 0; list-style: none; }
.kb-steps li { position: relative; counter-increment: s; padding: 0 0 18px 52px; }
.kb-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid #12263a; border-radius: 50% 46% 52% 48%; font-weight: 700; color: #1877c2; }
.kb-steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; border-left: 2px dashed #bcd6e8; }
.kb-steps h3 { margin: 0; font-size: 1.05rem; }
.kb-steps p { margin: 2px 0 0; color: var(--muted); }
.kb-article .kb-note { padding: 15px 18px; border-radius: 14px; }
.kb-note ul { margin: 0; padding-left: 18px; }
.kb-note li { margin-bottom: 5px; }
.kb-note--good { background: #e3f8f6; }
.kb-note--warn { background: #fff4dc; }
.kb-related { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kb-related a { display: grid; padding: 11px 14px; border: 1px solid var(--stroke); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; transition: border-color .2s, transform .2s; }
.kb-related a:hover { border-color: #2f9fe8; transform: translateX(3px); }
.kb-related span { color: var(--muted); font-size: .86rem; }
.kb-pn { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--stroke); }
.kb-pn a { color: inherit; text-decoration: none; font-weight: 600; }
.kb-pn a:hover { color: #1877c2; }
.kb-pn small { display: block; color: var(--muted); font-weight: 500; }
.kb-pn .nx { text-align: right; }
.kb-aside-h { margin: 0 0 6px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kb-aside ul { margin: 0; padding: 0; list-style: none; }
.kb-aside > ul a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; }
.kb-aside > ul a:hover { color: #1877c2; }
.kb-plans { margin-top: 18px; padding: 12px; border: 1px solid var(--stroke); border-radius: 12px; background: #fff; }
.kb-plans li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.kb-plans li span { font-size: .74rem; }
.kb-plans .yes span { color: #0d8a57; font-weight: 600; }
.kb-plans .no { color: var(--muted); }
.kb-plans > a { display: block; margin-top: 7px; color: #1877c2; font-size: .8rem; }
.kb-dict { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.kb-dict > div { padding: 12px 15px; border: 1px solid var(--stroke); border-radius: 12px; background: #fff; }
.kb-dict > div[hidden] { display: none; }
.kb-dict dt { font-weight: 700; }
.kb-dict dd { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
@media (max-width: 1180px) {
  .kb-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kb-chapters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kb-layout { grid-template-columns: 220px minmax(0, 1fr); } .kb-aside { display: none; }
}
@media (max-width: 800px) {
  .kb-paths, .kb-chapters, .kb-dict { grid-template-columns: minmax(0, 1fr); }
  .kb-layout { grid-template-columns: minmax(0, 1fr); } .kb-side { position: static; max-height: none; }
  .kb-side details:not([open]) { display: none; } .kb-search kbd { display: none; }
}

/* day map: a tidy size, centred */
.kb-map { max-width: 820px; min-width: 620px; margin: 0 auto; }
.kb-day .section-head { margin-bottom: 8px; }
.kb-day { padding-bottom: clamp(16px, 2.4vw, 32px); }

/* ---------- easy for everyone: larger type, stronger contrast, big targets ---------- */
.page-kb { --muted: #3f5266; }
.page-kb main { font-size: calc(18px * var(--kb-scale, 1)); line-height: 1.6; }
.kb-lead { margin: 0; font-size: 1.15em; color: var(--muted); }
.kb-search--big input { padding: 20px 24px; font-size: 1.15em; border-width: 2px; }
.kb-search kbd { display: none; }
.kb-results a { padding: 12px 14px; }
.kb-results strong { font-size: 1.05em; }

.kb-tasks-sec { padding-top: clamp(14px, 2vw, 26px); padding-bottom: clamp(20px, 3vw, 40px); }
.kb-tasks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 1040px; margin: 0 auto; padding: 0; }
.kb-tasks li { animation: kbRise .6s cubic-bezier(.2, 1.2, .3, 1) calc(var(--i) * 60ms) both; }
@keyframes kbRise { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.kb-tasks a { display: grid; grid-template-columns: 76px minmax(0, 1fr); column-gap: 16px; align-items: center; min-height: 104px; padding: 14px 18px; border: 2px solid var(--stroke); border-radius: 20px; background: #fff; color: #12263a; text-decoration: none; transition: transform .22s, border-color .22s, box-shadow .22s; }
.kb-tasks a:hover, .kb-tasks a:focus-visible { transform: translateY(-4px); border-color: #2f9fe8; box-shadow: 0 20px 34px -24px rgba(30, 60, 90, .6); }
.kb-tasks a:focus-visible { outline: 3px solid #1877c2; outline-offset: 2px; }
.kb-task-ic { grid-row: span 2; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; transition: transform .3s cubic-bezier(.2, 1.6, .3, 1); }
.kb-tasks a:hover .kb-task-ic { transform: rotate(-5deg) scale(1.07); }
.kb-task-ic svg { width: 54px; height: 54px; }
.kb-task-ic path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: skDraw .9s ease-out .25s forwards; }
.kb-tasks strong { align-self: end; font-size: 1.22em; line-height: 1.2; letter-spacing: -.01em; }
.kb-tasks a > span:last-child { align-self: start; color: var(--muted); font-size: .86em; }
.kb-map { max-width: 760px; }

.kb-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; max-width: 800px; margin: 0 auto; box-sizing: content-box; }
.kb-back { display: inline-flex; align-items: center; gap: 8px; min-height: 50px; padding: 0 18px; border: 2px solid var(--stroke); border-radius: 13px; background: #fff; color: #12263a; font-weight: 700; text-decoration: none; white-space: nowrap; }
.kb-back:hover { border-color: #2f9fe8; }
.kb-top .kb-search { flex: 1 1 240px; }
.kb-top .kb-search input { min-height: 50px; border-width: 2px; }
.kb-layout { display: block; padding-top: 6px; }
.kb-article { margin: 0 auto; max-width: 800px; }
.kb-chap { margin: 8px 0 0; color: #1877c2; font-size: .82em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.kb-article h1 { font-size: clamp(2em, 4vw, 2.7em); }
.kb-article section h2 { font-size: 1.35em; }
.kb-sum { color: #24384c; font-size: 1.15em; }
.kb-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.kb-tools[hidden] { display: none; }
.kb-size { display: inline-flex; gap: 6px; }
.kb-tool { min-height: 48px; min-width: 52px; padding: 0 16px; border: 2px solid var(--stroke); border-radius: 12px; background: #fff; color: #12263a; font: inherit; font-size: .9em; font-weight: 700; cursor: pointer; }
.kb-tool:hover, .kb-tool:focus-visible { border-color: #2f9fe8; background: #e6f4ff; }
.kb-card { padding: 16px 20px; border: 2px solid var(--stroke); border-radius: 16px; background: #fff; }

.kb-progress { display: grid; gap: 7px; margin-bottom: 14px; font-weight: 700; color: #1877c2; }
.kb-progress[hidden] { display: none; }
.kb-progress i { display: block; height: 12px; overflow: hidden; border-radius: 12px; background: #dbe8f2; }
.kb-progress u { display: block; height: 100%; border-radius: 12px; background: linear-gradient(90deg, #2f9fe8, #22c3bb); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2, .9, .3, 1); }
[data-kb-stepper] h3 { font-size: 1.2em; }
[data-kb-stepper] .kb-steps p { color: #24384c; }
.is-stepping .kb-steps li { display: none; padding: 26px 24px 26px 92px; border: 2px solid #bfdcf0; border-radius: 20px; background: #fff; outline: none; }
.is-stepping .kb-steps { counter-reset: none; }
.is-stepping .kb-steps li.now { display: block; }
.is-stepping .kb-steps li.in { animation: kbStep .4s cubic-bezier(.2, 1, .3, 1); }
@keyframes kbStep { from { opacity: 0; transform: translateX(26px); } }
.is-stepping .kb-steps li::before { left: 24px; top: 24px; width: 50px; height: 50px; font-size: 1.3em; background: #e6f4ff; }
.is-stepping .kb-steps li::after { display: none; }
.kb-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.kb-nav[hidden] { display: none; }
.kb-big { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 28px; border: 2px solid #1877c2; border-radius: 15px; background: #1877c2; color: #fff; font: inherit; font-size: 1.08em; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.kb-big:hover { background: #125f9c; transform: translateY(-2px); }
.kb-big:focus-visible, .kb-tool:focus-visible, .kb-back:focus-visible, .kb-linkbtn:focus-visible { outline: 3px solid #f2a93b; outline-offset: 2px; }
.kb-big--ghost { background: #fff; color: #1877c2; border-color: #bfdcf0; }
.kb-big--ghost:hover { background: #e6f4ff; }
.kb-linkbtn { display: block; min-height: 44px; margin: 10px auto 0; padding: 0 10px; border: 0; background: none; color: #1877c2; font: inherit; font-size: .92em; text-decoration: underline; cursor: pointer; }
.kb-linkbtn[hidden] { display: none; }
.kb-done { padding: 26px 20px; border-radius: 20px; background: #e3f8f6; text-align: center; outline: none; animation: kbPop .5s cubic-bezier(.2, 1.5, .3, 1); }
.kb-done[hidden] { display: none; }
@keyframes kbPop { from { opacity: 0; transform: scale(.9); } }
.kb-done svg { width: 110px; height: 110px; }
.kb-done path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: skDraw .6s ease-out .2s forwards; }
.kb-done h3 { margin: 6px 0 0; font-size: 1.6em; }
.kb-done p { margin: 0 0 14px; }

.kb-touch ul { gap: 8px; }
.kb-touch li { padding: 6px 14px; font-size: .9em; }
.kb-touch li.on { background: #e6f4ff; color: #125f9c; }
.kb-touch h2 { font-size: .8em !important; color: #3f5266; }
.kb-note--warn { background: #ffefcf; }
.kb-article .kb-plans { margin-top: 30px; padding: 16px 20px; border: 2px solid var(--stroke); }
.kb-plans h2 { margin-bottom: 8px; }
.kb-plans ul { margin: 0; padding: 0; list-style: none; }
.kb-plans li { padding: 6px 0; border-top: 1px solid var(--stroke); }
.kb-plans li span { font-size: 1em; font-weight: 700; }
.kb-plans .no { color: #3f5266; }
.kb-related a { padding: 14px 16px; border-width: 2px; }
.kb-call { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-radius: 18px; background: linear-gradient(120deg, #e6f4ff, #e3f8f6); }
.kb-call h2 { margin: 0 !important; }
.kb-call p { margin: 0; }

.kb-word { position: relative; display: inline; }
.kb-word button { padding: 0; border: 0; border-bottom: 2px dashed #1877c2; background: none; color: #125f9c; font: inherit; font-weight: 700; cursor: help; }
.kb-tip { position: absolute; left: 0; top: calc(100% + 8px); z-index: 30; display: none; width: min(300px, 76vw); padding: 12px 14px; border-radius: 13px; background: #12263a; color: #fff; font-size: .9rem; font-weight: 400; line-height: 1.45; box-shadow: 0 18px 34px -16px rgba(0, 0, 0, .6); animation: kbPop .2s ease-out; }
.kb-word.show .kb-tip { display: block; }
.kb-chapter ul, .kb-path ol { font-size: .92em; }
.kb-dict dd { font-size: 1em; }
@media (max-width: 900px) { .kb-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .kb-tasks { grid-template-columns: minmax(0, 1fr); }
  .is-stepping .kb-steps li { padding: 78px 20px 22px; }
  .kb-nav .kb-big { flex: 1; padding: 0 12px; }
  .kb-call .kb-big { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .kb-tasks li, .is-stepping .kb-steps li.in, .kb-done, .kb-tip { animation: none; }
  .kb-task-ic path, .kb-done path { animation: none; stroke-dashoffset: 0; }
  .kb-progress u { transition: none; }
}

/* the journey: masters to all settled */
.kb-day-head { max-width: 760px; margin: 0 auto 10px; text-align: center; }
.kb-day-head .eyebrow { justify-content: center; }
.kb-day-head h2 { margin: 6px 0; }
.kb-day-head p:last-child { margin: 0; color: var(--muted); }
.kb-map { max-width: 960px; min-width: 0; }
.kb-map-wrap { overflow: visible; }
.kb-stop { outline: none; }
.kb-stop > circle:nth-child(2), .kb-stop g, .kb-stop text { transition: transform .25s cubic-bezier(.2, 1.5, .3, 1); transform-box: fill-box; transform-origin: center; }
.kb-stop:hover > circle:nth-child(2), .kb-stop:focus-visible > circle:nth-child(2) { stroke: #1877c2; stroke-width: 4; }
.kb-stop:hover text, .kb-stop:focus-visible text { fill: #1877c2; }
.kb-halo { opacity: 0; transform-box: fill-box; transform-origin: center; animation: kbHalo 12s linear calc(1.6s + var(--k) * 1.5s) infinite; }
@keyframes kbHalo { 0% { opacity: 0; transform: scale(.8); } 3% { opacity: .9; transform: scale(1); } 9% { opacity: .55; transform: scale(1.12); } 13%, 100% { opacity: 0; transform: scale(1.2); } }
.kb-stop--done .kb-halo { animation-name: kbHaloDone; }
@keyframes kbHaloDone { 0% { opacity: 0; transform: scale(.8); } 3% { opacity: 1; transform: scale(1.06); } 7% { opacity: .5; transform: scale(1.22); } 11% { opacity: .9; transform: scale(1.08); } 16%, 100% { opacity: 0; transform: scale(1.26); } }
.kb-runner { offset-distance: 0%; offset-rotate: 0deg; animation: kbRun 12s linear 1.6s infinite; }
@keyframes kbRun { 0% { offset-distance: 0%; opacity: 1; } 92% { offset-distance: 100%; opacity: 1; } 98%, 100% { offset-distance: 100%; opacity: 0; } }
.kb-flow { display: none; list-style: none; margin: 14px 0 0; padding: 0; }
.kb-flow li { position: relative; padding-bottom: 10px; }
.kb-flow li:not(:last-child)::after { content: ""; position: absolute; left: 37px; top: 76px; bottom: 0; border-left: 3px dashed #9fcbe8; }
.kb-flow a { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 8px 12px; border: 2px solid var(--stroke); border-radius: 16px; background: #fff; color: #12263a; text-decoration: none; }
.kb-flow .n { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border: 2px solid #12263a; border-radius: 50%; font-weight: 800; }
.kb-flow strong { display: block; font-size: 1.1em; }
.kb-flow small { color: var(--muted); font-size: .86em; }
.kb-flow .done a { border-color: #0d7a4c; background: #e9f9ef; }
@media (max-width: 760px) { .kb-map-wrap { display: none; } .kb-flow { display: block; } }
@media (prefers-reduced-motion: reduce) { .kb-halo, .kb-runner { animation: none; } .kb-runner { display: none; } }

/* paths by job: one list at a time */
.kb-roles { max-width: 820px; margin: 18px auto 0; }
.kb-role-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.kb-role-tabs[hidden] { display: none; }
.kb-role-tabs button { min-height: 50px; padding: 0 20px; border: 2px solid var(--stroke); border-radius: 99px; background: #fff; color: #12263a; font: inherit; font-size: .92em; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.kb-role-tabs button:hover { border-color: #2f9fe8; }
.kb-role-tabs button[aria-selected="true"] { background: #1877c2; border-color: #1877c2; color: #fff; }
.kb-role-tabs button:focus-visible, .kb-row summary:focus-visible { outline: 3px solid #f2a93b; outline-offset: 2px; }
.kb-role { padding: 20px 24px; border: 2px solid var(--stroke); border-radius: 18px; background: #fff; animation: kbPop .25s ease-out; }
.kb-role[hidden] { display: none; }
.kb-role h3 { display: none; }
.kb-role-tabs[hidden] ~ .kb-role h3 { display: block; margin: 0; }
.kb-role > p { margin: 0 0 10px; color: var(--muted); }
.kb-role ol { list-style: none; counter-reset: r; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; margin: 0; padding: 0; }
.kb-role li { counter-increment: r; }
.kb-role a { display: flex; align-items: center; gap: 11px; min-height: 48px; color: #12263a; text-decoration: none; line-height: 1.3; }
.kb-role a::before { content: counter(r); display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #e6f4ff; color: #125f9c; font-size: .8em; font-weight: 700; }
.kb-role a:hover { color: #1877c2; text-decoration: underline; }

/* all guides: a simple contents list */
.kb-toc { max-width: 820px; margin: 18px auto 0; border: 2px solid var(--stroke); border-radius: 18px; background: #fff; overflow: hidden; }
.kb-row { scroll-margin-top: 90px; }
.kb-row + .kb-row { border-top: 1px solid var(--stroke); }
.kb-row summary { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 20px; list-style: none; cursor: pointer; transition: background .2s; }
.kb-row summary::-webkit-details-marker { display: none; }
.kb-row summary:hover { background: #f1f8fe; }
.kb-row-n { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #e6f4ff; color: #125f9c; font-weight: 700; }
.kb-row-t { flex: 1; min-width: 0; }
.kb-row-t strong { display: block; font-size: 1.08em; line-height: 1.25; }
.kb-row-t small { color: var(--muted); font-size: .84em; }
.kb-row-c { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .84em; white-space: nowrap; }
.kb-row-c::after { content: "+"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #1877c2; color: #fff; font-size: 1.15em; font-weight: 700; line-height: 1; }
.kb-row[open] .kb-row-c::after { content: "−"; }
.kb-row ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; padding: 2px 20px 14px 70px; list-style: none; animation: kbPop .2s ease-out; }
.kb-row li a { display: flex; align-items: center; min-height: 44px; color: #12263a; line-height: 1.3; text-decoration: none; }
.kb-row li a:hover { color: #1877c2; text-decoration: underline; }
.kb-dict-link { margin: 16px 0 0; text-align: center; }
@media (max-width: 620px) {
  .kb-role ol, .kb-row ul { grid-template-columns: minmax(0, 1fr); }
  .kb-row ul { padding-left: 20px; }
  .kb-row-c { font-size: 0; gap: 0; } .kb-row-c::after { font-size: 18px; }
  .kb-role-tabs button { flex: 1 1 40%; }
}
@media (prefers-reduced-motion: reduce) { .kb-role, .kb-row ul { animation: none; } }
.kb-dict-link .link { display: inline; white-space: normal; }


/* ---------- Field Guide layout: a left column of topics beside the page ---------- */
.kb-shell { display: grid; grid-template-columns: 288px minmax(0, 1fr); align-items: start; padding-top: var(--header-h); }
.kb-side { position: sticky; top: var(--header-h); display: grid; align-content: start; gap: 12px; height: calc(100vh - var(--header-h)); padding: 16px 14px 20px; overflow-y: auto; background: #fff; border-right: 1px solid var(--stroke); }
.kb-side-home { font-family: var(--display); font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; color: #12263a; text-decoration: none; padding: 2px 4px; }
.kb-side .kb-search { position: relative; margin: 0; max-width: none; }
.kb-side .kb-search input { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 11px; font-size: .95rem; }
.kb-side .kb-search kbd { display: none; }
.kb-side .kb-results { position: static; width: 100%; margin-top: 6px; box-shadow: none; border: 1px solid var(--stroke); }
.kb-browse > summary { display: none; }
.kb-browse nav { display: grid; gap: 2px; }
.kb-ic { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: #e6f4ff; color: #1877c2; }
.kb-ic svg { width: 18px; height: 18px; }
.kb-side-ch > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 6px; border-radius: 10px; color: #12263a; font-weight: 600; font-size: .95rem; list-style: none; cursor: pointer; }
.kb-side-ch > summary::-webkit-details-marker { display: none; }
.kb-side-ch > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: -3px 6px 0 auto; border-right: 2px solid #5d7183; border-bottom: 2px solid #5d7183; transform: rotate(45deg); transition: transform .2s; }
.kb-side-ch[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.kb-side-ch > summary:hover { background: #f1f8fe; }
.kb-side-ch ul { display: grid; gap: 1px; margin: 2px 0 8px 21px; padding: 0 0 0 12px; border-left: 2px solid #e6f4ff; list-style: none; }
.kb-side-ch li a { display: block; padding: 6px 8px; border-radius: 8px; color: #33495c; font-size: .88rem; line-height: 1.3; text-decoration: none; }
.kb-side-ch li a:hover { background: #f1f8fe; color: #1877c2; }
.kb-side-ch li a[aria-current] { background: #e6f4ff; color: #125f9c; font-weight: 600; }
.kb-side-dict { display: block; margin-top: 8px; padding: 10px 8px; border-top: 1px solid var(--stroke); color: #1877c2; font-size: .9rem; font-weight: 600; text-decoration: none; }
.kb-main { min-width: 0; }
.kb-main .section { padding-inline: clamp(16px, 3vw, 44px); }

/* home: a calm centred search, then topic cards */
.kb-hero--help { display: grid; justify-items: center; gap: 10px; margin: 0; padding: clamp(40px, 6vh, 72px) clamp(16px, 3vw, 44px) 28px; text-align: center; background: radial-gradient(420px 260px at 0 0, rgba(77, 184, 255, .3), transparent 70%), radial-gradient(420px 260px at 100% 0, rgba(34, 195, 187, .22), transparent 70%); }
.kb-count { margin: 0; padding: 4px 12px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--stroke); color: #33495c; font-size: .82rem; font-weight: 600; }
.kb-hero--help h1 { margin: 6px 0 0; font-family: var(--display); font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: #12263a; }
.kb-hero--help .kb-lead { margin: 0 0 10px; color: #4d6275; font-size: 1.05rem; }
.kb-hero--help .kb-search { width: min(100%, 660px); margin: 0; }
.kb-topics-sec { padding: 8px clamp(16px, 3vw, 44px) 12px; }
.kb-topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 1000px; margin: 0 auto; padding: 0; list-style: none; }
.kb-topics a { display: grid; gap: 4px; height: 100%; padding: 18px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--stroke); color: #12263a; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.kb-topics a:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px #2f9fe8, 0 16px 30px -24px rgba(24, 119, 194, .8); }
.kb-topics .kb-ic { width: 40px; height: 40px; margin-bottom: 8px; border-radius: 11px; }
.kb-topics .kb-ic svg { width: 21px; height: 21px; }
.kb-topics strong { font-size: 1.08rem; }
.kb-topics span:last-child { color: #4d6275; font-size: .9rem; }

/* guide pages inside the layout */
.page-kb-guide .kb-top { padding: 18px clamp(16px, 3vw, 44px) 0; }
.page-kb-guide .kb-layout { max-width: 860px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 44px); }

@media (max-width: 1100px) { .kb-topics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .kb-shell { grid-template-columns: minmax(0, 1fr); }
  .kb-side { position: static; height: auto; max-height: none; border-right: 0; border-bottom: 1px solid var(--stroke); }
  .kb-browse > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 8px 12px; border-radius: 11px; background: #f1f8fe; color: #125f9c; font-weight: 600; list-style: none; cursor: pointer; }
  .kb-browse > summary::-webkit-details-marker { display: none; }
  .kb-browse nav { margin-top: 6px; }
}
@media (max-width: 480px) { .kb-topics { gap: 10px; } .kb-topics a { padding: 14px; } }

/* nothing inside the page may push it sideways */
.kb-shell { overflow-x: clip; }
.kb-main { overflow-x: clip; }
.kb-steps li { box-sizing: border-box; max-width: 100%; }
.kb-steps li.now { transform: none; margin-inline: 0; }


/* ---------- the Field Guide's own look ---------- */
/* left column: a pale route with numbered stops */
.kb-side { background: #eef6fc; border-right: 0; box-shadow: inset -1px 0 0 #dbe8f2; }
.kb-side-home { display: grid; gap: 0; line-height: 1.15; }
.kb-side-home small { color: #1877c2; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.kb-side .kb-search input { background: #fff; }
.kb-side-ch { border: 0; }
.kb-side-ch > summary { position: relative; padding-left: 4px; }
.kb-side-ch > summary i { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #2f9fe8; color: #125f9c; font-size: .76rem; font-style: normal; font-weight: 700; }
.kb-side-ch[open] > summary i { background: #1877c2; box-shadow: none; color: #fff; }
.kb-side-ch > summary::after { content: "+"; width: auto; height: auto; margin: 0 6px 0 auto; border: 0; color: #1877c2; font-size: 1.15rem; font-weight: 600; line-height: 1; transform: none; }
.kb-side-ch[open] > summary::after { content: "\2212"; margin-top: 0; transform: none; }
.kb-side-ch > summary:hover { background: #fff; }
.kb-side-ch ul { margin-left: 16px; border-left: 2px dashed #b9d7ec; }
.kb-side-ch li a:hover { background: #fff; }
.kb-side-ch li a[aria-current] { background: #fff; box-shadow: inset 3px 0 0 #f2a93b; }
.kb-side-dict { border-top-color: #cfe2f0; }

/* welcome panel: text beside a hand-drawn guidebook */
.kb-welcome { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(16px, 3vw, 40px); align-items: center; margin: clamp(16px, 2.4vw, 28px) clamp(16px, 3vw, 44px) 0; padding: clamp(24px, 3vw, 40px); border-radius: 22px; background: linear-gradient(120deg, #ffffff, #eaf6fd 60%, #e4f8f5); box-shadow: inset 0 0 0 1px #dbe8f2; }
.kb-welcome-copy { min-width: 0; text-align: left; }
.kb-welcome .eyebrow { margin-bottom: 8px; }
.kb-welcome h1 { margin: 0; font-family: var(--display); font-size: clamp(1.9rem, 3vw, 2.75rem); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; color: #12263a; }
.kb-welcome h1 em { font-style: normal; color: transparent; background: var(--grad); -webkit-background-clip: text; background-clip: text; }
.kb-welcome .kb-lead { margin: 10px 0 16px; color: #4d6275; font-size: 1.04rem; text-align: left; }
.kb-welcome .kb-search { width: 100%; max-width: 560px; margin: 0; }
.kb-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; color: #4d6275; font-size: .9rem; }
.kb-quick a { padding: 6px 12px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px #cfe2f0; color: #125f9c; font-weight: 600; text-decoration: none; }
.kb-quick a:hover { background: #1877c2; color: #fff; }
.kb-book { display: block; width: 100%; max-width: 340px; height: auto; margin-inline: auto; }

/* topics: a numbered list of cards that say when you need them */
.kb-topics-sec { padding: 26px clamp(16px, 3vw, 44px) 8px; }
.kb-topics-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 12px; }
.kb-topics-head h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.02em; }
.kb-topics-head p { margin: 0; color: #4d6275; font-size: .92rem; }
.kb-topics { max-width: none; margin: 0; gap: 12px; }
.kb-topics a { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-content: start; padding: 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px #dbe8f2; }
.kb-t-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: .86rem; font-weight: 700; color: #12263a; }
.kb-t0 .kb-t-n { background: #cfeaff; } .kb-t1 .kb-t-n { background: #c6f3ee; } .kb-t2 .kb-t-n { background: #ffe6b8; }
.kb-t-b { display: grid; gap: 2px; min-width: 0; }
.kb-topics .kb-t-b small { color: #1877c2; font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.kb-topics .kb-t-b strong { font-size: 1.06rem; line-height: 1.25; }
.kb-topics .kb-t-b span { color: #4d6275; font-size: .88rem; line-height: 1.4; }
.kb-topics em { grid-column: 2; color: #125f9c; font-size: .84rem; font-style: normal; font-weight: 600; }
.kb-topics span:last-child { font-size: inherit; }

@media (max-width: 1000px) { .kb-welcome { grid-template-columns: minmax(0, 1fr); } .kb-welcome-art { display: none; } }
@media (max-width: 480px) { .kb-topics { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1180px) { .kb-welcome { grid-template-columns: minmax(0, 1fr); } .kb-welcome-art { display: none; } }

/* room for the underline under guide headings */
.kb-day-head h2 + p, .kb-topics-head h2 + p { margin-top: 20px !important; }
