/* Top bar and sticky header (received design 2026-11-06). */
.snu-art-topbar {
	border-bottom: 1px solid var(--snu-art-line);
	font-size: 14px;
}

.snu-art-topbar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.snu-art-topbar__today,
.snu-art-topbar__links {
	display: flex;
	align-items: center;
	gap: 10px;
}

.snu-art-topbar__links {
	gap: 20px;
}

.snu-art-topbar__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--snu-art-muted);
}

.snu-art-topbar__dot.is-open {
	background: var(--snu-art-open);
}

.snu-art-topbar__state {
	font-weight: 600;
}

.snu-art-topbar__summary {
	font-family: var(--snu-art-mono);
	color: var(--snu-art-muted);
}

.snu-art-topbar__menu,
.snu-art-topbar__langs {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-weight: 600;
}

.snu-art-topbar__langs {
	gap: 8px;
	font-family: var(--snu-art-mono);
	font-weight: 500;
}

.snu-art-topbar__langs li + li::before {
	content: "/";
	margin-right: 8px;
}

.snu-art-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--snu-art-bg);
	border-bottom: 1px solid var(--snu-art-line);
}

.admin-bar .snu-art-header {
	top: 32px;
}

.snu-art-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
	gap: 24px;
	padding-top: 18px;
	padding-bottom: 18px;
}

.snu-art-header__logo {
	display: block;
	flex: none;
	color: var(--snu-art-fg);
}

.snu-art-logo {
	display: block;
	width: auto;
	height: 48px;
}

.snu-art-logo-text {
	height: auto;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.03em;
}

.snu-art-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.snu-art-header__menu {
	display: flex;
	justify-content: center;
	gap: clamp(20px, 2vw, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
	white-space: nowrap;
	font-size: 20px;
	font-weight: 650;
	letter-spacing: -.03em;
}

.snu-art-header__menu > li {
	position: relative;
	padding: 14px 0;
}

.snu-art-header__menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: -20px;
	z-index: 2;
	min-width: 210px;
	margin: 0;
	padding: 16px 20px;
	list-style: none;
	background: var(--snu-art-bg);
	border: 1px solid var(--snu-art-line);
	box-shadow: 0 10px 20px #0001;
	font-size: 16px;
	line-height: 2.1;
}

/* Current section: red with underline (design sub pages). */
.snu-art-header__menu > li.current-menu-item > a,
.snu-art-header__menu > li.current-menu-ancestor > a,
.snu-art-header__menu > li.current-menu-parent > a,
.snu-art-header__menu > li.snu-art-current > a {
	color: var(--snu-art-accent);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 10px;
}

.snu-art-header__menu > li:hover > .sub-menu,
.snu-art-header__menu > li:focus-within > .sub-menu {
	display: flex;
	flex-direction: column;
}

.snu-art-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 1 auto;
	min-width: 0;
}

.snu-art-header__actions > * {
	flex: none;
}

/* A long placeholder must not push the menu button off narrow screens. */
.snu-art-header__actions > .snu-art-placeholder {
	flex: 0 1 auto;
	min-width: 0;
}

.snu-art-header__search-toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 14px;
	cursor: pointer;
}

.snu-art-header__search-toggle svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.snu-art-header__search-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.snu-art-header__menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.snu-art-header__hamburger {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 24px;
}

.snu-art-header__hamburger i {
	display: block;
	width: 100%;
	height: 2px;
	background: currentColor;
	transition: transform .2s, opacity .2s;
}

.snu-art-header__menu-toggle[aria-expanded="true"] .snu-art-header__hamburger i:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.snu-art-header__menu-toggle[aria-expanded="true"] .snu-art-header__hamburger i:nth-child(2) {
	opacity: 0;
}

.snu-art-header__menu-toggle[aria-expanded="true"] .snu-art-header__hamburger i:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.snu-art-header__search {
	position: absolute;
	top: 100%;
	left: var(--snu-art-gutter);
	right: var(--snu-art-gutter);
	padding: 28px 24px 24px;
	background: var(--snu-art-bg);
	border: 1px solid var(--snu-art-line);
	box-shadow: 0 10px 20px #0001;
}

.snu-art-header__search[hidden] {
	display: none;
}

.snu-art-header__search label {
	display: block;
	margin-bottom: 16px;
	font-weight: 700;
}

.snu-art-header__search-row {
	display: flex;
	gap: 10px;
}

.snu-art-header__search input {
	flex: 1;
	min-width: 0;
	padding: 12px;
	border: 1px solid #767676;
	border-radius: 0;
	background: #fff;
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
	/* The parent theme animates inputs; the design shows the red focus outline at once. */
	transition: none;
}

.snu-art-header__search button {
	padding: 10px 16px;
	border: 1px solid var(--snu-art-line);
	background: var(--snu-art-fg);
	color: #fff;
	cursor: pointer;
}

@media (max-width: 1120px) {
	.snu-art-logo {
		height: 54px;
	}

	.snu-art-header__inner {
		padding-top: 16px;
		padding-bottom: 16px;
	}

	.snu-art-header__menu-toggle {
		display: flex;
	}

	/* Without the script the menu stays visible below the header. */
	.snu-art-js .snu-art-header__nav {
		display: none;
	}

	.snu-art-header__nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: calc(100dvh - 110px);
		overflow: auto;
		padding: 16px var(--snu-art-gutter) 24px;
		background: var(--snu-art-bg);
		border-bottom: 1px solid var(--snu-art-line);
	}

	.snu-art-js .snu-art-header__nav.is-open {
		display: block;
	}

	.snu-art-header__menu {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px 24px;
		white-space: normal;
	}

	.snu-art-header__menu > li {
		padding: 12px 0;
		border-top: 1px solid var(--snu-art-line-soft);
	}

	.snu-art-header__menu > li.current-menu-item > a,
	.snu-art-header__menu > li.current-menu-ancestor > a,
	.snu-art-header__menu > li.current-menu-parent > a,
	.snu-art-header__menu > li.snu-art-current > a {
		text-decoration: none;
	}

	.snu-art-header__menu .sub-menu {
		position: static;
		display: flex;
		flex-direction: column;
		min-width: 0;
		padding: 10px 0 0;
		border: 0;
		box-shadow: none;
	}
}

@media (max-width: 700px) {
	.snu-art-topbar__inner {
		gap: 10px;
	}

	.snu-art-topbar__today {
		justify-content: center;
		width: 100%;
		padding: 9px 8px;
		border-radius: 8px;
		background: #e8e9e3;
		color: #30372f;
	}

	.snu-art-topbar__links {
		justify-content: flex-end;
		width: 100%;
		gap: 18px;
	}

	.snu-art-header__inner {
		gap: 12px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.snu-art-logo {
		height: 32px;
	}

	.snu-art-header__nav {
		max-height: calc(100dvh - 155px);
		padding: 12px var(--snu-art-gutter) 20px;
	}

	.snu-art-header__menu {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		font-size: 18px;
	}

	.snu-art-header__menu .sub-menu {
		font-size: 14px;
		line-height: 2.25;
	}

	.snu-art-header__search {
		left: 12px;
		right: 12px;
		padding: 20px 16px 16px;
	}

	.snu-art-header__search-row {
		flex-wrap: wrap;
	}

	.snu-art-header__search input {
		flex-basis: 100%;
	}
}

@media (max-width: 782px) {
	.admin-bar .snu-art-header {
		top: 0;
	}
}
