/*
 * Shell layout (sidebar + content) and the breakpoints, ported from the identical <style> block
 * present in every design_reference/*.dc.html file. Real @media queries, not JS-computed layout —
 * the design README is explicit that these should be "real CSS media queries (do not compute in JS)".
 */

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--fa-bg);
	color: var(--fa-navy);
	-webkit-font-smoothing: antialiased;
	font-family: var(--fa-font-body);
}

a {
	color: var(--fa-navy);
	text-decoration: none;
}

a:hover {
	color: var(--fa-orange);
}

.fa-shell {
	font-family: var(--fa-font-body);
	min-height: 100vh;
	display: flex;
	background: var(--fa-bg);
	align-items: stretch;
	flex-direction: row;
}

.fa-side {
	width: 252px;
	flex: 0 0 auto;
	background: var(--fa-navy);
	padding: 22px 16px;
	display: flex;
	flex-direction: column;
	gap: 26px;
	position: sticky;
	top: 0;
	align-self: flex-start;
	min-height: 100vh;
	max-height: 100vh;
	overflow-y: auto;
	z-index: 8;
}

.fa-side-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.fa-side-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.fa-side-logo {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--fa-white);
	object-fit: cover;
	flex: 0 0 auto;
}

.fa-side-mark {
	font-family: var(--fa-font-display);
	font-weight: 800;
	font-size: 16px;
	letter-spacing: -0.01em;
	color: var(--fa-white);
	white-space: nowrap;
}

.fa-track-pill {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.09em;
	color: var(--fa-white);
	background: rgba(255, 255, 255, 0.14);
	padding: 5px 9px;
	border-radius: var(--fa-radius-pill);
	flex: 0 0 auto;
}

.fa-nav {
	display: flex;
	flex-direction: column;
	gap: 3px;
	overflow-x: visible;
	flex: 0 0 auto;
	min-width: 0;
}

.fa-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 11px;
	font-size: 14.5px;
	white-space: nowrap;
	flex: 0 0 auto;
}

.fa-nav-item:hover {
	background: rgba(255, 255, 255, 0.09);
}

.fa-nav-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.fa-nav-label {
	flex: 1;
	min-width: 0;
}

.fa-nav-badge {
	font-size: 11px;
	font-weight: 700;
	min-width: 20px;
	box-sizing: border-box;
	text-align: center;
	padding: 2px 6px;
	border-radius: var(--fa-radius-pill);
	color: var(--fa-white);
}

.fa-foot {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.fa-foot-link {
	font-size: 13.5px;
	color: var(--fa-on-navy-muted);
	padding: 0 8px;
}

.fa-foot-link:hover {
	color: var(--fa-orange);
}

.fa-user-card {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.06);
}

.fa-avatar {
	border-radius: 50%;
	flex: 0 0 auto;
	background: var(--fa-orange);
	color: var(--fa-white);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--fa-font-display);
	font-weight: 800;
}

.fa-avatar-sm {
	width: 38px;
	height: 38px;
	font-size: 13px;
}

.fa-avatar-md {
	width: 42px;
	height: 42px;
	font-size: 13.5px;
	border-radius: 11px;
}

.fa-user-name {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--fa-white);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fa-user-meta {
	font-size: 12px;
	color: var(--fa-on-navy-muted);
}

.fa-main-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.fa-header {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	padding: clamp(20px, 2.4vw, 30px) clamp(18px, 2.6vw, 34px) 20px;
	flex-wrap: wrap;
	justify-content: space-between;
}

.fa-header h1 {
	font-family: var(--fa-font-display);
	font-weight: 800;
	font-size: clamp(26px, 3.4vw, 34px);
	letter-spacing: -0.025em;
	margin: 0 0 6px;
}

.fa-tagline {
	font-family: var(--fa-font-tagline);
	font-style: italic;
	font-size: 17px;
	color: var(--fa-body);
	margin: 0;
}

.fa-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.fa-search {
	display: flex;
	align-items: center;
	gap: 9px;
	background: var(--fa-white);
	border: 1px solid var(--fa-border);
	border-radius: 11px;
	padding: 11px 14px;
	flex: 1;
	min-width: 170px;
	color: var(--fa-muted);
	font-size: 13.5px;
}

