/* ==========================================================================
   CodeToolz Knowledge Center — Articles (Phase 1)
   Adapted from the approved UI/UX prototype design system. All component rules
   are scoped under `.kc` so they stay isolated from the theme and Elementor.
   Palette: navy structure/headings, blue links/accents, GREEN AS SMALL ACCENT.
   ========================================================================== */

:root {
	--ctkc-navy: #011C44;
	--ctkc-navy-700: #0B2D63;
	--ctkc-blue: #1A4EBC;
	--ctkc-blue-050: #EEF3FB;
	--ctkc-green: #20C997;
	--ctkc-green-050: #ECF9F4;
	--ctkc-ink: #011C44;
	--ctkc-ink-body: #26364D;
	--ctkc-ink-soft: #46556B;
	--ctkc-ink-muted: #5E6B80;
	--ctkc-line: #E3E8EF;
	--ctkc-line-strong: #CBD5E1;
	--ctkc-line-hover: #94A3B8;
	--ctkc-surface: #FFFFFF;
	--ctkc-surface-alt: #F7F9FC;
	--ctkc-surface-sunk: #F1F4F8;
	--ctkc-r-sm: 6px;
	--ctkc-r-control: 8px;
	--ctkc-r-card: 12px;
	--ctkc-r-panel: 16px;
	--ctkc-sh-xs: 0 1px 2px rgba(1, 28, 68, .05);
	--ctkc-sh-hover: 0 12px 28px rgba(1, 28, 68, .10);
	--ctkc-sh-pop: 0 30px 80px rgba(1, 28, 68, .28);
	--ctkc-ease: 200ms cubic-bezier(.2, .7, .2, 1);
	--ctkc-font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--ctkc-font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--ctkc-gutter: 32px;
}

