/**
 * StepDocs front-end styles.
 */

:root {
	--stepdocs-navy: #1a2b4a;
	--stepdocs-gold: #f5a623;
	--stepdocs-blue: #2e6da4;
	--stepdocs-bg: #f0f2f7;
	--stepdocs-light: #f4f6fa;
	--stepdocs-border: #d0d8e8;
	--stepdocs-gray: #7a8a9a;
	--stepdocs-text: #24303f;
	--stepdocs-radius: 12px;
	--stepdocs-shadow: 0 2px 10px rgba(26, 43, 74, 0.08);
}

/* ---------- Layout (single guide) ---------- */
.stepdocs-layout {
	display: flex;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 20px 64px;
	align-items: flex-start;
	color: var(--stepdocs-text);
	font-size: 16px;
	line-height: 1.6;
}

.stepdocs-layout__aside {
	flex: 0 0 260px;
	position: sticky;
	top: 24px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
}

.stepdocs-layout__main {
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------- Sidebar ---------- */
.stepdocs-sidebar__search {
	position: relative;
	margin-bottom: 20px;
}

.stepdocs-search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid var(--stepdocs-border);
	border-radius: var(--stepdocs-radius);
	font-size: 14px;
	background: #fff;
}

.stepdocs-search-input:focus {
	outline: none;
	border-color: var(--stepdocs-blue);
	box-shadow: 0 0 0 3px rgba(46, 109, 164, 0.15);
}

.stepdocs-search-results {
	position: absolute;
	z-index: 20;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	background: #fff;
	border: 1px solid var(--stepdocs-border);
	border-radius: var(--stepdocs-radius);
	box-shadow: var(--stepdocs-shadow);
	overflow: hidden;
}

.stepdocs-search-results a {
	display: block;
	padding: 10px 14px;
	text-decoration: none;
	color: var(--stepdocs-text);
	border-bottom: 1px solid var(--stepdocs-light);
}

.stepdocs-search-results a:last-child {
	border-bottom: none;
}

.stepdocs-search-results a:hover,
.stepdocs-search-results a.is-highlighted {
	background: var(--stepdocs-light);
}

.stepdocs-search-results .stepdocs-sr-title {
	font-weight: 600;
	display: block;
}

.stepdocs-search-results .stepdocs-sr-excerpt {
	font-size: 13px;
	color: var(--stepdocs-gray);
}

.stepdocs-search-results .stepdocs-sr-empty {
	padding: 12px 14px;
	color: var(--stepdocs-gray);
	font-size: 14px;
}

.stepdocs-sidebar__group {
	margin-bottom: 22px;
}

.stepdocs-sidebar__heading {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--stepdocs-gray);
	margin: 0 0 8px;
	font-weight: 700;
}

.stepdocs-sidebar__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.stepdocs-sidebar__list li {
	margin: 0;
}

.stepdocs-sidebar__list a {
	display: block;
	padding: 6px 12px;
	border-radius: 8px;
	text-decoration: none;
	color: var(--stepdocs-text);
	font-size: 14.5px;
	border-left: 3px solid transparent;
}

.stepdocs-sidebar__list a:hover {
	background: var(--stepdocs-light);
}

.stepdocs-sidebar__list a.is-active {
	background: rgba(46, 109, 164, 0.1);
	border-left-color: var(--stepdocs-gold);
	font-weight: 600;
	color: var(--stepdocs-navy);
}

/* ---------- Article ---------- */
.stepdocs-article__crumb {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--stepdocs-blue);
	margin-bottom: 8px;
}

.stepdocs-article__title {
	font-size: 32px;
	line-height: 1.2;
	margin: 0 0 12px;
	color: var(--stepdocs-navy);
}

.stepdocs-article__lead {
	font-size: 18px;
	color: var(--stepdocs-gray);
	margin: 0 0 24px;
}

.stepdocs-article__content {
	margin: 24px 0;
}

/* ---------- Video ---------- */
.stepdocs-video {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	margin: 0 0 32px;
	border-radius: var(--stepdocs-radius);
	overflow: hidden;
	background: #000;
	box-shadow: var(--stepdocs-shadow);
}

.stepdocs-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.stepdocs-video--oembed {
	padding-top: 0;
	height: auto;
	background: transparent;
}

