/**
 * Module: Compliance Section (Annual Compliance Calendar / Year)
 * Loaded dynamically when `compliance_section` is present on the page.
 */

:root {
	--indigo: #002B5C;
	--crimson: #ED1C24;
	--slate: #060606;
	--mist: #A5A4A4;
	--frost: #EDEDED;
	--white: #FFFFFF;
	--indigo-deep: #001A3A;
	--indigo-tint: #F2F5F9;
	--ink: #1C2230;
	--ink-soft: #4A5568;
	--line: #D9DCE1;
	--display: 'Gotham', 'Montserrat', system-ui, sans-serif;
	--body: 'Open Sans', system-ui, sans-serif;
	--max: 1180px;
	--gutter: clamp(20px, 4vw, 48px);
	--radius: 6px;
}

/* Compliance Year Section */
.year,
.compliance-section {
	background: var(--indigo, #002B5C);
	color: #FFFFFF;
	padding: 72px 0 76px;
	overflow: hidden;
	position: relative;
}

.year .wrap,
.compliance-section .wrap {
	max-width: var(--max, 1180px);
	margin: 0 auto;
	padding: 0 var(--gutter, clamp(20px, 4vw, 48px));
}

/* Section Header */
.year .head {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 40px;
	align-items: end;
	margin-bottom: 34px;
}

.year .head .eyebrow,
.on-dark .eyebrow {
	font-family: var(--display);
	font-weight: 600;
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, .85) !important;
	margin-bottom: 12px;
	display: block;
}

.year .head h2 {
	font-family: var(--display);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.01em;
	color: #FFFFFF;
	margin: 0;
}

.year .head p {
	font-family: var(--body);
	color: rgba(255, 255, 255, .78);
	font-size: 17px;
	font-weight: 300;
	line-height: 1.6;
	max-width: 560px;
	margin-top: 10px;
	margin-bottom: 0;
}

/* Next Deadline Card */
.nextd {
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 10px;
	padding: 16px 18px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 16px;
	align-items: center;
	box-sizing: border-box;
}

