/* Katekile Docs — theme styles */
:root {
	--ink: #000000;
	--ink-2: #1d2230;
	--muted: #5b6170;
	--line: #e3e5ea;
	--line-2: #eef0f3;
	--panel: #f4f5f7;
	--paper: #ffffff;
	--gold: #ffba00;
	--gold-deep: #8a6400;
	--gold-wash: #fff6dc;
	--focus: #2b59ff;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--display: "Playfair Display", Georgia, "Times New Roman", serif;
	--header-h: 64px;
	--radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink-2);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "cv11", "ss01";
}
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.kd-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 6px; }
.kd-skip:focus { left: 8px; }

/* ---------------- Header ---------------- */
.kd-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; height: var(--header-h); }
.kd-header-inner { height: 100%; max-width: 1480px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 18px; }
.kd-wordmark { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.kd-wordmark-k { width: 34px; height: 34px; border-radius: 7px; background: var(--gold); color: #000; display: grid; place-items: center; font: 700 20px/1 var(--display); }
.kd-wordmark-text { display: flex; flex-direction: column; line-height: 1.05; }
.kd-wordmark-text span { font-weight: 700; letter-spacing: .14em; font-size: 15px; text-transform: uppercase; }
.kd-wordmark-text small { color: var(--gold); font-size: 9px; letter-spacing: .42em; text-transform: uppercase; }
.custom-logo-link img { max-height: 40px; width: auto; display: block; }
.kd-header-title { color: #b8bdc8; font-size: 14px; padding-left: 16px; border-left: 1px solid #2f3340; white-space: nowrap; }
.kd-search { margin-left: auto; position: relative; display: flex; align-items: center; width: min(420px, 40vw); }
.kd-search svg { position: absolute; left: 12px; color: #8a90a0; }
.kd-search input { width: 100%; height: 40px; border-radius: 8px; border: 1px solid #2f3340; background: #14161c; color: #fff; padding: 0 40px 0 38px; font: inherit; font-size: 14px; }
.kd-search input::placeholder { color: #8a90a0; }
.kd-search input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(255, 186, 0, .25); }
.kd-search kbd { position: absolute; right: 10px; font: 12px var(--font); color: #8a90a0; border: 1px solid #3a3f4d; border-radius: 4px; padding: 0 6px; }
.kd-erp-link { color: #000; background: var(--gold); text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 14px; border-radius: 8px; white-space: nowrap; }
.kd-erp-link:hover { background: #ffcb3d; color: #000; }
.kd-menu-btn { display: none; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }

/* ---------------- Docs layout ---------------- */
.kd-layout { max-width: 1480px; margin: 0 auto; display: grid; grid-template-columns: 280px minmax(0, 1fr) 230px; gap: 0; }
.kd-layout-wide { grid-template-columns: 280px minmax(0, 1fr); }
.kd-sidebar { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; border-right: 1px solid var(--line); padding: 20px 14px 40px 20px; background: var(--paper); }
.kd-main { min-width: 0; padding: 32px 48px 64px; }
.kd-main:focus { outline: none; }
.kd-article { max-width: 820px; margin: 0 auto; }

/* nav */
.kd-nav-filter input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; background: var(--panel); margin-bottom: 14px; }
.kd-nav ul { list-style: none; margin: 0; padding: 0; }
.kd-nav-section { margin-bottom: 2px; }
.kd-nav-head { display: flex; align-items: center; justify-content: space-between; }
.kd-nav-head > a { flex: 1; font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration: none; padding: 7px 8px; border-radius: 6px; }
.kd-nav-head > a:hover { background: var(--panel); color: var(--ink); }
.kd-nav-toggle { background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.kd-nav-toggle:hover { background: var(--panel); }
.kd-nav-toggle svg { transition: transform .15s ease; }
.kd-nav-section.is-open .kd-nav-toggle svg { transform: rotate(90deg); }
.kd-nav-children { display: none; margin: 2px 0 10px 8px !important; border-left: 1px solid var(--line); }
.kd-nav-section.is-open .kd-nav-children { display: block; }
.kd-nav-children a { display: block; font-size: 14px; color: var(--muted); text-decoration: none; padding: 5px 10px 5px 14px; margin-left: -1px; border-left: 2px solid transparent; line-height: 1.4; }
.kd-nav-children a:hover { color: var(--ink); }
.kd-nav-children ul { margin-left: 12px !important; }
.kd-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--gold); background: linear-gradient(90deg, var(--gold-wash), transparent); }
.kd-nav-head > a[aria-current="page"] { background: var(--gold-wash); }
.kd-nav .is-hidden { display: none !important; }

/* toc */
.kd-toc { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 36px 20px 40px 8px; font-size: 13.5px; }
.kd-toc[hidden] { display: none; }
.kd-toc-title { font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.kd-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.kd-toc li a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; line-height: 1.35; }
.kd-toc li.kd-toc-h3 a { padding-left: 24px; font-size: 13px; }
.kd-toc li a:hover { color: var(--ink); }
.kd-toc li a.is-active { color: var(--ink); border-left-color: var(--gold); }

/* article */
.kd-crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; font-size: 13.5px; color: var(--muted); }
.kd-crumbs li + li::before { content: "/"; margin-right: 6px; color: #b5b9c3; }
.kd-crumbs a { color: var(--muted); text-decoration: none; }
.kd-crumbs a:hover { color: var(--ink); }
.kd-title { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 4vw, 44px); line-height: 1.12; letter-spacing: -.01em; color: var(--ink); margin: 0 0 12px; }
.kd-lede { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0 0 18px; max-width: 68ch; }
.kd-roles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 28px; font-size: 13px; color: var(--muted); }
.kd-roles > span:first-child { margin-right: 2px; }
.kd-role-chip { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--ink); background: var(--gold-wash); border: 1px solid #f1d98a; border-radius: 999px; padding: 2px 10px; }
.kd-content { font-size: 16.5px; }
.kd-content > * { max-width: 72ch; }
.kd-content > .kd-fig, .kd-content > .kd-table-wrap, .kd-content > .kd-cards, .kd-content > .kd-flow, .kd-content > details, .kd-content > table, .kd-content > .kd-callout { max-width: none; }
.kd-content h2 { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.2; color: var(--ink); margin: 48px 0 14px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.kd-content h3 { font-size: 19px; font-weight: 650; color: var(--ink); margin: 32px 0 10px; }
.kd-content p { margin: 0 0 16px; }
.kd-content ul, .kd-content ol { padding-left: 1.4em; margin: 0 0 18px; }
.kd-content li { margin: 6px 0; }
.kd-content li > .kd-fig { margin-top: 14px; }
.kd-content ol > li::marker { font-weight: 700; color: var(--gold-deep); }
.kd-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; background: var(--panel); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.kd-content pre { background: #0d0f14; color: #e8eaf0; padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; line-height: 1.55; }
.kd-content pre code { background: none; border: 0; padding: 0; color: inherit; }
.kd-content strong { color: var(--ink); }

/* figures */
.kd-fig { margin: 22px 0 30px; }
.kd-fig a.kd-zoom { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); cursor: zoom-in; }
.kd-fig img { display: block; width: 100%; }
.kd-fig figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; padding-left: 12px; border-left: 2px solid var(--gold); }
.kd-fig-tall a.kd-zoom { max-height: 900px; overflow-y: auto; }
.kd-fig-mobile { max-width: 340px; }
.kd-fig-mobile a.kd-zoom { border-radius: 22px; border: 6px solid #15171d; }
.kd-missing { color: #b42318; }

/* tables */
.kd-table-wrap { overflow-x: auto; margin: 18px 0 26px; border: 1px solid var(--line); border-radius: var(--radius); }
.kd-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.kd-content > .kd-table, details > .kd-table, .kd-content > table.kd-table { border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0 26px; display: table; }
.kd-table th, .kd-table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.kd-table thead th { background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13.5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.kd-table tbody tr:last-child th, .kd-table tbody tr:last-child td { border-bottom: 0; }
.kd-table tbody th { font-weight: 600; color: var(--ink); }
.kd-table tbody tr:hover { background: #fafbfc; }
.kd-kv th { width: 170px; }
.kd-menu-item { white-space: nowrap; }
.kd-matrix { font-size: 13px; }
.kd-matrix th, .kd-matrix td { padding: 7px 9px; text-align: center; }
.kd-matrix tbody th, .kd-matrix thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--paper); z-index: 1; }
.kd-matrix thead th:first-child { background: var(--panel); }
.kd-p { display: inline-block; min-width: 22px; font-weight: 700; font-size: 12px; border-radius: 4px; padding: 1px 5px; }
.kd-p-r { background: #eef2ff; color: #3341a1; }
.kd-p-c { background: #e9f9ef; color: #146c3a; }
.kd-p-w { background: #eaf4ff; color: #0b5ea8; }
.kd-p-s { background: var(--gold-wash); color: var(--gold-deep); }
.kd-p-x { background: #fdecec; color: #b42318; }
.kd-p-none { color: #b5b9c3; font-weight: 400; }
.kd-p-na { color: #9aa0ab; font-size: 12px; }
.kd-p-code { background: var(--panel); color: var(--ink); letter-spacing: .04em; }
.kd-footnote { font-size: 13.5px; color: var(--muted); }
.kd-tag { font-size: 11.5px; font-weight: 600; background: #111; color: var(--gold); padding: 1px 7px; border-radius: 4px; margin-left: 6px; vertical-align: 1px; }

/* callouts */
.kd-callout { margin: 22px 0 26px; padding: 14px 18px 4px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.kd-callout-title { font-weight: 700; color: var(--ink); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.kd-callout-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3341a1; }
.kd-callout.kd-tip { background: #f1faf4; border-color: #cfe9d8; }
.kd-callout.kd-tip .kd-callout-title::before { background: #1f8a4c; }
.kd-callout.kd-warning { background: var(--gold-wash); border-color: #f1d98a; }
.kd-callout.kd-warning .kd-callout-title::before { background: var(--gold); box-shadow: 0 0 0 2px #000; }
.kd-callout p { margin-bottom: 10px; }

/* details */
.kd-details { margin: 14px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px; }
.kd-details summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--ink); }
.kd-details[open] summary { border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.kd-details .kd-table-wrap { border: 0; }

/* index lists (children, roles) */
.kd-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 22px 0 30px; border-top: 1px solid var(--line); }
.kd-card { display: block; padding: 16px 4px 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-2); }
.kd-card-title { display: block; font-weight: 650; color: var(--ink); font-size: 16.5px; margin-bottom: 3px; }
.kd-card:hover .kd-card-title { color: var(--gold-deep); text-decoration: underline; text-decoration-color: var(--gold); }
.kd-card-text { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.kd-card-arrow { display: none; }
.kd-role-card .kd-role-chip { display: none; }

/* workflow diagram */
.kd-flow { margin: 22px 0 18px; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 10px; background: linear-gradient(#fff, #fff) padding-box; }
.kd-flow-title { font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.kd-flow-row { display: grid; grid-template-columns: minmax(150px, max-content) 1fr minmax(150px, max-content); align-items: center; gap: 12px; padding: 8px 0; border-top: 1px dashed var(--line); }
.kd-flow-row:first-of-type { border-top: 0; }
.kd-flow-arrow { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 10px; }
.kd-flow-arrow::after { content: ""; position: absolute; left: 0; right: 10px; bottom: 3px; height: 2px; background: #c9ccd4; }
.kd-flow-arrow::before { content: ""; position: absolute; right: 0; bottom: -1px; border: 5px solid transparent; border-left: 10px solid #c9ccd4; }
.kd-flow-action { font-weight: 700; color: var(--ink); font-size: 14px; }
.kd-flow-who { font-size: 12.5px; color: var(--muted); }
.kd-state { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; justify-self: start; }
.kd-flow-row .kd-state:last-child { justify-self: end; }
.kd-tone-gray { background: #f1f3f6; color: #3d4352; border-color: #d6dae1; }
.kd-tone-amber { background: #fff6dc; color: #7a5600; border-color: #f1d98a; }
.kd-tone-green { background: #e9f9ef; color: #146c3a; border-color: #b7e4c7; }
.kd-tone-red { background: #fdecec; color: #a11c1c; border-color: #f5c2c2; }
.kd-tone-orange { background: #fff1e6; color: #9a4310; border-color: #f7cfae; }
.kd-tone-blue { background: #eaf4ff; color: #0b5ea8; border-color: #bcd9f5; }
.kd-tone-slate { background: #eceef2; color: #4a5160; border-color: #cfd3db; }

/* pager */
.kd-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 56px 0 10px; }
.kd-pager a { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; text-decoration: none; color: var(--ink); font-weight: 600; }
.kd-pager a span { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.kd-pager a:hover { border-color: var(--gold); }
.kd-pager-next { text-align: right; grid-column: 2; }
.kd-updated { font-size: 13px; color: var(--muted); }

/* search results */
.kd-results { list-style: none; padding: 0; margin: 20px 0; }
.kd-results li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.kd-results a { font-weight: 650; font-size: 18px; }
.kd-results p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.kd-results .kd-results-path { margin: 0 0 2px; font-size: 13px; }

/* ---------------- Home ---------------- */
.kd-hero { background: #000; color: #fff; position: relative; overflow: hidden; }
.kd-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle at 1px 1px, rgba(255, 186, 0, .16) 1px, transparent 0); background-size: 26px 26px; mask-image: radial-gradient(ellipse 70% 90% at 75% 50%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 90% at 75% 50%, #000 0%, transparent 75%); }
.kd-hero-inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 72px 24px 80px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.kd-hero h1 { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -.015em; margin: 0 0 20px; }
.kd-hero p { font-size: 18px; line-height: 1.6; color: #c6cad4; max-width: 52ch; margin: 0 0 28px; }
.kd-hero-search { display: flex; max-width: 560px; background: #fff; border-radius: 10px; padding: 5px; }
.kd-hero-search input { flex: 1; border: 0; font: inherit; font-size: 16px; padding: 10px 12px; min-width: 0; background: transparent; }
.kd-hero-search input:focus { outline: none; }
.kd-hero-search:focus-within { box-shadow: 0 0 0 3px var(--gold); }
.kd-hero-search button { border: 0; background: var(--gold); color: #000; font: inherit; font-weight: 650; padding: 0 20px; border-radius: 7px; cursor: pointer; }

/* the personalised card */
.kd-cardart { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.kd-cr80 { position: relative; width: min(440px, 100%); aspect-ratio: 85.6 / 53.98; border-radius: 4.2% / 6.6%; padding: 6% 7%; color: #f3e6bf;
	background: radial-gradient(120% 140% at 0% 0%, #2a2a2a 0%, #0b0b0b 55%, #000 100%);
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .12);
	transform: rotate(-4deg); animation: kd-card-in 900ms cubic-bezier(.16, 1, .3, 1) both; }
.kd-cr80::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 35%, rgba(255, 186, 0, .14) 48%, transparent 60%); }
.kd-cr80-brand { font-family: var(--display); font-weight: 700; font-size: clamp(18px, 2.2vw, 24px); color: var(--gold); letter-spacing: .02em; }
.kd-cr80-chip { position: absolute; left: 7%; top: 34%; width: 15%; aspect-ratio: 1.3; border-radius: 14%; background: linear-gradient(135deg, #ffe08a, #e0a400 55%, #b98500); display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.kd-cr80-chip i { border: 1px solid rgba(90, 60, 0, .45); border-radius: 2px; }
.kd-cr80-contactless { position: absolute; left: 25%; top: 37%; display: flex; gap: 3px; }
.kd-cr80-contactless span { width: 7px; height: 18px; border: 2px solid rgba(243, 230, 191, .55); border-left: 0; border-radius: 0 12px 12px 0; }
.kd-cr80-contactless span:nth-child(2) { height: 24px; margin-top: -3px; }
.kd-cr80-contactless span:nth-child(3) { height: 30px; margin-top: -6px; }
.kd-cr80-pan { position: absolute; left: 7%; right: 7%; top: 60%; font: 600 clamp(15px, 2.1vw, 22px)/1 "OCR A Std", "Courier New", monospace; letter-spacing: .06em; color: #f6e9c4; text-shadow: 0 1px 0 rgba(0, 0, 0, .9), 0 -1px 0 rgba(255, 255, 255, .25); }
.kd-cr80-row { position: absolute; left: 7%; right: 7%; bottom: 9%; display: flex; justify-content: space-between; align-items: flex-end; font: 600 clamp(11px, 1.3vw, 14px)/1 "Courier New", monospace; letter-spacing: .08em; text-shadow: 0 1px 0 rgba(0, 0, 0, .9); }
.kd-cr80-exp { display: flex; align-items: center; gap: 6px; }
.kd-cr80-exp small { font-size: 6px; line-height: 1; letter-spacing: .05em; opacity: .7; }
.kd-cr80-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 460px; counter-reset: step; }
.kd-cr80-steps span { counter-increment: step; font-size: 12.5px; color: #c6cad4; border: 1px solid #2f3340; border-radius: 999px; padding: 3px 10px 3px 6px; }
.kd-cr80-steps span::before { content: counter(step); display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--gold); color: #000; font-weight: 700; font-size: 11px; margin-right: 6px; }
@keyframes kd-card-in { from { opacity: 0; transform: rotate(-12deg) translateY(30px); } to { opacity: 1; transform: rotate(-4deg); } }

.kd-home-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.kd-home h2 { font-family: var(--display); font-weight: 600; font-size: 34px; color: var(--ink); margin: 0 0 8px; }
.kd-home-index { padding: 64px 0 24px; }
.kd-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin-top: 24px; }
.kd-index-section { padding: 22px 0 26px; border-top: 2px solid var(--ink); }
.kd-index-section h3 { margin: 0 0 6px; font-size: 19px; }
.kd-index-section h3 a { text-decoration: none; color: var(--ink); }
.kd-index-section h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.kd-index-section > p { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 0 0 12px; }
.kd-index-section ul { list-style: none; margin: 0; padding: 0; }
.kd-index-section li a { display: block; padding: 4px 0; font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.kd-index-section li a:hover { color: var(--gold-deep); text-decoration: underline; text-decoration-color: var(--gold); }
.kd-index-section li.kd-more a { color: var(--muted); }
.kd-home-roles { padding: 48px 0 80px; background: var(--panel); margin-top: 32px; }
.kd-home-sub { color: var(--muted); margin: 0 0 24px; }
.kd-rolelist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.kd-rolelist a { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 14.5px; }
.kd-rolelist strong { color: var(--ink); font-size: 15.5px; }
.kd-rolelist a:hover strong { text-decoration: underline; text-decoration-color: var(--gold); }

/* ---------------- Footer ---------------- */
.kd-footer { border-top: 1px solid var(--line); background: var(--paper); }
.kd-footer-inner { max-width: 1480px; margin: 0 auto; padding: 22px 24px; display: flex; justify-content: space-between; gap: 16px; font-size: 13.5px; color: var(--muted); }
.kd-footer p { margin: 0; }

/* ---------------- Lightbox ---------------- */
.kd-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5, 6, 9, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px 24px; }
.kd-lightbox[hidden] { display: none; }
.kd-lightbox img { max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; border-radius: 6px; background: #fff; }
.kd-lightbox-cap { color: #d4d7de; margin: 12px 0 0; font-size: 14px; text-align: center; }
.kd-lightbox-close { position: absolute; top: 14px; right: 18px; background: var(--gold); color: #000; border: 0; font: inherit; font-weight: 650; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.kd-lightbox.is-tall { justify-content: flex-start; overflow-y: auto; }
.kd-lightbox.is-tall img { max-height: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1240px) {
	.kd-layout { grid-template-columns: 260px minmax(0, 1fr); }
	.kd-toc { display: none; }
	.kd-main { padding: 28px 32px 56px; }
	.kd-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	:root { --header-h: 58px; }
	.kd-menu-btn { display: inline-flex; }
	.kd-header-inner { padding: 0 12px; gap: 10px; }
	.kd-header-title, .kd-search kbd, .kd-erp-link { display: none; }
	.kd-search { width: auto; flex: 1; }
	.kd-wordmark-text { display: none; }
	.kd-layout, .kd-layout-wide { display: block; }
	.kd-sidebar { position: fixed; left: 0; top: var(--header-h); bottom: 0; width: min(320px, 86vw); height: auto; z-index: 40; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 8px 0 30px rgba(0, 0, 0, .12); }
	body.kd-nav-open .kd-sidebar { transform: none; }
	.kd-main { padding: 22px 16px 48px; }
	.kd-hero-inner { grid-template-columns: 1fr; padding: 44px 16px 52px; gap: 36px; }
	.kd-index, .kd-rolelist, .kd-cards { grid-template-columns: 1fr; }
	.kd-rolelist a { grid-template-columns: 1fr; gap: 2px; }
	.kd-home-inner { padding: 0 16px; }
	.kd-flow-row { grid-template-columns: 1fr; gap: 6px; }
	.kd-flow-row .kd-state:last-child { justify-self: start; }
	.kd-flow-arrow { align-items: flex-start; text-align: left; }
	.kd-pager { grid-template-columns: 1fr; }
	.kd-pager-next { grid-column: 1; }
	.kd-footer-inner { flex-direction: column; }
	.kd-content h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
	.kd-cr80 { transform: rotate(-4deg); }
}
@media print {
	.kd-header, .kd-sidebar, .kd-toc, .kd-pager, .kd-footer { display: none; }
	.kd-layout { display: block; }
	.kd-main { padding: 0; }
}