.stepdocs-video--oembed iframe {
	position: static;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
}

/* ---------- Steps ---------- */
.stepdocs-steps {
	list-style: none;
	counter-reset: none;
	margin: 0;
	padding: 0;
}

.stepdocs-step {
	position: relative;
	display: flex;
	gap: 18px;
	padding: 0 0 28px;
}

.stepdocs-step:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 17px;
	top: 40px;
	bottom: 0;
	width: 2px;
	background: var(--stepdocs-border);
}

.stepdocs-step__marker {
	flex: 0 0 36px;
	height: 36px;
	width: 36px;
	border-radius: 50%;
	background: var(--stepdocs-navy);
	color: #fff;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	position: relative;
	z-index: 1;
}

.stepdocs-step__body {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 4px;
}

.stepdocs-step__title {
	margin: 0 0 6px;
	font-size: 19px;
	color: var(--stepdocs-navy);
}

.stepdocs-step__desc {
	color: var(--stepdocs-text);
}

.stepdocs-step__desc p {
	margin: 0 0 10px;
}

.stepdocs-step__figure {
	margin: 14px 0 0;
}

.stepdocs-step__img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid var(--stepdocs-border);
	box-shadow: var(--stepdocs-shadow);
	display: block;
}

/* ---------- Menu toggle (mobile) ---------- */
.stepdocs-menu-toggle {
	display: none;
	background: var(--stepdocs-navy);
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 14px;
	cursor: pointer;
	margin-bottom: 12px;
}

/* ---------- Knowledge base grid (shortcode) ---------- */
.stepdocs-kb {
	max-width: 1160px;
	margin: 0 auto;
	padding: 8px 20px 48px;
	color: var(--stepdocs-text);
}

.stepdocs-kb__searchbar {
	position: relative;
	max-width: 560px;
	margin: 0 auto 32px;
}

.stepdocs-kb__searchbar .stepdocs-search-input {
	padding: 14px 18px;
	font-size: 16px;
}

.stepdocs-kb__grid {
	display: grid;
	gap: 22px;
}

.stepdocs-cols-1 { grid-template-columns: 1fr; }
.stepdocs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.stepdocs-cols-3 { grid-template-columns: repeat(3, 1fr); }
.stepdocs-cols-4 { grid-template-columns: repeat(4, 1fr); }

.stepdocs-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--stepdocs-border);
	border-radius: var(--stepdocs-radius);
	overflow: hidden;
	text-decoration: none;
	color: var(--stepdocs-text);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stepdocs-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--stepdocs-shadow);
}

.stepdocs-card__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--stepdocs-light);
	overflow: hidden;
}

.stepdocs-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.stepdocs-card__thumb-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(135deg, var(--stepdocs-navy), var(--stepdocs-blue));
}

.stepdocs-card__play {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(26, 43, 74, 0.82);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	padding-left: 3px;
}