.nextd .d {
	font-family: var(--display);
	font-weight: 800;
	font-size: 44px;
	line-height: .9;
	color: var(--crimson, #ED1C24);
	letter-spacing: -.03em;
	font-variant-numeric: tabular-nums;
	display: block;
}

.nextd .d small {
	display: block;
	font-family: var(--body);
	font-weight: 400;
	font-size: 11.5px;
	color: rgba(255, 255, 255, .65);
	letter-spacing: .06em;
	text-transform: uppercase;
	margin-top: 6px;
}

.nextd .t {
	font-family: var(--body);
	font-size: 13.5px;
	color: rgba(255, 255, 255, .8);
	line-height: 1.4;
}

.nextd .t b {
	display: block;
	color: #FFFFFF;
	font-family: var(--display);
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 2px;
}

/* Calendar Display Structure */
.cal {
	position: relative;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 12px;
	background: rgba(255, 255, 255, .04);
	padding: 18px 0 14px;
}

.cal-in {
	position: relative;
}

.months {
	display: grid;
	grid-template-columns: 120px repeat(12, 1fr);
	font-family: var(--display);
	font-size: 11px;
	letter-spacing: .1em;
	color: rgba(255, 255, 255, .5);
	padding: 0 0 12px;
	border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.months span {
	text-align: center;
}

.lane {
	display: grid;
	grid-template-columns: 120px repeat(12, 1fr);
	align-items: center;
	height: 64px;
	position: relative;
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.lane:last-of-type {
	border-bottom: 0;
}

.lane .lbl {
	padding-left: 18px;
	font-family: var(--display);
	font-weight: 700;
	font-size: 13.5px;
	color: #FFFFFF;
	line-height: 1.2;
}

.lane .lbl small {
	display: block;
	font-family: var(--body);
	font-weight: 400;
	font-size: 11.5px;
	color: rgba(255, 255, 255, .55);
	margin-top: 2px;
}

.lane .cell {
	position: relative;
	height: 100%;
}

.m {
	position: absolute;
	top: 50%;
	left: var(--x, 50%);
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	cursor: default;
}

.m .dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--crimson, #ED1C24);
	box-shadow: 0 0 0 4px rgba(237, 28, 36, .25);
	transition: transform .25s;
}

.m.soft .dot {
	width: 9px;
	height: 9px;
	background: rgba(255, 255, 255, .55);
	box-shadow: none;
}

.m.win .dot {
	width: auto;
	height: 8px;
	border-radius: 999px;
	background: rgba(237, 28, 36, .35);
	box-shadow: none;
}

.m .tip {
	position: absolute;
	bottom: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: #FFFFFF;
	color: var(--ink, #1C2230);
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 12.5px;
	line-height: 1.35;
	width: max-content;
	max-width: 230px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
	z-index: 5;
	white-space: normal;
}

.m .tip b {
	display: block;
	font-family: var(--display);
	color: var(--indigo, #002B5C);
	font-size: 12.5px;
	margin-bottom: 2px;
}

.m .tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-top-color: #FFFFFF;
}

.m:hover .tip,
.m:focus-within .tip {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.m.lit .dot {
	animation: ring 1.8s ease-out infinite;
}

@keyframes ring {
	0% { box-shadow: 0 0 0 4px rgba(237, 28, 36, .35); }
	70% { box-shadow: 0 0 0 14px rgba(237, 28, 36, 0); }
	100% { box-shadow: 0 0 0 14px rgba(237, 28, 36, 0); }
}

.today {
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(120px + (100% - 120px) * var(--t, 0));
	width: 2px;
	background: #FFFFFF;
	opacity: .9;
	transition: left 2.4s cubic-bezier(.2, .8, .2, 1);
}

.today::after {
	content: "Today";
	position: absolute;
	top: -2px;
	left: 8px;
	font-family: var(--display);
	font-size: 10.5px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #FFFFFF;
	background: rgba(0, 43, 92, .9);
	padding: 3px 7px;
	border-radius: 4px;
	white-space: nowrap;
}

.year.sweep .today {
	left: calc(120px + (100% - 120px) * var(--t, 0));
}

.year:not(.sweep) .today {
	left: 120px;
	transition: none;
}

.legend {
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
	margin-top: 14px;
	font-size: 12.5px;
	color: rgba(255, 255, 255, .65);
}

.legend span {
	display: inline-flex;
	gap: 8px;
	align-items: center;
}

.legend i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--crimson, #ED1C24);
	display: inline-block;
}

.legend i.s {
	width: 8px;
	height: 8px;
	background: rgba(255, 255, 255, .55);
}

.legend i.w {
	width: 22px;
	height: 7px;
	border-radius: 999px;
	background: rgba(237, 28, 36, .35);
}

/* Bottom CTA band */
.year .ctas,
.compliance-section .ctas {
	margin-top: 36px;
	padding-top: 26px;
	border-top: 1px solid rgba(255, 255, 255, .14);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.year .ctas p,
.compliance-section .ctas p {
	font-family: var(--body);
	color: rgba(255, 255, 255, .78);
	font-size: 15px;
	line-height: 1.6;
	max-width: 560px;
	margin: 0;
	flex: 1 1 300px;
}

.year .ctas .actions,
.compliance-section .ctas .actions {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	align-items: center;
	flex-shrink: 0;
}

/* Action Buttons */
.year .ctas .btn,
.compliance-section .ctas .btn {
	font-family: var(--display);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.6;
	letter-spacing: .02em;
	padding: 14px 26px;
	border-radius: var(--radius, 6px);
	border: 2px solid transparent !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
	cursor: pointer;
	white-space: nowrap;
	box-sizing: border-box;
}

.year .ctas .btn:hover,
.compliance-section .ctas .btn:hover {
	transform: translateY(-1px);
}

.year .ctas .btn-primary,
.year .ctas .btn.btn-primary,
.year .ctas .btn.primary,
.compliance-section .ctas .btn-primary,
.compliance-section .ctas .btn.btn-primary,
.compliance-section .ctas .btn.primary {
	background: var(--crimson, #ED1C24) !important;
	color: #FFFFFF !important;
	border-color: transparent !important;
}

.year .ctas .btn-primary:hover,
.year .ctas .btn.btn-primary:hover,
.year .ctas .btn.primary:hover,
.compliance-section .ctas .btn-primary:hover,
.compliance-section .ctas .btn.btn-primary:hover,
.compliance-section .ctas .btn.primary:hover {
	background: #C9151C !important;
	border-color: transparent !important;
	color: #FFFFFF !important;
}

.year .ctas .btn-outline,
.year .ctas .btn.btn-outline,
.year .ctas .btn.outline,
.compliance-section .ctas .btn-outline,
.compliance-section .ctas .btn.btn-outline,
.compliance-section .ctas .btn.outline {
	background: transparent !important;
	color: #FFFFFF !important;
	border-color: rgba(255, 255, 255, .7) !important;
}

.year .ctas .btn-outline:hover,
.year .ctas .btn.btn-outline:hover,
.year .ctas .btn.outline:hover,
.compliance-section .ctas .btn-outline:hover,
.compliance-section .ctas .btn.btn-outline:hover,
.compliance-section .ctas .btn.outline:hover {
	background: #FFFFFF !important;
	color: var(--indigo, #002B5C) !important;
	border-color: #FFFFFF !important;
}

/* Responsive Breakpoints */
@media (max-width: 980px) {
	.year .head {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.months,
	.lane {
		grid-template-columns: 96px repeat(12, 1fr);
	}

	.lane .lbl {
		padding-left: 12px;
		font-size: 12px;
	}

	.today {
		left: calc(96px + (100% - 96px) * var(--t, 0));
	}

	.year.sweep .today {
		left: calc(96px + (100% - 96px) * var(--t, 0));
	}

	.year:not(.sweep) .today {
		left: 96px;
	}

	.m .tip {
		max-width: 170px;
	}
}

@media (max-width: 720px) {
	.year,
	.compliance-section {
		padding: 52px 0;
	}

	.year .ctas .actions,
	.compliance-section .ctas .actions {
		display: flex;
		flex-direction: column;
		gap: 12px;
		align-items: flex-start;
	}

	.cal {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.cal-in {
		min-width: 640px;
	}

	.today::after {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.today {
		transition: none !important;
	}
}