.fa-search kbd {
	font-size: 11px;
	font-weight: 600;
	color: var(--fa-muted);
	background: #f4f5f8;
	padding: 3px 6px;
	border-radius: 5px;
}

.fa-icon-btn {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	border: 1px solid var(--fa-border);
	background: var(--fa-white);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.fa-bell-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	min-width: 18px;
	height: 18px;
	box-sizing: border-box;
	border-radius: var(--fa-radius-pill);
	background: var(--fa-orange);
	color: var(--fa-white);
	font-size: 10.5px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 5px;
}

.fa-main {
	padding: 0 clamp(18px, 2.6vw, 34px) 52px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	gap: 22px;
	align-items: start;
}

.fa-col-left {
	min-width: 0;
	grid-column: span 2;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.fa-col-right {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

@media (max-width: 1119px) {
	.fa-side {
		width: 216px !important;
	}
	.fa-side-mark {
		display: none !important;
	}
	.fa-col-left {
		grid-column: auto !important;
	}
}

@media (max-width: 999px) {
	.fa-body-split {
		flex-direction: column !important;
	}
	.fa-list-pane {
		width: 100% !important;
		border-right: none !important;
	}
}

@media (max-width: 759px) {
	.fa-shell {
		flex-direction: column !important;
	}
	.fa-side {
		width: 100% !important;
		flex-direction: row !important;
		align-items: center !important;
		padding: 12px 14px !important;
		gap: 14px !important;
		min-height: auto !important;
		max-height: none !important;
		overflow-y: visible !important;
		align-self: stretch !important;
	}
	/* Phones: compact top bar (logo, track, menu button); the nav opens as a full-screen drawer. */
	.fa-side {
		position: sticky !important;
		top: 0 !important;
		z-index: 40 !important;
	}
	.fa-side-head {
		width: 100%;
		flex-wrap: nowrap !important;
	}
	.fa-side-mark {
		display: inline !important;
		font-size: 15px;
	}
	.fa-menu-btn {
		display: inline-flex !important;
	}
	.fa-side-body {
		display: none !important;
	}
	body.fa-menu-open {
		overflow: hidden;
	}
	body.fa-menu-open .fa-side-body {
		display: flex !important;
		flex-direction: column;
		gap: 20px;
		position: fixed;
		left: 0;
		right: 0;
		top: var(--fa-mobile-bar, 64px);
		bottom: 0;
		background: var(--fa-navy);
		padding: 10px 16px 28px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 41;
	}
	.fa-nav-item {
		padding: 13px 14px;
		font-size: 15.5px;
	}
	.fa-foot {
		margin-top: 0;
	}
	.fa-header {
		gap: 14px;
	}
	.fa-header-actions {
		width: 100%;
	}
	.fa-tagline {
		font-size: 15px;
	}
}

/* Desktop/tablet: the drawer wrapper is transparent to the sidebar's flex layout. */
.fa-side-body {
	display: contents;
}
.fa-menu-btn {
	display: none;
	margin-left: auto;
	width: 42px;
	height: 42px;
	border-radius: 11px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(255, 255, 255, 0.06);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
	flex: 0 0 auto;
}
.fa-menu-btn span {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: var(--fa-white);
	transition: transform 0.2s, opacity 0.2s;
}
body.fa-menu-open .fa-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.fa-menu-open .fa-menu-btn span:nth-child(2) { opacity: 0; }
body.fa-menu-open .fa-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.fa-menu-scrim[hidden] { display: none; }

/* Tablets: slightly slimmer sidebar so content keeps room. */
@media (min-width: 760px) and (max-width: 999px) {
	.fa-side {
		width: 200px !important;
		padding: 18px 12px !important;
	}
	.fa-nav-item {
		padding: 11px 12px;
		font-size: 14px;
	}
}

/* Media and wide content never push the page sideways. */
img, video, iframe {
	max-width: 100%;
}
.fa-main-col {
	overflow-x: clip;
}

/* Keep the track badge from overlapping the brand name. */
.fa-side-head {
	flex-wrap: wrap;
	row-gap: 10px;
}