/* ---------- Bundled web fonts (offline; SIL Open Font License) ---------- */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../fonts/source-serif-4-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../fonts/source-serif-4-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url('../fonts/source-serif-4-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

@keyframes ctkc-spin { to { transform: rotate(360deg); } }
@keyframes ctkc-shimmer { to { background-position: -200% 0; } }

/* ==========================================================================
   Base (scoped)
   ========================================================================== */
.kc { font-family: var(--ctkc-font-ui); font-size: 16px; line-height: 1.6; color: var(--ctkc-ink-body); }
.kc *, .kc *::before, .kc *::after { box-sizing: border-box; }
.kc [hidden] { display: none !important; }
.kc img { max-width: 100%; height: auto; }
.kc h1, .kc h2, .kc h3, .kc h4 { margin: 0; color: var(--ctkc-ink); }
.kc p { margin: 0; }
.kc ul, .kc ol { margin: 0; padding: 0; }
.kc a { color: var(--ctkc-blue); text-decoration: none; transition: color var(--ctkc-ease); }
.kc a:hover { color: var(--ctkc-navy); }
/* The Elementor kit styles every link (`.elementor-kit-* a { font-weight: bold; color }`)
   and loads after this file; card links would otherwise make all card text bold. */
body .kc a { font-weight: inherit; color: var(--ctkc-blue); }
body .kc a:hover { color: var(--ctkc-navy); }
.kc :focus-visible { outline: 2px solid var(--ctkc-blue); outline-offset: 2px; border-radius: 4px; }
.kc .visually-hidden,
.ctkc-live { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kc .muted { color: var(--ctkc-ink-muted); }

.kc .ctkc-container { max-width: 1240px; margin: 0 auto; padding: 0 var(--ctkc-gutter); }
.kc .container--wide { max-width: 1440px; }

.kc .icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kc .icon--sm { width: 16px; height: 16px; }
.kc .icon--xs { width: 14px; height: 14px; stroke-width: 2.1; }

/* ==========================================================================
   Typography helpers
   ========================================================================== */
.kc .page-title { font-family: var(--ctkc-font-display); font-size: 44px; line-height: 1.1; font-weight: 700; letter-spacing: -.015em; color: var(--ctkc-ink); }
.kc .page-lead { font-size: 18px; line-height: 1.6; color: var(--ctkc-ink-soft); max-width: 640px; }
.kc .section-title { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--ctkc-ink); }
.kc .eyebrow, .kc .card-kicker, .kc .section-search__label, .kc .sidebar h2 {
	font-size: 12px; line-height: 1.4; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.kc .eyebrow, .kc .card-kicker { color: var(--ctkc-blue); }
.kc .text-link { font-size: 15px; font-weight: 600; color: var(--ctkc-blue); }
.kc .text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.kc .result-count { font-size: 14px; color: var(--ctkc-ink-muted); }

/* ==========================================================================
   Buttons, chips, search field
   ========================================================================== */
.kc .btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 18px; border-radius: var(--ctkc-r-control); border: 1px solid transparent;
	font: inherit; font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background var(--ctkc-ease), border-color var(--ctkc-ease), color var(--ctkc-ease), box-shadow var(--ctkc-ease), transform var(--ctkc-ease);
}
.kc .btn--primary { background: var(--ctkc-navy); border-color: var(--ctkc-navy); color: #fff; }
.kc .btn--primary:hover { background: var(--ctkc-navy-700); border-color: var(--ctkc-navy-700); color: #fff; box-shadow: 0 6px 14px rgba(1, 28, 68, .18); }
.kc .btn--primary:active { transform: translateY(1px); box-shadow: none; }
.kc .btn--ghost { background: #fff; border-color: var(--ctkc-line-strong); color: var(--ctkc-navy); }
.kc .btn--ghost:hover { border-color: var(--ctkc-line-hover); background: var(--ctkc-surface-alt); color: var(--ctkc-navy); }
.kc .btn--ghost:active { background: var(--ctkc-surface-sunk); }
.kc .btn-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kc .btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

.kc .pill {
	display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px;
	border: 1px solid var(--ctkc-line-strong); background: #fff; font: inherit; font-size: 13px; font-weight: 500;
	color: var(--ctkc-ink-body); text-decoration: none; white-space: nowrap;
}
.kc .pill--static { cursor: default; }
.kc .pill--static:hover { border-color: var(--ctkc-line-strong); }

/* Search field */
.kc .section-search { display: flex; flex-direction: column; gap: 8px; }
.kc .section-search__label { color: var(--ctkc-ink-muted); }
.kc .section-search__scope { font-size: 13px; color: var(--ctkc-ink-muted); }
.kc .search-field {
	display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 5px 5px 5px 14px;
	background: #fff; border: 1px solid var(--ctkc-line-strong); border-radius: 10px; box-shadow: var(--ctkc-sh-xs);
	transition: border-color var(--ctkc-ease), box-shadow var(--ctkc-ease);
}
.kc .search-field:hover { border-color: var(--ctkc-line-hover); }
.kc .search-field:focus-within { border-color: var(--ctkc-blue); box-shadow: 0 0 0 4px rgba(26, 78, 188, .14); }
.kc .search-field .icon { color: var(--ctkc-ink-muted); }
.kc .search-field input { flex: 1; min-width: 0; height: 42px; margin: 0; padding: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ctkc-ink); }
.kc .search-field input::placeholder { color: #6B778B; }
.kc .search-field input::-webkit-search-cancel-button { cursor: pointer; }
.kc .search-field .btn { min-height: 42px; }
.kc .search-field--hero { min-height: 58px; }
.kc .search-field--hero input { font-size: 17px; }

/* Select (listing Sort control) */
.kc .select {
	flex: 0 1 200px; height: 42px; margin: 0; padding: 0 38px 0 12px;
	border: 1px solid var(--ctkc-line-strong); border-radius: var(--ctkc-r-control);
	font: inherit; font-size: 15px; color: var(--ctkc-ink);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E6B80' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
	appearance: none; -webkit-appearance: none; cursor: pointer; box-shadow: none;
	transition: border-color var(--ctkc-ease);
}
.kc .select:hover { border-color: var(--ctkc-line-hover); }
.kc .select:focus-visible { border-color: var(--ctkc-blue); }
.kc .select--sm { flex: none; width: 168px; height: 38px; font-size: 14px; }
.kc .sort-label { font-size: 14px; font-weight: 500; color: var(--ctkc-ink-muted); }

.kc .kc-search { width: 100%; max-width: 600px; }
/* Search results panel (.sr): see kc-search.css (shared search component). */

/* ==========================================================================
   Cards + grids
   ========================================================================== */
.kc .card { background: #fff; border: 1px solid var(--ctkc-line); border-radius: var(--ctkc-r-card); box-shadow: var(--ctkc-sh-xs); transition: border-color var(--ctkc-ease), box-shadow var(--ctkc-ease), transform var(--ctkc-ease); }
.kc .card--link { display: flex; flex-direction: column; overflow: hidden; height: 100%; text-decoration: none; color: inherit; }
.kc .card--link:hover { border-color: var(--ctkc-line-strong); box-shadow: var(--ctkc-sh-hover); transform: translateY(-2px); color: inherit; }
.kc .card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ctkc-surface-sunk); border-bottom: 1px solid var(--ctkc-line); }
.kc .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.kc .card--link:hover .card-media img { transform: scale(1.03); }
/* No featured image: neutral media well keeps every card the same shape. */
.kc .card-media--placeholder { display: grid; place-items: center; color: var(--ctkc-line-hover); background: linear-gradient(135deg, var(--ctkc-surface-sunk), var(--ctkc-blue-050)); }
.kc .card-media--placeholder .icon { width: 40px; height: 40px; stroke-width: 1.4; }
.kc .card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.kc .card-title { font-size: 18px; line-height: 1.35; font-weight: 700; color: var(--ctkc-ink); transition: color var(--ctkc-ease); }
.kc .card--link:hover .card-title { color: var(--ctkc-blue); }
.kc .card-text { font-size: 15px; line-height: 1.55; color: var(--ctkc-ink-soft); }
/* Only grid cards clamp the excerpt; the Featured card shows it in full. */
.kc .article-card .card-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kc .card-meta { margin-top: auto; padding-top: 6px; font-size: 13px; line-height: 1.5; color: var(--ctkc-ink-muted); }
.kc .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.kc .container--wide .card-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }

/* ==========================================================================
   Page structure, breadcrumb, sidebar
   ========================================================================== */
.kc .page-head { background: var(--ctkc-surface-alt); border-bottom: 1px solid var(--ctkc-line); }
.kc .page-head__inner { max-width: 1440px; margin: 0 auto; padding: 28px var(--ctkc-gutter) 36px; display: flex; flex-direction: column; gap: 14px; }
/* Title/description left, search right; stacks at <=860px (see Responsive). */
.kc .page-head__row { display: flex; flex-wrap: nowrap; gap: 24px 48px; align-items: flex-end; justify-content: space-between; }
.kc .page-head__row--stack { flex-direction: column; align-items: stretch; gap: 22px; }
.kc .page-head__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.kc .breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ctkc-ink-muted); }
.kc .breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.kc .breadcrumb li + li::before { content: "›"; color: var(--ctkc-line-hover); }
.kc .breadcrumb a { color: var(--ctkc-blue); }
.kc .breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

