/* System message: a dismissible bar and a modal that asks to be
   acknowledged. The measurements and the behaviour follow the kit's own
   sample, element for element. */

/* ---------- bar ---------- */

.cu-sys {
	background: var(--navy);
	color: var(--paper-ink);
	transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

/* Navy on a dark background is only 1.1:1, so the edge needs a hairline. */
[data-theme="dark"] .cu-sys {
	box-shadow: inset 0 -1px 0 var(--border-strong);
}



.cu-sys.is-closing {
	opacity: 0;
	transform: translateY(-6px);
}

.cu-sys-in {
	max-width: var(--wide);
	margin: 0 auto;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 0 clamp(8px, calc(5vw - 12px), 52px) 0 clamp(20px, 5vw, 64px);
}

/* Centred on the first line of the text, not on the bar, or a wrapped message
   pushes it out of line. */
.cu-sys-line {
	flex: none;
	display: block;
	width: 26px;
	height: 2px;
	margin-top: calc(11px + var(--fs-c) * .75 - 1px);
	margin-right: 4px;
	background: var(--accent);
}

.cu-sys-txt {
	flex: 1 1 auto;
	min-width: 0;
	padding: 11px 0;
	font-size: var(--fs-c);
	line-height: 1.5;
	font-weight: 400;
	overflow-wrap: break-word;
}

.cu-sys-txt a {
	color: var(--paper-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
	text-decoration-color: rgba(250, 250, 248, .6);
	transition: text-decoration-color var(--dur) var(--ease);
}

.cu-sys-txt a:hover {
	text-decoration-color: var(--paper-ink);
}

.cu-sys-txt a:focus-visible {
	outline: 2px solid var(--paper-ink);
	outline-offset: 3px;
}

.cu-sys-x {
	flex: none;
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: rgba(250, 250, 248, .8);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color var(--dur) var(--ease);
}

.cu-sys-x::after {
	content: "";
	position: absolute;
	inset: 8px;
	border-radius: 50%;
	background: rgba(250, 250, 248, .12);
	opacity: 0;
	transition: opacity var(--dur) var(--ease);
}

.cu-sys-x:hover {
	color: var(--paper-ink);
}

.cu-sys-x:hover::after {
	opacity: 1;
}

.cu-sys-x:focus-visible {
	outline: 2px solid var(--paper-ink);
	outline-offset: -4px;
	color: var(--paper-ink);
}

.cu-sys-x svg {
	position: relative;
	z-index: 1;
}

/* ---------- modal ---------- */

html.cu-sys-lock,
html.cu-sys-lock body {
	overflow: hidden;
}

/* The display below beats the browser's [hidden], and the leftover layer
   swallows every click. */
.cu-sys-ov[hidden] {
	display: none;
}

.cu-sys-ov {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow-y: auto;
	background: rgba(24, 32, 46, .56);
	opacity: 0;
	transition: opacity var(--dur) var(--ease);
}

[data-theme="dark"] .cu-sys-ov {
	background: rgba(0, 0, 0, .66);
}



.cu-sys-ov.is-open {
	opacity: 1;
}

.cu-sys-dlg {
	position: relative;
	width: 100%;
	max-width: 560px;
	margin: auto;
	background: var(--panel);
	color: var(--text);
	border: 1px solid var(--border);
	border-top-right-radius: 72px;
	padding: 44px 44px 40px;
	box-shadow: 0 24px 64px rgba(24, 32, 46, .22);
	transform: translateY(10px);
	transition: transform var(--dur) var(--ease);
}

.cu-sys-ov.is-open .cu-sys-dlg {
	transform: none;
}

/* The panel takes focus so the dialog is read out; it is not a tab stop. */
.cu-sys-dlg:focus {
	outline: none;
}

.cu-sys-rule {
	display: block;
	width: 48px;
	height: 1px;
	background: var(--accent);
	margin-bottom: 22px;
}

.cu-sys-t {
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(26px, 3vw, 32px);
	line-height: 1.15;
	letter-spacing: -.005em;
	color: var(--text);
	padding-right: 24px;
}

.cu-sys-d {
	margin-top: 16px;
	font-size: var(--fs-p);
	line-height: 1.7;
	color: var(--text-soft);
}

.cu-sys-d p + p {
	margin-top: 12px;
}

.cu-sys-l {
	margin-top: 14px;
	font-size: var(--fs-p);
	line-height: 1.7;
}

.cu-sys-l a {
	color: var(--text);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
	text-decoration-color: var(--border-strong);
	transition: text-decoration-color var(--dur) var(--ease);
}

.cu-sys-l a:hover {
	text-decoration-color: currentColor;
}

.cu-sys-l a:focus-visible {
	outline: 2px solid var(--text);
	outline-offset: 3px;
}

.cu-sys-act {
	margin-top: 30px;
}

@media (max-width: 599px) {
	.cu-sys-dlg {
		border-top-right-radius: 48px;
		padding: 32px 24px 26px;
	}

	.cu-sys-act .cu-btn {
		display: flex;
		width: 100%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cu-sys,
	.cu-sys-txt a,
	.cu-sys-x,
	.cu-sys-x::after,
	.cu-sys-ov,
	.cu-sys-dlg,
	.cu-sys-l a {
		transition: none;
	}
}