.stepdocs-card__body {
	padding: 16px 18px 18px;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.stepdocs-card__title {
	font-size: 17px;
	margin: 0 0 6px;
	color: var(--stepdocs-navy);
	line-height: 1.3;
}

.stepdocs-card__excerpt {
	font-size: 14px;
	color: var(--stepdocs-gray);
	margin: 0 0 12px;
	flex: 1 1 auto;
}

.stepdocs-card__meta {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.stepdocs-badge {
	font-size: 12px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--stepdocs-light);
	color: var(--stepdocs-gray);
	border: 1px solid var(--stepdocs-border);
}

.stepdocs-badge--video {
	background: rgba(245, 166, 35, 0.14);
	color: #a56a00;
	border-color: rgba(245, 166, 35, 0.4);
}

.stepdocs-empty {
	text-align: center;
	color: var(--stepdocs-gray);
	padding: 40px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.stepdocs-cols-3,
	.stepdocs-cols-4 { grid-template-columns: repeat(2, 1fr); }

	.stepdocs-layout {
		flex-direction: column;
		gap: 0;
	}

	.stepdocs-menu-toggle {
		display: inline-block;
	}

	.stepdocs-layout__aside {
		flex-basis: auto;
		position: static;
		max-height: none;
		width: 100%;
		display: none;
		margin-bottom: 20px;
		padding: 16px;
		background: var(--stepdocs-light);
		border-radius: var(--stepdocs-radius);
	}

	.stepdocs-layout__aside.is-open {
		display: block;
	}
}

@media (max-width: 520px) {
	.stepdocs-cols-2,
	.stepdocs-cols-3,
	.stepdocs-cols-4 { grid-template-columns: 1fr; }

	.stepdocs-article__title { font-size: 26px; }
}

/* ==================================================================== */
/*  Interactive video documentation (.sdc-*)                            */
/* ==================================================================== */

.sdc-app {
	--sdc-bg: #ffffff;
	--sdc-surface: #f7f9fc;
	--sdc-surface-2: #eef2f8;
	--sdc-border: #d9e0ec;
	--sdc-text: #1f2a3a;
	--sdc-muted: #6b7a8d;
	--sdc-navy: #1a2b4a;
	--sdc-gold: #f5a623;
	--sdc-blue: #2e6da4;
	--sdc-accent: #2e6da4;
	--sdc-active-bg: rgba(46, 109, 164, 0.1);
	--sdc-shadow: 0 2px 14px rgba(26, 43, 74, 0.09);
	--sdc-radius: 12px;

	color: var(--sdc-text);
	background: var(--sdc-bg);
	font-size: 16px;
	line-height: 1.65;
	max-width: 1500px;
	margin: 0 auto;
}

.sdc-app.sdc-dark {
	--sdc-bg: #0f1622;
	--sdc-surface: #16202f;
	--sdc-surface-2: #1c2838;
	--sdc-border: #2a3a4f;
	--sdc-text: #e6ecf5;
	--sdc-muted: #93a3b8;
	--sdc-navy: #dbe6f5;
	--sdc-accent: #6aa8e0;
	--sdc-active-bg: rgba(106, 168, 224, 0.16);
	--sdc-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
}

.sdc-app * { box-sizing: border-box; }

/* ---------- Top bar ---------- */
.sdc-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 22px;
	border-bottom: 1px solid var(--sdc-border);
	background: var(--sdc-surface);
	position: sticky;
	top: 0;
	z-index: 40;
	flex-wrap: wrap;
}

.sdc-topbar__left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.sdc-topbar__title {
	font-size: 19px;
	margin: 0;
	color: var(--sdc-navy);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 46vw;
}

.sdc-topbar__right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sdc-search {
	padding: 8px 14px;
	border: 1px solid var(--sdc-border);
	border-radius: 999px;
	background: var(--sdc-bg);
	color: var(--sdc-text);
	font-size: 14px;
	width: 200px;
	max-width: 40vw;
}

.sdc-search:focus {
	outline: none;
	border-color: var(--sdc-accent);
	box-shadow: 0 0 0 3px var(--sdc-active-bg);
}

.sdc-theme-toggle,
.sdc-help-toggle,
.sdc-nav-toggle {
	border: 1px solid var(--sdc-border);
	background: var(--sdc-bg);
	color: var(--sdc-text);
	width: 38px;
	height: 38px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.sdc-theme-toggle:hover,
.sdc-help-toggle:hover,
.sdc-nav-toggle:hover { background: var(--sdc-surface-2); }

.sdc-nav-toggle { display: none; }

/* ---------- Progress ---------- */
.sdc-progress {
	position: relative;
	height: 4px;
	background: var(--sdc-surface-2);
}

.sdc-progress__bar {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--sdc-blue), var(--sdc-gold));
	transition: width 0.3s ease;
}

.sdc-progress__label {
	position: absolute;
	right: 22px;
	top: 8px;
	font-size: 12px;
	color: var(--sdc-muted);
	background: var(--sdc-bg);
	padding: 0 6px;
}

/* ---------- Body grid ---------- */
.sdc-body {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr) minmax(230px, 290px);
	gap: 0;
	align-items: start;
}

/* ---------- Left nav ---------- */
.sdc-nav {
	position: sticky;
	top: 66px;
	align-self: start;
	max-height: calc(100vh - 66px);
	overflow-y: auto;
	border-right: 1px solid var(--sdc-border);
	padding: 18px 12px 40px;
	background: var(--sdc-surface);
}

.sdc-nav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 6px 10px;
}

.sdc-nav__title {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	font-weight: 700;
	color: var(--sdc-muted);
}

