/* ==========================================================
   BeingXpert main stylesheet
   1. Design tokens   2. Base   3. Layout   4. Buttons
   5. Header          6. Accessibility
   ========================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
	/* Colors */
	--bx-primary: #0d6efd;
	--bx-primary-dark: #0a58ca;
	--bx-navy: #082b59;
	--bx-text: #17345c;
	--bx-muted: #4f6b8f;
	--bx-light: #eaf5ff;
	--bx-white: #ffffff;
	--bx-border: #cfe6ff;

	/* Typography (system fonts: fast, no external download) */
	--bx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--bx-font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
	--bx-text-sm: 0.875rem;
	--bx-text-base: 1rem;
	--bx-text-lg: 1.125rem;
	--bx-text-xl: 1.5rem;
	--bx-text-2xl: 2rem;
	--bx-text-hero: clamp(2.25rem, 5vw, 3.5rem);
	--bx-line: 1.6;

	/* Spacing */
	--bx-space-1: 0.25rem;
	--bx-space-2: 0.5rem;
	--bx-space-3: 0.75rem;
	--bx-space-4: 1rem;
	--bx-space-5: 1.5rem;
	--bx-space-6: 2rem;
	--bx-space-7: 3rem;
	--bx-space-8: 4rem;

	/* Radius and shadows */
	--bx-radius-sm: 6px;
	--bx-radius: 10px;
	--bx-radius-lg: 16px;
	--bx-shadow-sm: 0 1px 3px rgba(8, 43, 89, 0.08);
	--bx-shadow: 0 6px 18px rgba(8, 43, 89, 0.1);

	/* Containers */
	--bx-container: 1200px;
	--bx-container-narrow: 800px;

	/* Header */
	--bx-header-height: 64px;
}

/* ---------- 2. Base ---------- */
body {
	font-family: var(--bx-font);
	color: var(--bx-text);
	line-height: var(--bx-line);
	background: var(--bx-white);
}

h1, h2, h3, h4 {
	color: var(--bx-navy);
	line-height: 1.25;
}

a {
	color: var(--bx-primary);
}

img {
	max-width: 100%;
	height: auto;
}

/* ---------- 3. Layout ---------- */
.bx-container {
	width: 100%;
	max-width: var(--bx-container);
	margin-inline: auto;
	padding-inline: var(--bx-space-4);
}

.bx-container--narrow {
	max-width: var(--bx-container-narrow);
}

.bx-section {
	padding-block: var(--bx-space-7);
}

.bx-section--light {
	background: var(--bx-light);
}

/* Card grid: 4 columns desktop, 2 tablet, 1 mobile */
.bx-grid {
	display: grid;
	gap: var(--bx-space-5);
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
	.bx-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.bx-grid { grid-template-columns: 1fr; }
}

.bx-card {
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
	box-shadow: var(--bx-shadow-sm);
	padding: var(--bx-space-4);
}

/* ---------- 4. Buttons ---------- */
.bx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--bx-space-2);
	padding: 0.65rem 1.25rem;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	border: 2px solid var(--bx-primary);
	border-radius: var(--bx-radius-sm);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.bx-btn--primary {
	background: var(--bx-primary);
	color: var(--bx-white);
}

.bx-btn--primary:hover {
	background: var(--bx-primary-dark);
	border-color: var(--bx-primary-dark);
	color: var(--bx-white);
}

.bx-btn--outline {
	background: var(--bx-white);
	color: var(--bx-primary);
}

.bx-btn--outline:hover {
	background: var(--bx-light);
}

/* ---------- 5. Header ---------- */
.bx-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--bx-white);
	border-bottom: 1px solid var(--bx-border);
}

.admin-bar .bx-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .bx-header { top: 46px; }
}

.bx-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bx-space-4);
	min-height: var(--bx-header-height);
}

/* Brand */
.bx-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--bx-navy);
	text-decoration: none;
	flex-shrink: 0;
}

.bx-brand__logo {
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.bx-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.bx-brand__name {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--bx-navy);
}

.bx-brand__tagline {
	font-size: 0.75rem;
	color: var(--bx-muted);
}

/* Panel (menu + search) */
.bx-header__panel {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--bx-space-5);
	flex: 1;
}

/* Menu */
.bx-menu,
.bx-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bx-menu {
	display: flex;
	align-items: center;
	gap: var(--bx-space-1);
}

.bx-menu > li {
	position: relative;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.bx-menu a {
	display: block;
	padding: 0.5rem 0.65rem;
	color: var(--bx-navy);
	font-size: 0.95rem;
	font-weight: 500;
	text-decoration: none;
}

.bx-menu a:hover {
	color: var(--bx-primary);
}

.bx-menu > .current-menu-item > a,
.bx-menu > .current-menu-ancestor > a,
.bx-menu > .current_page_item > a {
	color: var(--bx-primary);
	box-shadow: inset 0 -2px 0 var(--bx-primary);
}

/* Submenu toggle button (added by main.js) */
.bx-submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 32px;
	margin-left: -0.4rem;
	padding: 0;
	background: none;
	border: 0;
	color: var(--bx-navy);
	cursor: pointer;
}

.bx-submenu-toggle::before {
	content: "";
	display: block;
	width: 7px;
	height: 7px;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.15s ease;
}

.menu-item-has-children.is-open > .bx-submenu-toggle::before {
	transform: rotate(-135deg);
}

/* Submenu panel */
.bx-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	padding: var(--bx-space-2);
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
	box-shadow: var(--bx-shadow);
}

.bx-menu .sub-menu a {
	border-radius: var(--bx-radius-sm);
}

.bx-menu .sub-menu a:hover {
	background: var(--bx-light);
}

