/* Single guide: header, the guide's own columns as content + sidebar, end section. */
.lwn-guide {
	--lwngd-navy: #143447;
	--lwngd-coral: var(--wp--preset--color--secondary-color, #e8475f);
	--lwngd-green: #027a48;
	--lwngd-greenbg: #ecfdf3;
	--lwngd-line: #e4e9f2;
	--lwngd-ghost: #f4f7fd;
	--lwngd-text: #475467;
	--lwngd-muted: #667085;
	color: var(--lwngd-text);
	background: #fff;
}
.lwn-guide *, .lwn-guide *::before, .lwn-guide *::after { box-sizing: border-box; }
.lwngd-s-hero { border-bottom: 1px solid var(--lwngd-line); padding: 30px 20px 28px; }
.lwngd-s-hero > *, .lwngd-s-body > * { max-width: 1100px; margin-inline: auto; }
.lwngd-crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--lwngd-muted); }
.lwngd-crumbs a { color: inherit; text-decoration: none; }
.lwngd-crumbs a:hover { color: var(--lwngd-navy); }
.lwngd-s-head { display: flex; gap: 18px; align-items: center; margin-top: 14px; }
.lwn-guide .lwnsn-tile {
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font: 700 22px/1 Consolas, "Courier New", monospace;
	direction: ltr;
	box-shadow: 0 8px 18px rgba(20, 52, 71, 0.12);
}
.lwngd-s-kicker { font-size: 13px; color: var(--lwngd-coral); font-weight: 700; }
.lwn-guide h1 { margin: 2px 0 0; color: var(--lwngd-navy); font-size: clamp(23px, 3vw, 30px); line-height: 1.5; }
.lwngd-s-hero .lwngd-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.lwngd-s-hero .lwngd-chips span { font-size: 12.5px; border: 1px solid var(--lwngd-line); border-radius: 999px; padding: 3px 12px; color: var(--lwngd-navy); }
.lwngd-s-hero .lwngd-chips span.is-pdf { background: #fff1f3; border-color: #ffd5dc; color: var(--lwngd-coral); }
.lwngd-summary { margin-top: 18px; border: 1px solid var(--lwngd-line); border-radius: 12px; padding: 14px 18px; }
.lwngd-summary h2 { margin: 0; font-size: 13px; color: var(--lwngd-green); }
.lwngd-summary p { margin: 4px 0 0; line-height: 1.9; font-size: 15px; max-width: 820px; }

.lwngd-s-body { padding: 30px 20px 60px; }

/* The guide's own two columns: text first, sidebar on the left (RTL). */
.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns { gap: 36px; align-items: flex-start !important; margin-top: 0 !important; }
.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns > .wp-block-column:first-child {
	order: 2;
	flex: 0 0 300px !important;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns > .wp-block-column:first-child > * { margin: 0 !important; width: 100%; max-width: none !important; }
.lwn-guide .wp-block-column:first-child > .wp-block-group:has(#rank-math-toc) { padding-inline: 0 !important; }
.lwn-guide .wp-block-column:first-child #rank-math-toc { max-width: none !important; width: 100%; margin: 0 !important; }
.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns > .wp-block-column:last-child { order: 1; flex: 1 1 auto !important; min-width: 0; }

/* "عن الدليل" card (the post's Article Details group). */
.lwn-guide .is-lwn-sidebar-widget {
	flex: none;
	background: #fff !important;
	color: var(--lwngd-text) !important;
	border: 1px solid var(--lwngd-line);
	border-radius: 16px;
	padding: 14px 16px !important;
	font-size: 13.5px !important;
}
.lwn-guide .is-lwn-sidebar-widget::before { content: "عن الدليل"; display: block; font-weight: 700; color: var(--lwngd-navy); margin-bottom: 6px; }
.lwn-guide .is-lwn-sidebar-widget > * { margin: 0 !important; max-width: none !important; }
.lwn-guide .is-lwn-sidebar-widget hr { display: none; }
.lwn-guide .is-lwn-sidebar-widget p { line-height: 1.6; }
.lwn-guide .lwngd-row:not(.lwngd-row--btn) { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--lwngd-line); }
.lwn-guide .lwngd-row__k { color: var(--lwngd-muted); flex: none; }
.lwn-guide .lwngd-row__v { color: var(--lwngd-navy); font-weight: 700; text-align: left; }
.lwn-guide .lwngd-row--btn { margin-top: 10px !important; }
.lwn-guide .lwngd-row--btn a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-radius: 10px;
	padding: 8px 10px;
	font-weight: 700;
	font-size: 12px;
	line-height: 1.5;
	white-space: nowrap;
	text-decoration: none;
	border: 1px solid var(--lwngd-line);
	color: var(--lwngd-muted) !important;
	background: #fafbfc;
}
.lwn-guide .lwngd-row--btn a:hover { border-color: var(--lwngd-muted); color: var(--lwngd-navy) !important; }
.lwn-guide .lwngd-row--btn svg { flex: none; width: 15px; height: 15px; }
.lwn-guide .lwngd-row--btn span { overflow: hidden; text-overflow: ellipsis; }
.lwn-guide .lwngd-row--pdf { order: 98; }
.lwn-guide .lwngd-row--pdf a { background: var(--lwngd-coral); border-color: var(--lwngd-coral); color: #fff !important; }
.lwn-guide .lwngd-row--pdf a:hover { filter: brightness(0.95); border-color: var(--lwngd-coral); color: #fff !important; }
/* The update date is already in the header chips. */
.lwn-guide .is-lwn-sidebar-widget > .wp-block-group:has(.wp-block-post-date) { display: none; }
.lwn-guide .is-lwn-sidebar-widget { display: flex; flex-direction: column; }

/* Table of contents card: only H2/H3, full height, current section highlighted. */
/* Desktop: the details card scrolls away, the table of contents follows the reader.
   It only gets a scrollbar when the screen is shorter than the list. */
.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns > .wp-block-column:first-child { align-self: stretch; }
.lwn-guide .wp-block-column:first-child > .wp-block-group:has(#rank-math-toc) {
	position: sticky !important;
	top: calc(16px + var(--wp-admin--admin-bar--height, 0px));
	max-height: calc(100vh - 32px - var(--wp-admin--admin-bar--height, 0px));
	display: flex;
	flex-direction: column;
}
.lwn-guide #rank-math-toc { min-height: 0; display: flex; flex-direction: column; }
.lwn-guide #rank-math-toc nav { min-height: 0; overflow-y: auto; }
.lwn-guide #rank-math-toc {
	border: 1px solid var(--lwngd-line);
	border-radius: 16px;
	padding: 14px 10px 10px;
	line-height: 1.6 !important;
}
.lwn-guide #rank-math-toc h4 { margin: 0 6px 8px; font-size: 14px; color: var(--lwngd-navy); }

.lwn-guide #rank-math-toc ul { list-style: none; margin: 0; padding: 0; }
.lwn-guide #rank-math-toc ul ul ul { display: none; }
.lwn-guide #rank-math-toc a { display: block; padding: 5px 8px; border-radius: 8px; color: var(--lwngd-navy) !important; text-decoration: none; font-size: 13.5px; }
.lwn-guide #rank-math-toc ul ul a { padding-right: 20px; font-size: 13px; color: var(--lwngd-muted) !important; }
.lwn-guide #rank-math-toc a:hover { background: var(--lwngd-ghost); }
.lwn-guide #rank-math-toc a.is-on { background: var(--lwngd-greenbg); color: var(--lwngd-green) !important; font-weight: 700; }

/* End section. */
.lwngd-end { max-width: 1100px; margin: 0 auto; }
.lwngd-others { margin-top: 30px; }
.lwngd-others h2 { color: var(--lwngd-navy); font-size: 20px; margin: 0 0 12px; }
.lwngd-others ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lwngd-others li a { border: 1px solid var(--lwngd-line); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; color: var(--lwngd-navy); font-weight: 700; text-decoration: none; }
.lwngd-others li a:hover { border-color: var(--lwngd-navy); }
.lwngd-others .lwnsn-tile { width: 42px; height: 42px; border-radius: 12px; font-size: 13px; box-shadow: none; }
.lwngd-all { display: inline-block; margin-top: 12px; color: var(--lwngd-coral); font-weight: 700; text-decoration: none; }

@media (max-width: 900px) {
	.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns { flex-direction: column; flex-wrap: wrap !important; }
	.lwn-guide .wp-block-column:first-child > .wp-block-group:has(#rank-math-toc) { position: static !important; max-height: none; }
	.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns > .wp-block-column:first-child { order: 0; align-self: auto; flex-basis: auto !important; width: 100%; }
	.lwn-guide .wp-block-post-content > .wp-block-group > .wp-block-columns > .wp-block-column:last-child { width: 100%; }
	.lwn-guide #rank-math-toc nav { max-height: 50vh; overflow-y: auto; }
	.lwngd-others ul { grid-template-columns: 1fr; }
}
.lwngd-end > .lwn-share, .lwngd-end .lwn-share { margin-top: 28px; }
.lwngd-share-card { flex: none; border: 1px solid var(--lwngd-line); border-radius: 16px; padding: 14px 16px; }
.lwngd-share-card .lwn-share__label { color: var(--lwngd-navy); font-weight: 700; font-size: 13.5px; }
/* Icon-only buttons in the narrow card; the names stay for screen readers. */
.lwngd-share-card .lwn-share__list { flex-wrap: nowrap; justify-content: space-between; gap: 6px; }
.lwngd-share-card .lwn-share__btn { padding: 8px; justify-content: center; width: 40px; height: 40px; }
.lwngd-share-card .lwn-share__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