.kc .main-body { padding-top: 40px; padding-bottom: 88px; }
.kc .section { display: flex; flex-direction: column; gap: 20px; }
.kc .section-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.kc .section-head__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.kc .load-more-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 8px; }
.kc .load-more-wrap .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
/* A failed Resource "Load more" (kc-articles.js): the reason, under the button kept for a retry. */
.kc .load-more-error { flex-basis: 100%; margin: 0; text-align: center; font-size: 14px; color: var(--ctkc-ink-soft); }
.kc .load-more-error:empty { display: none; }
/* Loading spinner (same look as the search panel's .sr-spinner): busy Load more buttons and the view loader. */
.kc .ctkc-spinner { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ctkc-line-strong); border-top-color: var(--ctkc-blue); animation: ctkc-spin .7s linear infinite; }
/* The PCC Customization loader (its icons/loading.gif), used in place of the CSS spinner when available. */
.kc img.ctkc-loader-gif { flex: none; display: block; width: 20px; height: 20px; max-width: none; }

.kc .layout-sidebar { display: flex; gap: 40px; align-items: flex-start; }
.kc .layout-sidebar__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
/* Same-page navigation (kc-articles.js): the listing dims while the next view loads. */
.kc .layout-sidebar__main, .kc .page-head__text { transition: opacity .15s ease; }
.kc.is-navigating .layout-sidebar__main, .kc.is-navigating .page-head__text { opacity: .55; cursor: progress; }
/* Loading pill pinned under the sticky header, centred over the listing (left set by
   kc-articles.js). Revealed after a short delay so instant (prefetched) swaps don't flash it. */