.bx-menu .menu-item-has-children.is-open > .sub-menu {
	display: block;
}

@media (hover: hover) and (min-width: 961px) {
	.bx-menu .menu-item-has-children:hover > .sub-menu,
	.bx-menu .menu-item-has-children:focus-within > .sub-menu {
		display: block;
	}
}

/* Search */
.bx-search {
	display: flex;
	align-items: center;
	width: 220px;
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: 999px;
	overflow: hidden;
}

.bx-search__input {
	flex: 1;
	min-width: 0;
	padding: 0.5rem 0.9rem;
	font: inherit;
	font-size: 0.9rem;
	color: var(--bx-text);
	background: transparent;
	border: 0;
	box-shadow: none;
}

.bx-search__input:focus {
	outline: none; /* the wrapper shows the focus ring instead */
	box-shadow: none;
}

.bx-search:focus-within {
	outline: 3px solid var(--bx-primary);
	outline-offset: 2px;
}

.bx-search__btn {
	display: inline-flex;
	padding: 0.5rem 0.8rem;
	background: none;
	border: 0;
	color: var(--bx-primary);
	cursor: pointer;
}

/* Mobile toggle button (hidden on desktop) */
.bx-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius-sm);
	cursor: pointer;
}

.bx-nav-toggle__bars,
.bx-nav-toggle__bars::before,
.bx-nav-toggle__bars::after {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--bx-navy);
	border-radius: 2px;
	content: "";
}

.bx-nav-toggle__bars { position: relative; }
.bx-nav-toggle__bars::before { position: absolute; top: -7px; }
.bx-nav-toggle__bars::after { position: absolute; top: 7px; }

.bx-nav-toggle[aria-expanded="true"] .bx-nav-toggle__bars { background: transparent; }
.bx-nav-toggle[aria-expanded="true"] .bx-nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.bx-nav-toggle[aria-expanded="true"] .bx-nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

/* Tablet and mobile header */
@media (max-width: 960px) {
	.bx-nav-toggle { display: inline-flex; }

	.bx-header__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: var(--bx-space-4);
		padding: var(--bx-space-4);
		background: var(--bx-white);
		border-bottom: 1px solid var(--bx-border);
		box-shadow: var(--bx-shadow);
		max-height: calc(100vh - var(--bx-header-height));
		overflow-y: auto;
	}

	/* Hide only when JavaScript is available, so the menu never disappears for good */
	.bx-js .bx-header__panel { display: none; }
	.bx-js .bx-header__panel.is-open { display: flex; }

	.bx-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.bx-menu > li { border-bottom: 1px solid var(--bx-light); }
	.bx-menu > li > a { flex: 1; padding: 0.8rem 0.5rem; }
	.bx-submenu-toggle { width: 44px; height: 44px; margin-left: 0; }

	.bx-menu .sub-menu {
		position: static;
		width: 100%;
		min-width: 0;
		padding: 0 0 var(--bx-space-2) var(--bx-space-4);
		border: 0;
		box-shadow: none;
	}

	.bx-search { width: 100%; }
}

/* ---------- 6. Accessibility ---------- */
:focus-visible {
	outline: 3px solid var(--bx-primary);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}


/* ==========================================================
   7. Homepage (Phase 5A)
   ========================================================== */

/* Let our sections span the full width (Astra boxes content by default) */
.bx-home,
.bx-home.ast-separate-container {
	background: var(--bx-white);
}

.bx-home .ast-container {
	display: block;
	max-width: none;
	padding: 0;
}

.bx-main {
	display: block;
	width: 100%;
}

/* Section headings */
.bx-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--bx-space-4);
	margin-bottom: var(--bx-space-5);
}

.bx-section__title {
	margin: 0 0 var(--bx-space-1);
	font-size: var(--bx-text-xl);
}

.bx-section__desc {
	max-width: 46rem;
	margin: 0;
	color: var(--bx-muted);
}

.bx-link-arrow {
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.bx-link-arrow:hover {
	text-decoration: underline;
}

.bx-empty {
	padding: var(--bx-space-5);
	text-align: center;
	background: var(--bx-light);
	border-radius: var(--bx-radius);
}

/* Hero */
.bx-hero {
	background: var(--bx-light);
	border-bottom: 1px solid var(--bx-border);
}

.bx-hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: var(--bx-space-5);
    padding-block: 15px;
}

.bx-hero__eyebrow {
	margin: 0 0 var(--bx-space-2);
	font-weight: 600;
	color: var(--bx-navy);
}

.bx-hero__title {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.bx-hero__title span {
	color: var(--bx-primary);
}

.bx-hero__lead {
	max-width: 34rem;
	margin: 0 0 var(--bx-space-5);
	font-size: var(--bx-text-lg);
}

.bx-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-3);
}

.bx-hero__media img {
    display: block;
    width: 100%;
    border-radius: var(--bx-radius-lg);
}

.bx-hero__placeholder {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	background: var(--bx-navy);
	color: var(--bx-white);
	font: 700 4rem var(--bx-font-mono);
	border-radius: var(--bx-radius-lg);
}

@media (max-width: 800px) {
    .bx-hero__inner {
        grid-template-columns: 1fr;
        padding-block: 1.25rem;
        gap: 1rem;
    }

    .bx-hero__media img {
        max-height: 240px;
    }
}

/* Cards (extends the base .bx-card) */
.bx-card {
	display: flex;
	flex-direction: column;
}

.bx-thumb {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 9;
	margin-bottom: var(--bx-space-3);
	overflow: hidden;
	text-decoration: none;
	color: var(--bx-white);
	background: var(--bx-navy);
	border-radius: var(--bx-radius-sm);
}