.sdc-nav__collapse {
	border: none;
	background: none;
	color: var(--sdc-muted);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 2px 6px;
}

.sdc-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sdc-nav.is-collapsed .sdc-nav__list { display: none; }

.sdc-nav__item {
	display: flex;
	align-items: center;
	border-radius: 8px;
	position: relative;
}

.sdc-nav__item.is-active { background: var(--sdc-active-bg); }

.sdc-nav__link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	text-decoration: none;
	color: var(--sdc-text);
	font-size: 14px;
	flex: 1 1 auto;
	min-width: 0;
	border-left: 3px solid transparent;
	border-radius: 8px;
}

.sdc-nav__item.is-active .sdc-nav__link {
	border-left-color: var(--sdc-gold);
	font-weight: 600;
	color: var(--sdc-navy);
}

.sdc-nav__num {
	flex: 0 0 22px;
	height: 22px;
	width: 22px;
	border-radius: 50%;
	background: var(--sdc-surface-2);
	color: var(--sdc-muted);
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sdc-nav__item.is-active .sdc-nav__num {
	background: var(--sdc-navy);
	color: #fff;
}

.sdc-nav__text {
	flex: 1 1 auto;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sdc-nav__time {
	font-size: 11px;
	color: var(--sdc-muted);
	font-variant-numeric: tabular-nums;
}

.sdc-bookmark {
	border: none;
	background: none;
	color: var(--sdc-muted);
	cursor: pointer;
	font-size: 15px;
	padding: 4px 8px;
}

.sdc-bookmark.is-on { color: var(--sdc-gold); }

/* ---------- Center doc ---------- */
.sdc-doc {
	padding: 26px 34px 0;
	min-width: 0;
}

/* Video block at the top of the middle content column. */
.sdc-doc__media {
	margin: 0 0 26px;
}

.sdc-doc__media .sdc-nowplaying {
	flex-direction: row;
	align-items: baseline;
	gap: 8px;
	padding: 10px 2px 0;
}

/* Right rail heading above the chapter gallery. */
.sdc-gallery__head {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	font-weight: 700;
	color: var(--sdc-muted);
	padding: 0 4px 10px;
}


/* Trailing space so the LAST chapter can scroll to the top of the reading
   area — otherwise clicking it leaves the highlight on the last chapter
   while the viewport is stuck showing earlier sections. */
.sdc-doc::after {
	content: "";
	display: block;
	height: 70vh;
}

.sdc-doc__lead {
	font-size: 18px;
	color: var(--sdc-muted);
	margin: 0 0 22px;
}

.sdc-doc__intro { margin-bottom: 28px; }

.sdc-section {
	padding: 18px 0 28px;
	border-top: 1px solid var(--sdc-border);
	scroll-margin-top: 80px;
}

.sdc-section:first-of-type { border-top: none; }

.sdc-section.is-active .sdc-section__num {
	background: var(--sdc-gold);
	color: var(--sdc-navy);
}

.sdc-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.sdc-section__title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 24px;
	margin: 0;
	color: var(--sdc-navy);
}

.sdc-section__num {
	flex: 0 0 32px;
	height: 32px;
	width: 32px;
	border-radius: 50%;
	background: var(--sdc-navy);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sdc-jump {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--sdc-border);
	background: var(--sdc-bg);
	color: var(--sdc-accent);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.sdc-jump:hover {
	background: var(--sdc-accent);
	color: #fff;
	border-color: var(--sdc-accent);
}

.sdc-jump__time {
	font-variant-numeric: tabular-nums;
	opacity: 0.8;
}

.sdc-section__desc {
	color: var(--sdc-muted);
	font-size: 16px;
	margin: 10px 0 16px;
}

.sdc-section__figure {
	margin: 0 0 18px;
}

.sdc-section__figure img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	border: 1px solid var(--sdc-border);
	box-shadow: var(--sdc-shadow);
	display: block;
}

.sdc-section__body :is(h3, h4) { color: var(--sdc-navy); }

.sdc-section__body img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.sdc-section__body pre {
	background: var(--sdc-surface-2);
	border: 1px solid var(--sdc-border);
	border-radius: 8px;
	padding: 14px 16px;
	overflow-x: auto;
	font-size: 13.5px;
}

.sdc-section__body code {
	background: var(--sdc-surface-2);
	border-radius: 4px;
	padding: 1px 5px;
	font-size: 0.9em;
}

.sdc-section__body pre code {
	background: none;
	padding: 0;
}

.sdc-section__body blockquote {
	border-left: 4px solid var(--sdc-gold);
	margin: 16px 0;
	padding: 4px 16px;
	color: var(--sdc-muted);
	background: var(--sdc-surface);
	border-radius: 0 8px 8px 0;
}

.sdc-section__body a { color: var(--sdc-accent); }

/* ---------- Right media rail ---------- */
.sdc-media {
	border-left: 1px solid var(--sdc-border);
	background: var(--sdc-surface);
}

.sdc-media__sticky {
	position: sticky;
	top: 66px;
	padding: 18px;
	max-height: calc(100vh - 66px);
	overflow-y: auto;
}

.sdc-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: var(--sdc-radius);
	overflow: hidden;
	box-shadow: var(--sdc-shadow);
}