.kc .ctkc-nav-loader { position: fixed; top: var(--ctkc-sticky-top, 24px); left: 50%; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--ctkc-line); border-radius: 999px; background: #fff; box-shadow: var(--ctkc-sh-hover); font-size: 14px; font-weight: 500; line-height: 1.4; color: var(--ctkc-ink-soft); white-space: nowrap; transform: translateX(-50%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease, visibility 0s linear .15s; }
.kc.is-navigating .ctkc-nav-loader { opacity: 1; visibility: visible; transition: opacity .15s ease .15s, visibility 0s linear .15s; }
/* PCC style: just the centred loader image, over the middle of the visible listing. */
.kc .ctkc-nav-loader--gif { top: calc(50% + var(--ctkc-sticky-top, 24px) / 2); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: translate(-50%, -50%); }
.kc .ctkc-nav-loader--gif img.ctkc-loader-gif { width: 120px; height: 120px; }
/* Prototype: top = sticky header (88px) + 24px. The site's Elementor sticky header
   varies in height, so kc-articles.js sets --ctkc-sticky-top to its height + 24px. */
.kc .sidebar { flex: 0 0 240px; min-width: 0; position: sticky; top: var(--ctkc-sticky-top, 24px); transition: top .2s ease; }
/* The Elementor header template sets `html, body { overflow-x: hidden }`. With both
   set, body becomes its own scroll container and position: sticky never engages.
   `clip` keeps the horizontal clipping without creating a scroll container. */
body:has(.kc .sidebar) { overflow-x: clip; }
.kc .sidebar h2 { color: var(--ctkc-ink-muted); padding: 0 12px; margin-bottom: 8px; }
.kc .sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.kc .sidebar a { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: var(--ctkc-r-control); font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ctkc-ink-soft); text-decoration: none; transition: background var(--ctkc-ease), color var(--ctkc-ease); }
.kc .sidebar a em { font-style: normal; flex: 1; }
.kc .sidebar a span { font-size: 13px; font-weight: 500; color: var(--ctkc-ink-muted); }
.kc .sidebar a .icon { color: var(--ctkc-ink-muted); }
.kc .sidebar a:hover { background: var(--ctkc-surface-sunk); color: var(--ctkc-ink); }
.kc .sidebar a[aria-current="page"] { background: var(--ctkc-surface-sunk); color: var(--ctkc-navy); font-weight: 600; }
.kc .sidebar a[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--ctkc-green); }
.kc .sidebar a[aria-current="page"] .icon { color: var(--ctkc-navy); }

.kc .empty-state { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 28px; text-align: center; background: var(--ctkc-surface-alt); border: 1px dashed var(--ctkc-line-strong); border-radius: var(--ctkc-r-card); }
.kc .empty-state h2, .kc .empty-state h3 { font-size: 19px; font-weight: 700; }

/* ==========================================================================
   Articles: featured + popular row (Explore Articles, first page)
   ========================================================================== */
.kc .feature-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 16px; }
.kc .feature-card .card-media { aspect-ratio: 16 / 8; }
.kc .feature-card .card-body { padding: 24px 28px 26px; gap: 10px; }
.kc .feature-card .card-title { font-size: 24px; line-height: 1.3; }
.kc .tag-featured { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; color: var(--ctkc-ink); }
.kc .tag-featured::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ctkc-green); }
.kc .popular { padding: 22px 24px; }
.kc .popular__title { font-size: 12px; line-height: 1.4; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ctkc-ink-muted); margin-bottom: 4px; }
.kc .popular ol { list-style: none; }
.kc .popular li { display: flex; gap: 12px; padding: 14px 0; }
.kc .popular li + li { border-top: 1px solid var(--ctkc-line); }
.kc .popular__n { flex: none; width: 18px; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--ctkc-ink-muted); }
.kc .popular a { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; }
.kc .popular__img { width: 64px; height: 36px; flex: none; object-fit: cover; border-radius: var(--ctkc-r-sm); border: 1px solid var(--ctkc-line); }
.kc .popular__img--placeholder { display: block; background: linear-gradient(135deg, var(--ctkc-surface-sunk), var(--ctkc-blue-050)); }
.kc .popular__text { display: flex; flex-direction: column; gap: 2px; }
.kc .popular a strong { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ctkc-ink); transition: color var(--ctkc-ease); }
.kc .popular a:hover strong { color: var(--ctkc-blue); }
.kc .popular__text > span { font-size: 13px; color: var(--ctkc-ink-muted); }
.kc .empty-state p { max-width: 520px; color: var(--ctkc-ink-soft); }