.bx-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bx-thumb__label {
	padding: var(--bx-space-2);
	font-size: 1.5rem;
	font-weight: 800;
	text-align: center;
}

.bx-thumb--html { background: #c9381a; }
.bx-thumb--css { background: #1d3fb8; }
.bx-thumb--javascript { background: #f7df1e; color: #1a1a1a; }
.bx-thumb--php { background: #4f5b93; }
.bx-thumb--cat { background: var(--bx-primary-dark); }

.bx-card__title {
	margin: 0 0 var(--bx-space-1);
	font-size: 1.15rem;
}

.bx-card__title a {
	color: var(--bx-navy);
	text-decoration: none;
}

.bx-card__title a:hover {
	color: var(--bx-primary);
}

.bx-card__text {
	flex: 1;
	margin: 0 0 var(--bx-space-3);
	font-size: var(--bx-text-sm);
	color: var(--bx-muted);
}

.bx-card__meta {
	margin: 0 0 var(--bx-space-3);
	font-size: var(--bx-text-sm);
	color: var(--bx-muted);
}

.bx-tag {
	align-self: flex-start;
	margin-bottom: var(--bx-space-2);
	padding: 0.15rem 0.7rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--bx-navy);
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: 999px;
}

.bx-tag:hover {
	background: var(--bx-border);
}


/* ==========================================================
   8. Homepage (Phase 5B): apps, resources, newsletter, CTA, footer
   ========================================================== */

.bx-grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 800px) {
	.bx-grid--2 { grid-template-columns: 1fr; }
}

/* Extra button styles */
.bx-btn--light {
	background: var(--bx-white);
	border-color: var(--bx-white);
	color: var(--bx-navy);
}
.bx-btn--light:hover { background: var(--bx-light); color: var(--bx-navy); }

.bx-btn--ghost {
	background: transparent;
	border-color: var(--bx-white);
	color: var(--bx-white);
}
.bx-btn--ghost:hover { background: rgba(255, 255, 255, 0.15); color: var(--bx-white); }

/* Apps */
.bx-app {
	flex-direction: row;
	align-items: center;
	gap: var(--bx-space-4);
}

.bx-app__body { flex: 1; min-width: 0; }

.bx-app__head {
	display: flex;
	align-items: center;
	gap: var(--bx-space-3);
	margin-bottom: var(--bx-space-2);
}

.bx-app__head .bx-card__title { margin: 0; }

.bx-app__icon,
.bx-resource__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	font-weight: 800;
	font-size: 0.95rem;
	color: var(--bx-white);
	background: var(--bx-primary);
	border-radius: var(--bx-radius);
}

.bx-app__media { flex: 0 0 38%; }
.bx-app__media img { display: block; width: 100%; border-radius: var(--bx-radius-sm); }

@media (max-width: 600px) {
	.bx-app { flex-direction: column; align-items: stretch; }
	.bx-app__media { flex-basis: auto; }
}

.bx-checklist {
	margin: 0 0 var(--bx-space-3);
	padding: 0;
	list-style: none;
	font-size: var(--bx-text-sm);
}

.bx-checklist li {
	position: relative;
	padding-left: 1.5rem;
	margin-bottom: 0.25rem;
}

.bx-checklist li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.35em;
	width: 0.35rem;
	height: 0.65rem;
	border: solid var(--bx-primary);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.bx-badge {
	display: inline-block;
	margin: 0 0 var(--bx-space-3);
	padding: 0.15rem 0.7rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--bx-navy);
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: 999px;
}

/* Resources */
.bx-resource {
	flex-direction: row;
	align-items: flex-start;
	gap: var(--bx-space-4);
}

.bx-resource .bx-card__text { flex: initial; }

/* Newsletter */
.bx-newsletter {
	color: var(--bx-white);
	background: var(--bx-primary-dark);
}

.bx-newsletter__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--bx-space-5);
	padding-block: var(--bx-space-6);
}

.bx-newsletter__text { flex: 1 1 22rem; }
.bx-newsletter h2 { margin: 0 0 var(--bx-space-1); color: var(--bx-white); font-size: var(--bx-text-xl); }
.bx-newsletter p { margin: 0; }

.bx-newsletter__form {
	display: flex;
	flex-wrap: wrap;
	flex: 1 1 24rem;
	gap: var(--bx-space-3);
}

.bx-newsletter__form input[type="email"] {
	flex: 1 1 14rem;
	min-width: 0;
	padding: 0.7rem 1rem;
	font: inherit;
	color: var(--bx-text);
	background: var(--bx-white);
	border: 2px solid var(--bx-white);
	border-radius: var(--bx-radius-sm);
}

.bx-newsletter__form input[type="email"][aria-invalid="true"] { border-color: #ffd0d0; }

.bx-newsletter :focus-visible,
.bx-cta :focus-visible,
.bx-footer :focus-visible {
	outline-color: var(--bx-white);
}

.bx-newsletter__status {
	flex: 1 1 100%;
	margin: 0;
	min-height: 1.5em;
	font-size: var(--bx-text-sm);
}

/* Final CTA */
.bx-cta {
	color: var(--bx-white);
	text-align: center;
	background-color: var(--bx-navy);
	background-size: cover;
	background-position: center;
}

.bx-cta__inner { padding-block: var(--bx-space-7); }
.bx-cta h2 { margin: 0 0 var(--bx-space-2); color: var(--bx-white); font-size: var(--bx-text-2xl); }
.bx-cta p { max-width: 38rem; margin: 0 auto var(--bx-space-5); }

.bx-cta__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--bx-space-3);
}