.sdc-video .sdc-player,
.sdc-video video,
.sdc-video iframe,
.sdc-embed iframe {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}

.sdc-embed { position: absolute; inset: 0; }

.sdc-video__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #cbd5e5;
	font-size: 14px;
}

.sdc-nowplaying {
	display: flex;
	flex-direction: column;
	padding: 12px 4px 6px;
}

.sdc-nowplaying__label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--sdc-muted);
}

.sdc-nowplaying__title {
	font-weight: 600;
	color: var(--sdc-navy);
	font-size: 15px;
}

/* ---------- Gallery ---------- */
.sdc-gallery {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 6px;
}

.sdc-thumb {
	display: flex;
	align-items: center;
	gap: 10px;
	text-align: left;
	border: 1px solid transparent;
	background: var(--sdc-bg);
	border-radius: 10px;
	padding: 6px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	color: var(--sdc-text);
}

.sdc-thumb:hover { background: var(--sdc-surface-2); }

.sdc-thumb.is-active {
	border-color: var(--sdc-gold);
	background: var(--sdc-active-bg);
}

.sdc-thumb__img {
	position: relative;
	flex: 0 0 96px;
	height: 54px;
	border-radius: 6px;
	overflow: hidden;
	background: var(--sdc-surface-2);
	display: flex;
	align-items: center;
	justify-content: center;
}

.sdc-thumb__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sdc-thumb__ph {
	font-weight: 800;
	color: var(--sdc-muted);
	font-size: 18px;
}

.sdc-thumb__time {
	position: absolute;
	right: 3px;
	bottom: 3px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 10px;
	padding: 1px 5px;
	border-radius: 4px;
	font-variant-numeric: tabular-nums;
}