.kc .pagination { display: flex; justify-content: center; }
.kc .pagination .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; margin: 0 3px; border: 1px solid var(--ctkc-line-strong); border-radius: var(--ctkc-r-control); color: var(--ctkc-navy); font-weight: 600; text-decoration: none; }
.kc .pagination .page-numbers.current { background: var(--ctkc-navy); border-color: var(--ctkc-navy); color: #fff; }
.kc .pagination .page-numbers:hover:not(.current) { background: var(--ctkc-surface-alt); }

/* ==========================================================================
   Article detail
   ========================================================================== */
.kc-article #ctkc-main { padding-bottom: 0; }
/* One reading column shared by header, featured image, body and footer so every edge lines up. */
.kc-article { --ctkc-article-col: 780px; }
.kc .article-head,
.kc .article-figure,
.kc .prose,
.kc .article-foot { max-width: calc(var(--ctkc-article-col) + 2 * var(--ctkc-gutter)); margin-left: auto; margin-right: auto; padding-left: var(--ctkc-gutter); padding-right: var(--ctkc-gutter); }
.kc .article-head { padding-top: 36px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 18px; }
.kc .article-cat { align-self: flex-start; padding: 5px 10px; border-radius: var(--ctkc-r-sm); background: var(--ctkc-blue-050); color: var(--ctkc-blue); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; transition: background var(--ctkc-ease), color var(--ctkc-ease); }
.kc .article-cat:hover { background: #DCE6F9; color: var(--ctkc-navy); }
.kc .article-title { font-family: var(--ctkc-font-display); font-size: 46px; line-height: 1.12; font-weight: 700; letter-spacing: -.015em; }
.kc .article-dek { font-size: 19px; line-height: 1.6; color: var(--ctkc-ink-soft); }
.kc .article-byline { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding-top: 18px; border-top: 1px solid var(--ctkc-line); }
.kc .author { display: flex; gap: 12px; align-items: center; }
.kc .author__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ctkc-surface-sunk); border: 1px solid var(--ctkc-line); font-size: 14px; font-weight: 700; color: var(--ctkc-navy); }
.kc .author__name { font-size: 15px; font-weight: 600; color: var(--ctkc-ink); }
.kc .author__meta { font-size: 14px; color: var(--ctkc-ink-muted); }

.kc .ctkc-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kc .ctkc-share__btn { min-width: 40px; height: 40px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--ctkc-r-control); border: 1px solid var(--ctkc-line-strong); background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--ctkc-navy); text-decoration: none; cursor: pointer; transition: background var(--ctkc-ease), border-color var(--ctkc-ease); }
.kc .ctkc-share__btn:hover { border-color: var(--ctkc-line-hover); background: var(--ctkc-surface-alt); color: var(--ctkc-navy); }
.kc .ctkc-share__btn .brandmark { width: 17px; height: 17px; fill: currentColor; stroke: none; }
.kc .ctkc-share__copy .ctkc-share__copy-icon { display: inline-flex; }

.kc .article-figure { margin-top: 0; margin-bottom: 0; }
.kc .article-figure img { display: block; width: 100%; max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--ctkc-r-panel); border: 1px solid var(--ctkc-line); }
.kc .article-figure figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--ctkc-ink-muted); }

.kc .prose { padding-top: 40px; padding-bottom: 20px; font-family: var(--ctkc-font-display); font-size: 19px; line-height: 1.75; color: var(--ctkc-ink-body); }
.kc .prose p { margin: 0 0 22px; }
.kc .prose h2 { margin: 44px 0 14px; font-family: var(--ctkc-font-ui); font-size: 26px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
.kc .prose h3 { margin: 30px 0 10px; font-family: var(--ctkc-font-ui); font-size: 20px; line-height: 1.35; font-weight: 700; }
.kc .prose ul, .kc .prose ol { margin: 0 0 22px; padding-left: 24px; }
.kc .prose li { margin-bottom: 8px; }
.kc .prose img { max-width: 100%; height: auto; border-radius: var(--ctkc-r-control); }
.kc .prose figure { max-width: 100%; margin: 28px 0; }
.kc .prose a { text-decoration: underline; text-underline-offset: 3px; }
.kc .prose table { width: 100%; margin: 8px 0 28px; border-collapse: collapse; font-family: var(--ctkc-font-ui); font-size: 15px; line-height: 1.5; }
.kc .prose th,
.kc .prose td { padding: 10px 12px; border: 1px solid var(--ctkc-line); text-align: left; vertical-align: top; }
.kc .prose th { background: var(--ctkc-surface-alt); font-weight: 600; color: var(--ctkc-ink); }

.kc .article-foot { padding-top: 8px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 24px; }
.kc .tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kc .tags__label { font-size: 14px; font-weight: 600; color: var(--ctkc-ink-muted); margin-right: 4px; }
.kc .share-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--ctkc-line); border-bottom: 1px solid var(--ctkc-line); }
.kc .share-bar__label { font-size: 15px; font-weight: 600; color: var(--ctkc-ink); }