/* Footer */
.bx-footer {
	color: #dbe8f8;
	background: var(--bx-navy);
}

.bx-footer a { color: #dbe8f8; text-decoration: none; }
.bx-footer a:hover { color: var(--bx-white); text-decoration: underline; }

.bx-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: var(--bx-space-6);
	padding-block: var(--bx-space-7);
}

@media (max-width: 900px) {
	.bx-footer__grid { grid-template-columns: 1fr 1fr; }
	.bx-footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 500px) {
	.bx-footer__grid { grid-template-columns: 1fr; }
}

.bx-brand--footer .bx-brand__name { color: var(--bx-white); }
.bx-brand--footer .bx-brand__tagline { color: #b9d2f2; }
.bx-footer__brand p { max-width: 24rem; margin: var(--bx-space-3) 0; font-size: var(--bx-text-sm); }

.bx-footer__heading {
	margin: 0 0 var(--bx-space-3);
	font-size: 1rem;
	color: var(--bx-white);
}

.bx-footer__menu,
.bx-footer__legal,
.bx-social {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bx-footer__menu li { margin-bottom: var(--bx-space-2); font-size: var(--bx-text-sm); }

.bx-social { display: flex; flex-wrap: wrap; gap: var(--bx-space-3); font-size: var(--bx-text-sm); }

.bx-footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: var(--bx-text-sm); }

.bx-footer__bar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--bx-space-3);
	padding-block: var(--bx-space-4);
}

.bx-footer__bar p { margin: 0; }
.bx-footer__legal { display: flex; flex-wrap: wrap; gap: var(--bx-space-4); }


/* Resources: stack icon above text so four cards fit in one row */
.bx-resources-grid .bx-resource {
	flex-direction: column;
	align-items: flex-start;
	gap: var(--bx-space-3);
}

/* Resource icons: soft blue tile with a blue line icon */
.bx-resource__icon {
	width: 56px;
	height: 56px;
	color: var(--bx-primary);
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
}

.bx-resource__icon .bx-icon {
	display: block;
}


/* ==========================================================
   10. Full width + tutorial layout (Phase 6B)
   ========================================================== */

/* ----- Full width -----
   Change 1600px to 100% for a truly edge-to-edge layout. */
:root {
	--bx-container: 1600px;
}

.bx-container {
	padding-inline: clamp(1rem, 3vw, 3rem);
}

body .ast-container {
	max-width: var(--bx-container);
}

/* ----- Tutorial pages use our own layout, not Astra's box ----- */
.bx-tutorial .ast-container {
	display: block;
	max-width: none;
	padding: 0;
}

/* Course bar */
.bx-tut-bar {
	background: var(--bx-navy);
}

.bx-tut-bar__list {
	display: flex;
	gap: 0;
	margin: 0;
	padding: 0 clamp(1rem, 3vw, 3rem);
	list-style: none;
	overflow-x: auto;
}

.bx-tut-bar a {
	display: block;
	padding: 0.7rem 1.1rem;
	color: var(--bx-white);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.bx-tut-bar a:hover,
.bx-tut-bar a[aria-current] {
	background: var(--bx-primary);
	color: var(--bx-white);
}

.bx-tut-bar :focus-visible { outline-color: var(--bx-white); }

/* Grid: sidebar + content */
.bx-tut {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	align-items: start;
	min-height: 60vh;
}

/* Sidebar */
.bx-lesson-nav {
	position: sticky;
	top: var(--bx-header-height);
	max-height: calc(100vh - var(--bx-header-height));
	overflow-y: auto;
	padding: var(--bx-space-4);
	background: var(--bx-light);
	border-right: 1px solid var(--bx-border);
}

.admin-bar .bx-lesson-nav {
	top: calc(var(--bx-header-height) + 32px);
	max-height: calc(100vh - var(--bx-header-height) - 32px);
}

.bx-lesson-nav__home {
	display: block;
	margin-bottom: var(--bx-space-3);
	padding: 0.5rem 0.75rem;
	font-weight: 700;
	color: var(--bx-white);
	background: var(--bx-primary);
	border-radius: var(--bx-radius-sm);
	text-decoration: none;
}

.bx-lesson-nav__home:hover { background: var(--bx-primary-dark); color: var(--bx-white); }

.bx-lesson-nav__title {
	margin: var(--bx-space-4) 0 var(--bx-space-2);
	font-size: 1rem;
	text-transform: none;
}

.bx-lesson-nav__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bx-lesson-nav__list a {
	display: block;
	padding: 0.35rem 0.75rem;
	font-size: 0.95rem;
	color: var(--bx-text);
	text-decoration: none;
	border-radius: var(--bx-radius-sm);
}

.bx-lesson-nav__list a:hover { background: var(--bx-border); }

.bx-lesson-nav__list a[aria-current="page"] {
	font-weight: 700;
	color: var(--bx-white);
	background: var(--bx-navy);
}

.bx-lesson-nav__empty { font-size: var(--bx-text-sm); color: var(--bx-muted); }

/* Main content */
.bx-tut__main {
	min-width: 0;
	padding: var(--bx-space-5) clamp(1rem, 3vw, 3rem) var(--bx-space-7);
}

.bx-tut__article { max-width: 64rem; }

.bx-tut__title {
	margin: var(--bx-space-3) 0 var(--bx-space-4);
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.bx-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-2);
	font-size: var(--bx-text-sm);
	color: var(--bx-muted);
}

.bx-breadcrumb a { text-decoration: none; }
.bx-breadcrumb a:hover { text-decoration: underline; }

/* Previous / Next */
.bx-pager {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-3);
	margin: var(--bx-space-4) 0;
}

