/* KB hero */
.kbhero {
	background: linear-gradient(120deg, var(--hero-1), var(--hero-2) 55%, var(--hero-3));
	padding: 34px 0 40px;
	position: relative;
	overflow: hidden
}

.kbhero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 90% 10%, rgba(94, 153, 255, .28), transparent 42%), radial-gradient(circle at 5% 95%, rgba(0, 193, 167, .18), transparent 40%);
	pointer-events: none
}

.kbhero .wrap {
	position: relative;
	z-index: 2
}

.kbhero h1 {
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 6px
}

.kbhero p {
	color: #c3d0ea;
	font-size: 14px;
	margin: 0 0 18px;
	max-width: 640px
}

.kbsearch {
	position: relative;
	max-width: 620px
}

.kbsearch input {
	width: 100%;
	border: none;
	border-radius: 10px;
	padding: 13px 44px 13px 16px;
	font-family: var(--sans);
	font-size: 14px;
	outline: none;
	box-shadow: var(--shadow-lg)
}

.kbsearch .ic {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #9aa3b2;
	font-size: 16px
}

/* Popular cards */
.pop {
	margin-top: -22px;
	position: relative;
	z-index: 3
}

.popgrid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px
}

.popcard {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 16px;
	display: block;
	transition: .15s
}

.popcard:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
	border-color: var(--border-strong)
}

.popcard .pi {
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: #eef4ff;
	color: var(--primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	margin-bottom: 10px
}

.popcard b {
	display: block;
	color: var(--heading);
	font-size: 13.5px
}

.popcard span {
	color: var(--muted);
	font-size: 12px
}

/* Layout: sidebar + content */
.kbbody {
	display: grid;
	grid-template-columns: 250px 1fr;
	gap: 26px;
	margin-top: 26px;
	align-items: start
}

.toc {
	position: sticky;
	top: 78px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 10px
}

.toc h4 {
	margin: 6px 10px 8px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--muted-2)
}

.toc a {
	display: block;
	padding: 8px 10px;
	border-radius: 7px;
	color: #374151;
	font-size: 13px;
	font-weight: 500;
	border-left: 2px solid transparent
}

.toc a:hover {
	background: #f0f3f8;
	color: var(--heading)
}

.toc a.active {
	background: #eef4ff;
	color: var(--primary);
	border-left-color: var(--primary)
}

.content {
	min-width: 0
}

article {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px 26px;
	margin-bottom: 16px
}

article h2 {
	color: var(--heading);
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px;
	scroll-margin-top: 80px
}

article h3 {
	color: var(--heading);
	font-size: 14.5px;
	font-weight: 700;
	margin: 18px 0 6px
}

article p {
	color: #374151;
	font-size: 14px;
	line-height: 1.68;
	margin: 0 0 12px
}

article p:last-child {
	margin-bottom: 0
}

article ul,
article ol {
	margin: 0 0 12px;
	padding-left: 20px;
	color: #374151;
	font-size: 14px;
	line-height: 1.7
}

article li {
	margin-bottom: 5px
}

article a {
	font-weight: 500
}

article code {
	font-family: var(--mono);
	font-size: 12.5px;
	background: #f2f4f8;
	border: 1px solid var(--border);
	border-radius: 5px;
	padding: 1px 6px;
	color: #31415f
}

.lead {
	color: var(--muted) !important;
	font-size: 14.5px !important
}

.callout {
	border: 1px solid var(--border);
	border-left: 3px solid var(--primary);
	background: #f7faff;
	border-radius: 8px;
	padding: 13px 15px;
	margin: 0 0 14px;
	font-size: 13.5px;
	color: #374151
}

.callout.warn {
	border-left-color: var(--amber);
	background: #fdf8f0
}

.callout.ok {
	border-left-color: var(--green);
	background: #f2fbf8
}

.callout b {
	color: var(--heading)
}

table.rate {
	width: 100%;
	border-collapse: collapse;
	margin: 6px 0 14px;
	font-size: 13.5px
}

table.rate th,
table.rate td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid var(--border)
}

table.rate th {
	background: #fafbfc;
	color: var(--muted);
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: .3px;
	font-weight: 600
}

table.rate td .tb {
	display: inline-flex;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	color: #fff;
	font-size: 8px;
	font-weight: 700;
	align-items: center;
	justify-content: center;
	margin-right: 7px;
	vertical-align: middle
}

table.rate .n {
	font-family: var(--mono)
}

dl.gloss {
	margin: 0
}

dl.gloss dt {
	color: var(--heading);
	font-weight: 700;
	font-size: 13.5px;
	margin-top: 12px
}

dl.gloss dt:first-child {
	margin-top: 0
}

dl.gloss dd {
	margin: 2px 0 0;
	color: #374151;
	font-size: 13.5px;
	line-height: 1.6
}

.noresult {
	display: none;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 22px;
	text-align: center;
	color: var(--muted)
}

.helpful {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 6px;
	padding-top: 14px;
	border-top: 1px solid #f2f4f7;
	color: var(--muted);
	font-size: 13px
}

.helpful button {
	border: 1px solid var(--border-strong);
	background: #fbfcfe;
	border-radius: 8px;
	padding: 6px 14px;
	font-family: var(--sans);
	font-size: 13px;
	cursor: pointer;
	color: #374151
}

.helpful button:hover {
	border-color: var(--primary);
	color: var(--primary)
}