.sdc-thumb__title {
	font-size: 13px;
	line-height: 1.3;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* ---------- Help dialog ---------- */
.sdc-help {
	position: fixed;
	inset: 0;
	background: rgba(15, 22, 34, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
}

/* The [hidden] attribute must beat the display:flex above, or the dialog
   never closes. The attribute selector raises specificity enough to win. */
.sdc-help[hidden] {
	display: none;
}

.sdc-help__panel {
	position: relative;
	background: var(--sdc-bg);
	color: var(--sdc-text);
	border-radius: var(--sdc-radius);
	padding: 26px 30px;
	max-width: 360px;
	width: 90%;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.sdc-help__panel h3 { margin: 0 0 14px; color: var(--sdc-navy); }
.sdc-help__panel ul { list-style: none; margin: 0; padding: 0; }
.sdc-help__panel li { padding: 6px 0; font-size: 14px; }

.sdc-help__panel kbd {
	background: var(--sdc-surface-2);
	border: 1px solid var(--sdc-border);
	border-radius: 5px;
	padding: 2px 7px;
	font-size: 12px;
	font-family: inherit;
}

.sdc-help__close {
	position: absolute;
	top: 12px;
	right: 12px;
	border: none;
	background: none;
	font-size: 16px;
	cursor: pointer;
	color: var(--sdc-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
	.sdc-body { grid-template-columns: 220px minmax(0, 1fr) minmax(300px, 360px); }
}

@media (max-width: 1000px) {
	/* Single column: nav is an off-canvas drawer; the chapter gallery
	   becomes a horizontal strip below the video + docs. */
	.sdc-body { grid-template-columns: 1fr; }

	.sdc-nav-toggle { display: inline-flex; }

	.sdc-nav {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 280px;
		max-height: none;
		z-index: 60;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		box-shadow: var(--sdc-shadow);
	}

	.sdc-nav.is-open { transform: translateX(0); }

	.sdc-media {
		border-left: none;
		border-top: 1px solid var(--sdc-border);
	}

	.sdc-media__sticky {
		position: static;
		max-height: none;
	}

	.sdc-gallery {
		flex-direction: row;
		overflow-x: auto;
		gap: 10px;
	}

	.sdc-thumb {
		flex: 0 0 160px;
		flex-direction: column;
		align-items: stretch;
	}

	.sdc-thumb__img { flex-basis: auto; height: 84px; }
}

@media (max-width: 680px) {
	.sdc-topbar__title { max-width: 40vw; font-size: 16px; }
	.sdc-search { width: 130px; }

	.sdc-doc { padding: 20px 18px 0; }
	.sdc-section__title { font-size: 20px; }
}

/* ==================================================================== */
/*  Embedded guide (.sdc-app--embed) — for [stepdocs_guide] inside      */
/*  another page such as an EazyDocs doc.                               */
/* ==================================================================== */

.sdc-app--embed {
	max-width: 100%;
	margin: 22px 0;
	padding: 16px;
	border: 1px solid var(--sdc-border);
	border-radius: var(--sdc-radius);
	background: var(--sdc-surface);
}

.sdc-app--embed .sdc-progress {
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 14px;
}

.sdc-app--embed .sdc-progress__label {
	position: static;
	display: block;
	text-align: right;
	padding: 0;
	margin-top: 4px;
	background: none;
}

.sdc-app--embed .sdc-doc__media {
	max-width: 100%;
	margin: 0 0 14px;
}

/* Horizontal chapter timeline strip */
.sdc-gallery--strip {
	flex-direction: row;
	overflow-x: auto;
	gap: 10px;
	padding-bottom: 6px;
}

.sdc-gallery--strip .sdc-thumb {
	flex: 0 0 160px;
	flex-direction: column;
	align-items: stretch;
}

.sdc-gallery--strip .sdc-thumb__img {
	flex-basis: auto;
	height: 84px;
}

/* Synced doc sections inside the embed (no giant trailing spacer) */
.sdc-embed-body {
	margin-top: 24px;
}

/* Higher specificity + !important so a host theme/plugin that resets
   `section { padding: 0 }` (e.g. EazyDocs' .doc-scrollable section) cannot
   flatten the spacing between chapters. */
.sdc-app--embed .sdc-embed-body .sdc-section {
	border-top: 1px solid var(--sdc-border);
	padding: 34px 0 !important;
	margin: 8px 0 0 !important;
	scroll-margin-top: 90px;
}

.sdc-app--embed .sdc-embed-body .sdc-section:first-child {
	border-top: none;
	padding-top: 8px !important;
	margin-top: 0 !important;
}

/* Room between the chapter heading and its content. */
.sdc-app--embed .sdc-embed-body .sdc-section__head {
	margin-bottom: 14px;
}

.sdc-app--embed .sdc-embed-body .sdc-section__desc {
	margin-top: 0;
}

/* ==================================================================== */
/*  Single guide page (rendered inside the theme header + footer)        */
/* ==================================================================== */

/* Hide only the theme's big site-title banner on the guide page — the rest
   of the header/footer (site nav, etc.) stays. Covers the common block- and
   classic-theme selectors; if your theme uses a different one, tell me the
   selector and I'll add it. */
body.single-stepdoc .wp-block-site-title,
body.single-stepdoc .site-title,
body.single-stepdoc .site-branding__title,
body.single-stepdoc h1.site-title,
body.single-stepdoc .wp-block-template-part .wp-block-site-title {
	display: none !important;
}

/* Keep the sticky top bar / rails below the WP admin bar when logged in. */
.admin-bar .sdc-topbar { top: 32px; }
.admin-bar .sdc-nav,
.admin-bar .sdc-media__sticky { top: 98px; }

@media screen and (max-width: 782px) {
	.admin-bar .sdc-topbar { top: 46px; }
	.admin-bar .sdc-nav,
	.admin-bar .sdc-media__sticky { top: 112px; }
}

/* ==================================================================== */
/*  Optional documentation hero banner (.sdc-banner)                    */
/* ==================================================================== */

.sdc-banner {
	width: 100%;
	box-sizing: border-box;
	padding: 54px 20px 60px;
	text-align: center;
	background: linear-gradient(180deg, var(--sdc-banner-bg1, #eaf1ff), var(--sdc-banner-bg2, #f6f9ff));
	color: var(--sdc-banner-text, #1a2b4a);
}

/* Image-only banner: show the full graphic at its natural aspect ratio,
   no gradient overlay, no text. Doubled class beats the responsive
   .sdc-banner padding overrides. */
.sdc-banner.sdc-banner--image {
	padding: 0;
	background: none;
	text-align: center;
	line-height: 0;
	width: 100%;
	position: relative;
}

.sdc-banner.sdc-banner--image .sdc-banner__img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
}

/* Search overlay positioned over the banner image. */
.sdc-banner__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	box-sizing: border-box;
	padding: 4% 5%;
	line-height: normal;
	pointer-events: none; /* let clicks pass except on the search box */
}

.sdc-banner__overlay .sdc-banner__search {
	pointer-events: auto;
	width: 100%;
	max-width: 560px;
	margin: 0;
}

/* Vertical placement */
.sdc-banner__overlay.sdc-pos-v-top { align-items: flex-start; }
.sdc-banner__overlay.sdc-pos-v-middle { align-items: center; }
.sdc-banner__overlay.sdc-pos-v-bottom { align-items: flex-end; }

/* Horizontal placement */
.sdc-banner__overlay.sdc-pos-h-left { justify-content: flex-start; }
.sdc-banner__overlay.sdc-pos-h-center { justify-content: center; }
.sdc-banner__overlay.sdc-pos-h-right { justify-content: flex-end; }

.sdc-banner__inner {
	max-width: 760px;
	margin: 0 auto;
}

.sdc-banner__label {
	font-size: 18px;
	font-weight: 700;
	color: var(--sdc-banner-accent, #2e6da4);
	margin-bottom: 10px;
}

.sdc-banner__heading {
	font-size: 34px;
	line-height: 1.2;
	font-weight: 800;
	margin: 0 0 26px;
	color: var(--sdc-banner-text, #1a2b4a);
}

.sdc-banner__search {
	position: relative;
	max-width: 640px;
	margin: 0 auto;
}

.sdc-banner__search .stepdocs-search-input {
	padding: 16px 20px;
	font-size: 16px;
	border-radius: 12px;
	box-shadow: 0 4px 18px rgba(26, 43, 74, 0.1);
}

@media (max-width: 600px) {
	.sdc-banner { padding: 40px 16px 44px; }
	.sdc-banner__heading { font-size: 26px; }
}

/* ==================================================================== */
/*  Breadcrumbs (single guide)                                          */
/* ==================================================================== */

.sdc-crumbs-bar { width: 100%; }

.sdc-crumbs {
	max-width: 1500px;
	margin: 0 auto;
	padding: 14px 22px 0;
	font-size: 13.5px;
	color: var(--stepdocs-gray, #7a8a9a);
}

.sdc-crumbs a {
	color: var(--stepdocs-blue, #2e6da4);
	text-decoration: none;
}

.sdc-crumbs a:hover { text-decoration: underline; }

.sdc-crumbs__sep { margin: 0 2px; opacity: 0.6; }

.sdc-crumbs__current { color: var(--stepdocs-navy, #1a2b4a); font-weight: 600; }

/* Custom-colored bar: add bottom padding and apply the chosen text color. */
.sdc-crumbs-bar.has-bg .sdc-crumbs { padding-bottom: 14px; }
.sdc-crumbs-bar.has-bg .sdc-crumbs,
.sdc-crumbs-bar.has-bg .sdc-crumbs a,
.sdc-crumbs-bar.has-bg .sdc-crumbs__current {
	color: var(--sdc-crumb-text, inherit);
}

@media (max-width: 680px) {
	.sdc-crumbs { padding: 12px 16px 0; font-size: 12.5px; }
	.sdc-crumbs-bar.has-bg .sdc-crumbs { padding-bottom: 12px; }
}