.bx-pager__next { margin-left: auto; }

/* Lesson typography and tables */
.bx-tut__content { font-size: 1.05rem; }
.bx-tut__content h2 { margin: var(--bx-space-6) 0 var(--bx-space-3); font-size: 1.5rem; }

.bx-lesson-body table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--bx-space-4) 0;
}

.bx-lesson-body th,
.bx-lesson-body td {
	padding: 0.5rem 0.75rem;
	text-align: left;
	border: 1px solid var(--bx-border);
}

.bx-lesson-body th { background: var(--bx-light); color: var(--bx-navy); }

/* Mobile lesson menu button (hidden on desktop) */
.bx-lessons-toggle { display: none; }

@media (max-width: 900px) {
	.bx-tut { grid-template-columns: 1fr; }

	.bx-lessons-toggle {
		display: block;
		width: 100%;
		padding: 0.8rem 1rem;
		font: inherit;
		font-weight: 700;
		text-align: left;
		color: var(--bx-white);
		background: var(--bx-primary-dark);
		border: 0;
		cursor: pointer;
	}

	.bx-lessons-toggle::after {
		content: "\25BE";
		float: right;
	}

	.bx-lessons-toggle[aria-expanded="true"]::after { content: "\25B4"; }

	.bx-lesson-nav {
		position: static;
		max-height: 60vh;
		border-right: 0;
		border-bottom: 1px solid var(--bx-border);
	}

	/* Hide only when JavaScript can reopen it */
	.bx-js .bx-lesson-nav { display: none; }
	.bx-js .bx-lesson-nav.is-open { display: block; }

	.admin-bar .bx-lesson-nav { top: auto; }
}


/* =========================================
   BeingXpert: Compact Homepage Sections
   Reduce section heights and vertical gaps
   ========================================= */

/* Reduce vertical padding of all homepage sections */
.bx-home .bx-section {
    padding-top: 32px;
    padding-bottom: 32px;
}

/* Reduce gaps between cards */
.bx-home .bx-grid {
    gap: 16px;
}

/* Reduce space below section headings */
.bx-home .bx-section__head {
    gap: 10px;
    margin-bottom: 16px;
}

/* Make cards more compact */
.bx-home .bx-card {
    padding: 12px;
}

/* Reduce space inside cards */
.bx-home .bx-thumb {
    margin-bottom: 8px;
}

.bx-home .bx-card__text,
.bx-home .bx-card__meta {
    margin-bottom: 8px;
}

/* Hero section */
.bx-home .bx-hero__inner {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 20px;
}

.bx-home .bx-hero__title {
    margin-bottom: 10px;
    font-size: clamp(30px, 3.5vw, 44px);
    line-height: 1.15;
}

.bx-home .bx-hero__lead {
    margin-bottom: 14px;
    font-size: 1rem;
}

/* Limit hero image height */
.bx-home .bx-hero__media img {
    max-height: 300px;
    object-fit: cover;
}

/* Apps and resources */
.bx-home .bx-app {
    gap: 12px;
}

.bx-home .bx-app__head {
    margin-bottom: 8px;
}

.bx-home .bx-resource {
    gap: 10px;
}

.bx-home .bx-resource__icon {
    width: 44px;
    height: 44px;
}

/* Newsletter section */
.bx-home .bx-newsletter__inner {
    padding-top: 24px;
    padding-bottom: 24px;
    gap: 16px;
}

/* Final call-to-action section */
.bx-home .bx-cta__inner {
    padding-top: 28px;
    padding-bottom: 28px;
}

.bx-home .bx-cta p {
    margin-bottom: 16px;
}

/* Footer section */
.bx-home .bx-footer__grid {
    padding-top: 24px;
    padding-bottom: 24px;
    gap: 20px;
}

/* Reduce spacing on tablets and mobile */
@media (max-width: 800px) {
    .bx-home .bx-section {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .bx-home .bx-grid {
        gap: 12px;
    }

    .bx-home .bx-hero__inner {
        padding-top: 16px;
        padding-bottom: 16px;
        gap: 14px;
    }

    .bx-home .bx-hero__media img {
        max-height: 220px;
    }

    .bx-home .bx-newsletter__inner {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .bx-home .bx-cta__inner {
        padding-top: 24px;
        padding-bottom: 24px;
    }
}


/* ==========================================================
   11. Blog (Phase 10A)
   ========================================================== */

.bx-blogview .ast-container {
	display: block;
	max-width: none;
	padding: 0;
}

/* Page header band */
.bx-pagehead {
	padding-block: var(--bx-space-6) var(--bx-space-5);
	background: var(--bx-light);
	border-bottom: 1px solid var(--bx-border);
}

.bx-pagehead h1 {
	margin: var(--bx-space-3) 0 var(--bx-space-2);
	font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

.bx-pagehead__desc {
	max-width: 46rem;
	margin: 0 0 var(--bx-space-4);
	color: var(--bx-muted);
}

.bx-pagehead__desc p { margin: 0; }

/* Category buttons */
.bx-catnav ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bx-catnav a {
	display: block;
	padding: 0.4rem 1rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--bx-navy);
	text-decoration: none;
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: 999px;
}

.bx-catnav a:hover { background: var(--bx-border); }

.bx-catnav a[aria-current="page"] {
	color: var(--bx-white);
	background: var(--bx-navy);
	border-color: var(--bx-navy);
}

/* Three-column grid */
.bx-grid--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
	.bx-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.bx-grid--3 { grid-template-columns: 1fr; }
}

.bx-empty .bx-btn { margin: var(--bx-space-1); }

/* Search form on the results page */
.bx-searchform {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-3);
	max-width: 36rem;
}