.kc .related { background: var(--ctkc-surface-alt); border-top: 1px solid var(--ctkc-line); }
.kc .related__inner { max-width: 1240px; margin: 0 auto; padding: 52px var(--ctkc-gutter) 84px; display: flex; flex-direction: column; gap: 24px; }
.kc .related .section-title { font-size: 24px; }
.kc .related .card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* ==========================================================================
   Toast (appended to <body>, outside .kc — targeted by id)
   ========================================================================== */
#ctkc-toast { position: fixed; left: 50%; bottom: 24px; z-index: 2000; transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 8px; background: #011C44; color: #fff; font: 500 14px/1.4 'Inter', system-ui, sans-serif; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#ctkc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.kc .feature-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
	.kc { --ctkc-gutter: 24px; }
	.kc .page-head__row { flex-direction: column; align-items: stretch; gap: 22px; }
	.kc .page-head__row .page-head__text { flex: none; }
	.kc .sidebar a .icon { display: none; }
	.kc .sidebar a span { margin-left: 2px; }
	.kc .layout-sidebar { flex-direction: column; align-items: stretch; gap: 20px; }
	.kc .sidebar { position: static; flex: none; width: 100%; }
	.kc .sidebar h2 { padding: 0; }
	.kc .sidebar ul { flex-direction: row; overflow-x: auto; gap: 8px; padding: 2px 2px 8px; scrollbar-width: thin; }
	.kc .sidebar li { flex: none; }
	.kc .sidebar a { min-height: 36px; padding: 0 14px; border: 1px solid var(--ctkc-line-strong); border-radius: 999px; background: #fff; font-size: 14px; white-space: nowrap; }
	.kc .sidebar a[aria-current="page"] { background: var(--ctkc-green-050); border-color: var(--ctkc-green); color: var(--ctkc-navy); }
	.kc .sidebar a[aria-current="page"]::before { display: none; }
	.kc .page-title { font-size: 36px; }
	.kc .article-title { font-size: 36px; }
}
@media (max-width: 640px) {
	.kc { --ctkc-gutter: 20px; }
	.kc .page-title { font-size: 31px; }
	.kc .page-lead { font-size: 16px; }
	.kc .page-head__inner { padding-top: 22px; padding-bottom: 28px; }
	.kc .main-body { padding-top: 28px; padding-bottom: 64px; }
	.kc .feature-card .card-body { padding: 20px 22px 22px; }
	.kc .feature-card .card-title { font-size: 21px; }
	.kc .popular { padding: 18px 20px; }
	.kc .section-head__tools { width: 100%; }
	.kc .select--sm { flex: 1; width: auto; }
	.kc .article-title { font-size: 31px; }
	.kc .article-dek { font-size: 17px; }
	.kc .prose { font-size: 17px; padding-top: 28px; }
	.kc .article-head { padding-bottom: 24px; }
	/* Wide tables scroll inside the column instead of widening the page. */
	.kc .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.kc .prose th, .kc .prose td { min-width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
	.kc *, .kc *::before, .kc *::after { transition: none !important; animation: none !important; }
	.kc .card--link:hover { transform: none; }
	.kc .card--link:hover .card-media img { transform: none; }
}

@media print {
	.kc .ctkc-share, .kc .share-bar, .kc .related, .kc .breadcrumb, .kc .sidebar, .kc .ctkc-search { display: none !important; }
	.kc .prose, .kc .article-head, .kc .article-figure, .kc .article-foot { max-width: none; padding-left: 0; padding-right: 0; }
	.kc a { color: #000; text-decoration: underline; }
	.kc .page-head { background: none; border: 0; }
}