.bx-searchform input[type="search"] {
	flex: 1 1 14rem;
	min-width: 0;
	padding: 0.65rem 1rem;
	font: inherit;
	color: var(--bx-text);
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius-sm);
}

/* Pagination */
.bx-blogview .navigation.pagination { margin-top: var(--bx-space-6); }

.bx-blogview .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--bx-space-2);
}

.bx-blogview .page-numbers {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	color: var(--bx-navy);
	text-decoration: none;
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius-sm);
}

.bx-blogview a.page-numbers:hover { background: var(--bx-light); }

.bx-blogview .page-numbers.current {
	color: var(--bx-white);
	background: var(--bx-primary-dark);
	border-color: var(--bx-primary-dark);
}

.bx-blogview .page-numbers.dots { border: 0; background: none; }

/* Single post */
.bx-single { padding-bottom: var(--bx-space-7); }
.bx-single .bx-breadcrumb { margin: var(--bx-space-5) 0 var(--bx-space-3); }

.bx-post__title {
	margin: var(--bx-space-2) 0 var(--bx-space-3);
	font-size: clamp(1.9rem, 4vw, 2.75rem);
	line-height: 1.2;
}

.bx-post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.6rem;
	margin: 0 0 var(--bx-space-5);
	font-size: var(--bx-text-sm);
	color: var(--bx-muted);
}

.bx-post__figure { margin: 0 0 var(--bx-space-5); }

.bx-post__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--bx-radius);
}

.bx-post__tags { margin-top: var(--bx-space-5); font-size: var(--bx-text-sm); color: var(--bx-muted); }

/* Article text */
.bx-prose { font-size: 1.1rem; line-height: 1.75; }
.bx-prose h2 { margin: var(--bx-space-6) 0 var(--bx-space-3); font-size: 1.6rem; }
.bx-prose h3 { margin: var(--bx-space-5) 0 var(--bx-space-2); font-size: 1.3rem; }
.bx-prose img { max-width: 100%; height: auto; border-radius: var(--bx-radius-sm); }

.bx-prose pre {
	padding: 1rem;
	overflow-x: auto;
	font-family: var(--bx-font-mono);
	font-size: 0.9rem;
	background: #f6faff;
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius-sm);
}

.bx-prose :not(pre) > code {
	padding: 0.1rem 0.35rem;
	font-family: var(--bx-font-mono);
	font-size: 0.9em;
	background: var(--bx-light);
	border-radius: 4px;
}

.bx-prose blockquote {
	margin: var(--bx-space-5) 0;
	padding: 0.5rem 1.25rem;
	background: var(--bx-light);
	border-left: 4px solid var(--bx-primary);
}

.bx-prose table { width: 100%; border-collapse: collapse; margin: var(--bx-space-4) 0; }
.bx-prose th,
.bx-prose td { padding: 0.5rem 0.75rem; text-align: left; border: 1px solid var(--bx-border); }
.bx-prose th { background: var(--bx-light); }

/* Previous / next article */
.bx-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--bx-space-4);
	margin-top: var(--bx-space-6);
}

.bx-postnav a {
	display: block;
	padding: var(--bx-space-4);
	text-decoration: none;
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
}

.bx-postnav a:hover { background: var(--bx-light); }
.bx-postnav__next { grid-column: 2; text-align: right; }
.bx-postnav__prev { grid-column: 1; }
.bx-postnav__label { display: block; font-size: var(--bx-text-sm); color: var(--bx-muted); }
.bx-postnav__title { display: block; font-weight: 700; color: var(--bx-navy); }

@media (max-width: 600px) {
	.bx-postnav { grid-template-columns: 1fr; }
	.bx-postnav__next,
	.bx-postnav__prev { grid-column: 1; text-align: left; }
}


/* ==========================================================
   12. Blog (Phase 10B): table of contents, share, related
   ========================================================== */

.bx-prose h2,
.bx-prose h3 { scroll-margin-top: calc(var(--bx-header-height) + 24px); }

.admin-bar .bx-prose h2,
.admin-bar .bx-prose h3 { scroll-margin-top: calc(var(--bx-header-height) + 56px); }

/* Table of contents */
.bx-toc {
	margin: 0 0 var(--bx-space-5);
	padding: var(--bx-space-4) var(--bx-space-5);
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
}

.bx-toc__title {
	margin: 0 0 var(--bx-space-2);
	font-weight: 700;
	color: var(--bx-navy);
}

.bx-toc__list {
	margin: 0;
	padding-left: 1.25rem;
	font-size: 0.95rem;
}

.bx-toc__item { margin: 0.25rem 0; }
.bx-toc__item--3 { margin-left: 1.25rem; list-style: circle; }
.bx-toc__item a { text-decoration: none; }
.bx-toc__item a:hover { text-decoration: underline; }

/* Share links */
.bx-share {
	margin-top: var(--bx-space-6);
	padding: var(--bx-space-4);
	border-top: 1px solid var(--bx-border);
	border-bottom: 1px solid var(--bx-border);
}

.bx-share__title { margin: 0 0 var(--bx-space-2); font-weight: 700; color: var(--bx-navy); }

.bx-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bx-share__list a,
.bx-share__btn {
	display: inline-block;
	padding: 0.4rem 0.9rem;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--bx-primary-dark);
	text-decoration: none;
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: 999px;
	cursor: pointer;
}

.bx-share__list a:hover,
.bx-share__btn:hover { background: var(--bx-light); }

.bx-share__status { margin: var(--bx-space-2) 0 0; min-height: 1.4em; font-size: var(--bx-text-sm); color: var(--bx-muted); }

/* Related articles */
.bx-related { margin-top: var(--bx-space-7); }
.bx-related .bx-section__title { margin-bottom: var(--bx-space-4); }


/* ==========================================================
   13. Apps and Resources (Phase 11)
   ========================================================== */

.bx-apphero {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	align-items: center;
	gap: var(--bx-space-6);
}

@media (max-width: 800px) {
	.bx-apphero { grid-template-columns: 1fr; }
}

.bx-apphero__title {
	display: flex;
	align-items: center;
	gap: var(--bx-space-3);
	margin: var(--bx-space-3) 0 var(--bx-space-2);
}

.bx-apphero__title h1 { margin: 0; }

.bx-apphero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--bx-space-3);
}

.bx-apphero__actions .bx-badge { margin: 0; }
.bx-apphero__media img { display: block; width: 100%; height: auto; border-radius: var(--bx-radius); }

/* App page content */
.bx-app-content h2 { padding-top: var(--bx-space-2); border-top: 1px solid var(--bx-border); }
.bx-app-content h2:first-child { border-top: 0; }

.bx-placeholder {
	padding: var(--bx-space-3) var(--bx-space-4);
	color: #664d03;
	background: #fff3cd;
	border: 1px dashed #997404;
	border-radius: var(--bx-radius-sm);
}

.bx-faq details {
	margin: 0 0 var(--bx-space-3);
	padding: 0.7rem 1rem;
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius-sm);
}

.bx-faq summary { cursor: pointer; font-weight: 700; color: var(--bx-navy); }
.bx-faq details p { margin: var(--bx-space-2) 0 0; }

/* Resources */
.bx-resgrid .bx-card { align-items: flex-start; }
.bx-resgrid .bx-resource__icon { margin-bottom: var(--bx-space-3); }

.bx-linklist {
	margin: 0;
	padding-left: 1.1rem;
	font-size: var(--bx-text-sm);
}

.bx-linklist li { margin-bottom: 0.4rem; }

.bx-resource-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-3);
	margin-top: var(--bx-space-4);
}


/* ==========================================================
   14. Tutorials hub page
   ========================================================== */

.bx-tuthero .bxc-tsearch { max-width: 44rem; margin: var(--bx-space-4) 0; }

.bx-tuthero .bxc-tsearch input[type="search"],
.bx-tuthero .bxc-tsearch select {
	padding: 0.65rem 1rem;
	font: inherit;
	color: var(--bx-text);
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius-sm);
}

.bx-tuthero .bxc-tsearch .bxc-btn {
	padding: 0.65rem 1.2rem;
	color: var(--bx-white);
	background: var(--bx-primary-dark);
	border: 0;
	border-radius: var(--bx-radius-sm);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* Totals */
.bx-stats {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-3) var(--bx-space-6);
	margin: var(--bx-space-4) 0 0;
	padding: 0;
	list-style: none;
	color: var(--bx-muted);
}

.bx-stats strong {
	margin-right: 0.25rem;
	font-size: 1.5rem;
	color: var(--bx-navy);
}

/* Course grid */
.bx-course-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--bx-space-5);
	margin-top: var(--bx-space-5);
}

@media (max-width: 1024px) {
	.bx-course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.bx-course-grid { grid-template-columns: 1fr; }
}

.bx-course {
	--accent: var(--bx-primary);
	display: flex;
	flex-direction: column;
	padding: var(--bx-space-5);
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-top: 5px solid var(--accent);
	border-radius: var(--bx-radius);
	box-shadow: var(--bx-shadow-sm);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bx-course:hover,
.bx-course:focus-within {
	box-shadow: var(--bx-shadow);
	transform: translateY(-3px);
}

.bx-course--html { --accent: #c9381a; }
.bx-course--css { --accent: #1d3fb8; }
.bx-course--javascript { --accent: #b58900; }
.bx-course--php { --accent: #4f5b93; }
.bx-course--xml { --accent: #146c43; }

.bx-course__head {
	display: flex;
	align-items: center;
	gap: var(--bx-space-3);
	margin-bottom: var(--bx-space-3);
}

.bx-course__icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 52px;
	height: 52px;
	color: var(--accent);
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
}

.bx-course__title { margin: 0; font-size: 1.25rem; }
.bx-course__title a { color: var(--bx-navy); text-decoration: none; }
.bx-course__title a:hover { color: var(--accent); }

.bx-course__level {
	margin: 0.15rem 0 0;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--accent);
}

.bx-course__text { margin: 0 0 var(--bx-space-3); color: var(--bx-muted); }

.bx-course__topics {
	margin: 0 0 var(--bx-space-3);
	padding: 0;
	list-style: none;
	font-size: var(--bx-text-sm);
}

.bx-course__topics li {
	position: relative;
	margin-bottom: 0.3rem;
	padding-left: 1.4rem;
}

.bx-course__topics li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.35em;
	width: 0.3rem;
	height: 0.6rem;
	border: solid var(--accent);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.bx-course__meta {
	margin: auto 0 var(--bx-space-3);
	font-weight: 600;
	color: var(--bx-navy);
}

.bx-course__progress { margin: 0 0 var(--bx-space-3); font-size: var(--bx-text-sm); color: var(--bx-muted); }
.bx-course__progress[hidden] { display: none; }
.bx-course__progress progress { display: block; width: 100%; height: 8px; margin-top: 0.25rem; }

.bx-course__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bx-space-2);
}

.bx-course__actions .bx-btn { padding: 0.55rem 1rem; font-size: 0.95rem; }

/* Learning path */
.bx-path {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: var(--bx-space-4);
	margin: var(--bx-space-5) 0 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 1024px) {
	.bx-path { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.bx-path { grid-template-columns: 1fr; }
}

.bx-path li {
	display: flex;
	gap: var(--bx-space-3);
	padding: var(--bx-space-4);
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
}

.bx-path__num {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	font-weight: 800;
	color: var(--bx-white);
	background: var(--bx-primary-dark);
	border-radius: 50%;
}

.bx-path h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.bx-path h3 a { text-decoration: none; }
.bx-path p { margin: 0; font-size: var(--bx-text-sm); color: var(--bx-muted); }


/* ==========================================================
   15. About and Contact pages
   ========================================================== */

/* About */
.bx-about__intro {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: var(--bx-space-6);
	align-items: start;
}

@media (max-width: 800px) {
	.bx-about__intro { grid-template-columns: 1fr; }
}

.bx-about__glance {
	padding: var(--bx-space-5);
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
}

.bx-about__glance h2 { margin: 0 0 var(--bx-space-3); font-size: 1.2rem; }

.bx-glance {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bx-glance li {
	padding: 0.6rem 0;
	color: var(--bx-muted);
	border-bottom: 1px solid var(--bx-border);
}

.bx-glance li:last-child { border-bottom: 0; }

.bx-glance strong {
	margin-right: 0.35rem;
	font-size: 1.5rem;
	color: var(--bx-navy);
}

.bx-offer .bx-resource__icon { margin-bottom: var(--bx-space-3); }

.bx-values {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--bx-space-5);
	margin: var(--bx-space-4) 0 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 1024px) {
	.bx-values { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.bx-values { grid-template-columns: 1fr; }
}

.bx-values li {
	padding-top: var(--bx-space-3);
	border-top: 4px solid var(--bx-primary);
}

.bx-values h3 { margin: 0 0 var(--bx-space-2); font-size: 1.1rem; }
.bx-values p { margin: 0; color: var(--bx-muted); }

.bx-checklist--lg { font-size: 1.05rem; }
.bx-checklist--lg li { margin-bottom: 0.6rem; }
.bx-about__note { margin: var(--bx-space-5) 0 0; color: var(--bx-muted); }

/* Contact */
.bx-contact__grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: var(--bx-space-6);
	align-items: start;
}

@media (max-width: 900px) {
	.bx-contact__grid { grid-template-columns: 1fr; }
}

.bx-contact__main { scroll-margin-top: calc(var(--bx-header-height) + 24px); }
.bx-contact__main:focus { outline: none; }
.bx-contact__intro { margin-bottom: var(--bx-space-5); }

.bx-form {
	padding: var(--bx-space-5);
	background: var(--bx-white);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
	box-shadow: var(--bx-shadow-sm);
}

.bx-form__note { margin: 0 0 var(--bx-space-4); font-size: var(--bx-text-sm); color: var(--bx-muted); }
.bx-form__row { margin-bottom: var(--bx-space-4); }

.bx-form label { display: block; margin-bottom: 0.3rem; font-weight: 600; color: var(--bx-navy); }

.bx-form input[type="text"],
.bx-form input[type="email"],
.bx-form select,
.bx-form textarea {
	width: 100%;
	padding: 0.65rem 0.85rem;
	font: inherit;
	color: var(--bx-text);
	background: var(--bx-white);
	border: 1px solid #8fb4e3;
	border-radius: var(--bx-radius-sm);
	box-sizing: border-box;
}

.bx-form textarea { min-height: 9rem; resize: vertical; }

.bx-form [aria-invalid="true"] { border: 2px solid #b02a37; }

.bx-form__hint { margin: 0.3rem 0 0; font-size: var(--bx-text-sm); color: var(--bx-muted); }
.bx-form__error { margin: 0.3rem 0 0; font-size: var(--bx-text-sm); font-weight: 600; color: #b02a37; }

.bx-form__row--check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.6rem;
	align-items: start;
}

.bx-form__row--check input { margin-top: 0.3rem; }
.bx-form__row--check label { margin: 0; font-weight: 400; color: var(--bx-text); }
.bx-form__row--check .bx-form__error { grid-column: 1 / -1; }

/* Spam trap: off-screen, not display:none */
.bx-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Alerts */
.bx-alert {
	margin-bottom: var(--bx-space-4);
	padding: var(--bx-space-4);
	border: 1px solid;
	border-radius: var(--bx-radius);
}

.bx-alert h2 { margin: 0 0 var(--bx-space-2); font-size: 1.1rem; }
.bx-alert p, .bx-alert ul { margin: 0; }
.bx-alert ul { padding-left: 1.2rem; }
.bx-alert--ok { color: #0a3622; background: #d1e7dd; border-color: #146c43; }
.bx-alert--error { color: #58151c; background: #f8d7da; border-color: #b02a37; }
.bx-alert a { color: inherit; font-weight: 600; }

/* Side cards */
.bx-contact__side { display: grid; gap: var(--bx-space-4); }

.bx-sidecard {
	padding: var(--bx-space-4);
	background: var(--bx-light);
	border: 1px solid var(--bx-border);
	border-radius: var(--bx-radius);
}

.bx-sidecard h2 { margin: 0 0 var(--bx-space-2); font-size: 1.1rem; }
.bx-sidecard p { margin: 0; }
.bx-sidecard .bx-linklist { margin: 0; padding-left: 1.1rem; font-size: var(--bx-text-sm); }
.bx-sidecard .bx-linklist li { margin-bottom: 0.5rem; }

.bx-section__desc {
    max-width: 720px;
    margin: -12px auto 32px;
    text-align: center;
    color: var(--bx-muted, #64748b);
    line-height: 1.7;
}