/**
 * KWC Bulletin — frontend layout.
 *
 * Three-column document layout (left nav / center content / right TOC), with a
 * print mode for the current section. All colors are exposed as custom
 * properties so the brand palette can be overridden from the theme or the
 * plugin settings page without touching this file.
 *
 * Brand tokens default to KWC's palette and typefaces.
 */

.kwc-bulletin {
	/* Brand palette (KWC). Override at :root or .kwc-bulletin to retheme. */
	--kwc-purple: #392082;
	--kwc-purple-dark: #240D67;
	--kwc-purple-web: #4B2AAB;
	--kwc-teal: #66ECDF;
	--kwc-orange: #FF8D00;
	--kwc-yellow: #FFC72C;

	--kwc-ink: #23262f;
	--kwc-ink-soft: #565b69;
	--kwc-line: #dcdce4;
	--kwc-line-strong: #c7c7d2;
	--kwc-bg-soft: #f4f4f7;
	--kwc-bg-active: #f0eef8;

	--kwc-font-head: "Be Vietnam Pro", system-ui, sans-serif;
	--kwc-font-body: "Roboto", system-ui, sans-serif;

	--kwc-radius: 3px;
	--kwc-gap: 3rem;
	--kwc-nav-w: 17rem;
	--kwc-toc-w: 15rem;

	font-family: var(--kwc-font-body);
	color: var(--kwc-ink);
	/* Full width to match the shortcode embed; the host page or theme
	   container provides any outer constraint. */
	max-width: none;
	margin: 0 auto;
	padding: 1.5rem 2rem;
}

/* ---------- Breadcrumb ---------- */

.kwc-bulletin__crumbs {
	font-size: 1rem;
	color: var(--kwc-ink-soft);
	margin-bottom: 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}
.kwc-bulletin__crumbs a {
	color: var(--kwc-purple-web);
	text-decoration: none;
}
.kwc-bulletin__crumbs a:hover { text-decoration: underline; }
.kwc-bulletin__crumbs .sep { color: #b9bccb; }

/* ---------- Grid ---------- */

.kwc-bulletin__grid {
	display: grid;
	grid-template-columns: var(--kwc-nav-w) minmax(0, 1fr) var(--kwc-toc-w);
	gap: var(--kwc-gap);
	align-items: start;
}
.kwc-bulletin__grid.is-no-toc {
	grid-template-columns: var(--kwc-nav-w) minmax(0, 1fr);
}
.kwc-bulletin__grid.is-no-nav {
	grid-template-columns: minmax(0, 1fr) var(--kwc-toc-w);
}

/* ---------- Left navigation ---------- */

.kwc-bulletin__nav {
	position: sticky;
	top: 1.5rem;
	font-family: var(--kwc-font-head);
	font-size: 1rem;
	max-height: calc(100vh - 3rem);
	overflow-y: auto;
	border-right: 1px solid var(--kwc-line);
	padding-right: 1.5rem;
}
.kwc-bulletin__nav ul { list-style: none; margin: 0; padding: 0; }

/* Breathing room between sections at every level: any section-level item
   (expandable group or standalone landing link) gets clear space from the
   previous section's divider line. Child page links inside an open group are
   excluded so they keep their tighter rhythm. */
.kwc-bulletin__nav li + .kwc-bulletin__nav-group { margin-top: 0.9rem; }
.kwc-bulletin__nav .kwc-bulletin__nav-group + li,
.kwc-bulletin__nav li:has(> .kwc-bulletin__nav-top) + li:has(> .kwc-bulletin__nav-top) { margin-top: 0.9rem; }

.kwc-bulletin__nav-group > button {
	all: unset;
	box-sizing: border-box;
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	cursor: pointer;
	font-weight: 600;
	color: var(--kwc-ink);
	padding: 0.8rem 0.5rem 0.7rem 0.9rem;
	line-height: 1.35;
	border-bottom: 1px solid var(--kwc-line);
}
.kwc-bulletin__nav-group > button:hover { color: var(--kwc-purple); }
.kwc-bulletin__nav-group > button .chev {
	transition: transform 0.18s ease;
	flex: 0 0 auto;
	margin-left: 0.5rem;
	color: var(--kwc-ink-soft);
}
.kwc-bulletin__nav-group[data-open="true"] > button .chev { transform: rotate(180deg); }

.kwc-bulletin__nav .kwc-bulletin__nav-children {
	overflow: hidden;
	margin: 0.5rem 0 1rem 0.4rem;
	padding: 0;
	border-left: 0;
}
.kwc-bulletin__nav-group[data-open="false"] > .kwc-bulletin__nav-children { display: none; }

/* Each child link carries its own segment of the track line, so the indent
   cannot be cancelled by list resets and the current-item marker replaces the
   gray line exactly in place. */
.kwc-bulletin__nav .kwc-bulletin__nav-link {
	display: block;
	padding: 0.5rem 0.6rem 0.5rem 1.1rem;
	margin: 0;
	color: var(--kwc-ink-soft);
	text-decoration: none;
	font-weight: 400;
	line-height: 1.4;
	border-left: 2px solid var(--kwc-line);
}
.kwc-bulletin__nav-link:hover { color: var(--kwc-purple); }
.kwc-bulletin__nav .kwc-bulletin__nav-link.is-current {
	color: var(--kwc-purple);
	font-weight: 600;
	border-left-color: var(--kwc-purple);
}
/* Top-level standalone link (landing-mode category) */
.kwc-bulletin__nav-top {
	display: block;
	padding: 0.8rem 0.5rem 0.7rem 0.9rem;
	font-weight: 600;
	color: var(--kwc-ink);
	text-decoration: none;
	border-bottom: 1px solid var(--kwc-line);
}
.kwc-bulletin__nav-top:hover { color: var(--kwc-purple); }
.kwc-bulletin__nav-top.is-current { color: var(--kwc-purple); }

/* ---------- Center content ---------- */

.kwc-bulletin__main { min-width: 0; }
.kwc-bulletin__title {
	font-family: var(--kwc-font-head);
	font-weight: 700;
	font-size: clamp(1.8rem, 1.1rem + 1.9vw, 2.7rem);
	line-height: 1.12;
	color: var(--kwc-ink);
	margin: 0 0 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid var(--kwc-purple);
}
.kwc-bulletin__content { font-size: 1rem; line-height: 1.72; }
.kwc-bulletin__content h2,
.kwc-bulletin__content h3,
.kwc-bulletin__content h4 {
	font-family: var(--kwc-font-head);
	color: var(--kwc-purple-dark);
	line-height: 1.25;
	scroll-margin-top: 1.5rem;
}
.kwc-bulletin__content h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 2.4rem 0 0.9rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid var(--kwc-line);
}
.kwc-bulletin__content h3 { font-size: 1.2rem; font-weight: 600; margin: 1.9rem 0 0.6rem; }
.kwc-bulletin__content h4 { font-size: 1.05rem; font-weight: 600; margin: 1.4rem 0 0.5rem; }
.kwc-bulletin__content a { color: var(--kwc-purple-web); text-underline-offset: 2px; }
.kwc-bulletin__content table { border-collapse: collapse; width: 100%; margin: 1.2rem 0; }
.kwc-bulletin__content th,
.kwc-bulletin__content td { border: 1px solid var(--kwc-line); padding: 0.5rem 0.7rem; text-align: left; }
.kwc-bulletin__content th { background: var(--kwc-bg-soft); font-family: var(--kwc-font-head); }

/* Anchor offset target for heading links */
.kwc-bulletin__content [id] { scroll-margin-top: 1.5rem; }

/* ---------- Right TOC ---------- */

.kwc-bulletin__toc {
	position: sticky;
	top: 1.5rem;
	font-size: 1rem;
	max-height: calc(100vh - 3rem);
	overflow-y: auto;
	border-left: 1px solid var(--kwc-line);
	padding-left: 1.25rem;
}
.kwc-bulletin__toc-title {
	font-family: var(--kwc-font-head);
	font-weight: 700;
	color: var(--kwc-ink-soft);
	margin: 0 0 0.75rem;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.kwc-bulletin__toc ul { list-style: none; margin: 0; padding: 0; }
.kwc-bulletin__toc li { margin: 0; }
.kwc-bulletin__toc a {
	display: block;
	padding: 0.3rem 0 0.3rem 1rem;
	margin: 0;
	color: var(--kwc-ink-soft);
	text-decoration: none;
	border-left: 2px solid var(--kwc-line);
	line-height: 1.4;
}
.kwc-bulletin__toc a:hover { color: var(--kwc-purple); }
.kwc-bulletin__toc a.is-active {
	color: var(--kwc-purple);
	border-left-color: var(--kwc-purple);
	font-weight: 600;
}
.kwc-bulletin__toc .lvl-3 a { padding-left: 1.9rem; font-size: 1rem; }

/* ---------- Print control ---------- */

.kwc-bulletin__actions {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 1.25rem;
}
.kwc-bulletin__print {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--kwc-font-head);
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--kwc-ink-soft);
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--kwc-line-strong);
	border-radius: var(--kwc-radius);
}
.kwc-bulletin__print:hover { border-color: var(--kwc-purple); color: var(--kwc-purple); }

.kwc-bulletin__grid.is-toc-static .kwc-bulletin__toc,
.kwc-bulletin__grid.is-toc-static .kwc-bulletin__nav {
	position: static;
	max-height: none;
}

.kwc-bulletin__reading,
.kwc-bulletin__updated {
	font-size: 0.82rem;
	color: var(--kwc-ink-soft);
	margin: -0.5rem 0 1.25rem;
	font-family: var(--kwc-font-head);
	letter-spacing: 0.02em;
}

/* ---------- Copy-link buttons on headings ---------- */

.kwc-copylink {
	all: unset;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.7rem;
	height: 1.7rem;
	margin-left: 0.45rem;
	border-radius: 5px;
	color: var(--kwc-ink-soft);
	opacity: 0;
	transition: opacity 0.12s ease;
	vertical-align: middle;
}
.kwc-bulletin__title:hover .kwc-copylink,
.kwc-bulletin__content h2:hover .kwc-copylink,
.kwc-bulletin__content h3:hover .kwc-copylink,
.kwc-copylink:focus-visible {
	opacity: 1;
}
.kwc-copylink:hover { color: var(--kwc-purple); background: var(--kwc-bg-soft); }
.kwc-copylink.is-copied { color: #1a7f37; opacity: 1; }

/* ---------- Container index (section landing) ---------- */

.kwc-bulletin__index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--kwc-line); }
.kwc-bulletin__index-item {
	padding: 0.95rem 0.25rem;
	border-bottom: 1px solid var(--kwc-line);
	transition: padding-left 0.12s ease;
}
.kwc-bulletin__index-item:hover { padding-left: 0.75rem; }
.kwc-bulletin__index-item a {
	font-family: var(--kwc-font-head);
	font-weight: 600;
	font-size: 1rem;
	color: var(--kwc-purple);
	text-decoration: none;
}
.kwc-bulletin__index-item a:hover { color: var(--kwc-purple-dark); }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.kwc-bulletin__grid,
	.kwc-bulletin__grid.is-no-toc,
	.kwc-bulletin__grid.is-no-nav {
		grid-template-columns: 1fr;
	}
	.kwc-bulletin__nav,
	.kwc-bulletin__toc {
		position: static;
		max-height: none;
		border-right: 0;
		border-left: 0;
		padding-right: 0;
		padding-left: 0;
	}
	.kwc-bulletin__nav {
		border-bottom: 1px solid var(--kwc-line);
		padding-bottom: 1rem;
		margin-bottom: 1.5rem;
	}
	.kwc-bulletin__toc {
		border-top: 1px solid var(--kwc-line);
		margin-top: 2rem;
		padding-top: 1rem;
	}
	.kwc-bulletin__toc a { margin-left: 0; }
	.kwc-bulletin__nav-link { margin-left: 0; }
}

/* ---------- Print ---------- */

@media print {
	.kwc-bulletin__nav,
	.kwc-bulletin__toc,
	.kwc-bulletin__actions,
	.kwc-copylink,
	.kwc-bulletin__crumbs { display: none !important; }
	.kwc-bulletin__grid { display: block; }
	.kwc-bulletin { max-width: none; padding: 0; }
	.kwc-bulletin__content { font-size: 11pt; }
	.kwc-bulletin__content h2,
	.kwc-bulletin__content h3 { color: #000; }
}

/* ---------- Edition search ---------- */

.kwc-bulletin__search { position: relative; margin: 0 0 1rem; }
.kwc-bulletin__search-input {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid var(--kwc-line-strong);
	border-radius: var(--kwc-radius);
	padding: 0.5rem 0.75rem;
	font-family: var(--kwc-font-body);
	font-size: 0.95rem;
	background: #fff;
	color: var(--kwc-ink);
}
.kwc-bulletin__search-input:focus {
	border-color: var(--kwc-purple);
	outline: none;
	box-shadow: 0 0 0 1px var(--kwc-purple);
}
.kwc-bulletin__search-results {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--kwc-line-strong);
	border-radius: var(--kwc-radius);
	box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
	max-height: 20rem;
	overflow-y: auto;
	z-index: 50;
}
.kwc-bulletin__search-item {
	display: block;
	padding: 0.55rem 0.8rem;
	text-decoration: none;
	border-bottom: 1px solid var(--kwc-line);
}
.kwc-bulletin__search-item:last-child { border-bottom: 0; }
.kwc-bulletin__search-item:hover { background: var(--kwc-bg-soft); }
.kwc-bulletin__search-title {
	display: block;
	color: var(--kwc-ink);
	font-weight: 600;
	font-family: var(--kwc-font-head);
	font-size: 0.92rem;
}
.kwc-bulletin__search-cat {
	display: block;
	color: var(--kwc-ink-soft);
	font-size: 0.78rem;
	margin-top: 0.1rem;
}
.kwc-bulletin__search-empty {
	padding: 0.6rem 0.8rem;
	color: var(--kwc-ink-soft);
	font-style: italic;
	font-size: 0.9rem;
}

/* ---------- Previous / Next ---------- */

.kwc-bulletin__pn {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--kwc-line);
}
.kwc-bulletin__pn-link {
	display: block;
	max-width: 46%;
	text-decoration: none;
	padding: 0.6rem 0.8rem;
	border: 1px solid var(--kwc-line);
	border-radius: var(--kwc-radius);
}
.kwc-bulletin__pn-link:hover { border-color: var(--kwc-purple); }
.kwc-bulletin__pn-link--next { text-align: right; margin-left: auto; }
.kwc-bulletin__pn-label {
	display: block;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--kwc-ink-soft);
	font-family: var(--kwc-font-head);
}
.kwc-bulletin__pn-title {
	display: block;
	margin-top: 0.15rem;
	font-weight: 600;
	color: var(--kwc-purple);
	font-family: var(--kwc-font-head);
	font-size: 0.95rem;
}
.kwc-bulletin__pn-spacer { flex: 0 0 1px; }

/* ---------- Anchor arrival highlight ---------- */

@keyframes kwc-anchor-flash {
	0%   { background-color: rgba(102, 236, 223, 0.45); }
	100% { background-color: transparent; }
}
.kwc-anchor-flash {
	animation: kwc-anchor-flash 2s ease-out 1;
	border-radius: 3px;
}

/* ---------- Mobile nav toggle ---------- */

.kwc-bulletin__nav-toggle {
	all: unset;
	box-sizing: border-box;
	display: none;
	width: 100%;
	cursor: pointer;
	font-family: var(--kwc-font-head);
	font-weight: 600;
	color: var(--kwc-ink);
	padding: 0.65rem 0.9rem;
	border: 1px solid var(--kwc-line-strong);
	border-radius: var(--kwc-radius);
	justify-content: space-between;
	align-items: center;
}
.kwc-bulletin__nav-toggle .chev { color: var(--kwc-ink-soft); transition: transform 0.18s ease; }
.kwc-bulletin__nav.is-open .kwc-bulletin__nav-toggle .chev { transform: rotate(180deg); }

@media (max-width: 1024px) {
	.kwc-bulletin__nav-toggle { display: flex; }
	.kwc-bulletin__nav .kwc-bulletin__nav-inner { display: none; margin-top: 0.9rem; }
	.kwc-bulletin__nav.is-open .kwc-bulletin__nav-inner { display: block; }
	.kwc-bulletin__pn-link { max-width: 100%; }
}

/* ---------- [kwc_bulletin] embed ---------- */

.kwc-bulletin--embed { max-width: 100%; padding: 0; }
.kwc-bulletin--embed .kwc-bulletin__title { margin-top: 0; }
.kwc-bulletin--embed .kwc-bulletin__title a {
	color: inherit;
	text-decoration: none;
}
.kwc-bulletin--embed .kwc-bulletin__title a:hover { color: var(--kwc-purple); }
.kwc-bulletin__embed-division {
	font-family: var(--kwc-font-head);
	font-size: 1.15rem;
	margin: 1.75rem 0 0.5rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid var(--kwc-line);
}
.kwc-bulletin__embed-division a { color: var(--kwc-ink); text-decoration: none; }
.kwc-bulletin__embed-division a:hover { color: var(--kwc-purple); }

/* ---------- Responsive tables ---------- */

.kwc-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1rem 0;
}
.kwc-table-scroll > table { margin: 0; min-width: 100%; }
.kwc-table-scroll:focus-visible {
	outline: 2px solid var(--kwc-purple);
	outline-offset: 2px;
}

/* ---------- Accessibility ---------- */

.kwc-visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.kwc-bulletin a:focus-visible,
.kwc-bulletin button:focus-visible,
.kwc-bulletin input:focus-visible,
.kwc-bulletin select:focus-visible {
	outline: 2px solid var(--kwc-purple);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.kwc-anchor-flash { animation: none; }
	.kwc-bulletin .chev,
	.kwc-qe, .kwc-qe-overlay { transition: none; }
}

/* ------------------------------------------------------------------ *
 * Catalog tables: year bands & semester header rows (v0.25.0)
 *
 * Sample-plan tables carry year labels as single-th full-width rows and
 * semester labels as multi-th rows; :only-child cleanly separates the two.
 * Regular thead cells get the same brand band for consistency.
 * ------------------------------------------------------------------ */
.kwc-bulletin__content thead th,
.kwc-bulletin__content tbody tr > th:only-child {
	background: #392082;
	color: #fff;
	text-align: left;
	padding: 0.55rem 0.75rem;
	font-family: "Be Vietnam Pro", sans-serif;
	font-weight: 600;
	border: 1px solid #392082;
}
.kwc-bulletin__content tbody tr > th:not(:only-child) {
	background: #eeebf7;
	color: #392082;
	text-align: left;
	padding: 0.45rem 0.75rem;
	font-weight: 600;
	border: 1px solid #d9d3ee;
}

/* Credit-hour subtitles: the <em>-only paragraph directly after a heading. */
.kwc-bulletin__content h2 + p > em:only-child,
.kwc-bulletin__content h3 + p > em:only-child,
.kwc-bulletin__content h4 + p > em:only-child {
	display: inline-block;
	color: #5a5566;
	font-size: 0.95rem;
	font-style: italic;
	margin-top: -0.15rem;
}

/* ------------------------------------------------------------------ *
 * Topbar: breadcrumbs + edition switcher share one row.
 * ------------------------------------------------------------------ */
.kwc-bulletin__topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}
.kwc-bulletin__topbar .kwc-bulletin__crumbs {
	flex: 1 1 auto;
	min-width: 0;
}

.kwc-bulletin__edition-switch {
	position: relative;
	flex: 0 0 auto;
	font-size: 0.9rem;
}
.kwc-bulletin__edition-switch summary {
	list-style: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.3rem 0.65rem;
	border: 1px solid #d9d3ee;
	border-radius: 4px;
	background: #fff;
	color: #392082;
}
.kwc-bulletin__edition-switch summary::-webkit-details-marker { display: none; }
.kwc-bulletin__edition-switch summary .chev svg { width: 12px; height: 12px; }
.kwc-bulletin__edition-switch[open] summary .chev { transform: rotate(180deg); }
.kwc-bulletin__edition-switch ul {
	position: absolute;
	right: 0;
	z-index: 40;
	margin: 0.25rem 0 0;
	padding: 0.25rem;
	list-style: none;
	min-width: 12rem;
	background: #fff;
	border: 1px solid #d9d3ee;
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(36, 13, 103, 0.14);
}
.kwc-bulletin__edition-switch ul a {
	display: block;
	padding: 0.4rem 0.6rem;
	border-radius: 3px;
	text-decoration: none;
	color: #240d67;
}
.kwc-bulletin__edition-switch ul a:hover,
.kwc-bulletin__edition-switch ul a:focus-visible {
	background: #eeebf7;
}

@media print {
	.kwc-bulletin__edition-switch { display: none !important; }
}

/* ------------------------------------------------------------------ *
 * In-bulletin 404
 * ------------------------------------------------------------------ */
.kwc-bulletin__nf {
	max-width: 40rem;
	padding: 1.25rem 1.5rem;
	border-left: 4px solid #ffc72c;
	background: #faf9fd;
}
.kwc-bulletin__nf-home {
	display: inline-block;
	margin-top: 0.25rem;
	font-weight: 600;
	color: #392082;
}

/* v0.27.0: collapsible "On this page" on mobile; TOC above content */
.kwc-bulletin__toc-toggle { display: none; }
@media (max-width: 1024px) {
	.kwc-bulletin__nav { order: -2; }
	.kwc-bulletin__toc { order: -1; margin-top: 0; padding-top: 0; border-top: 0; border-bottom: 1px solid var(--kwc-line); padding-bottom: 0.75rem; margin-bottom: 1.25rem; }
	.kwc-bulletin__toc-toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 0.5rem 0;
		border: 0;
		background: none;
		font: 600 1rem "Be Vietnam Pro", sans-serif;
		color: #392082;
		cursor: pointer;
	}
	.kwc-bulletin__toc-toggle .chev { transition: transform 0.15s ease; }
	.kwc-bulletin__toc.is-open .kwc-bulletin__toc-toggle .chev { transform: rotate(180deg); }
	.kwc-bulletin__toc-title { display: none; }
	.kwc-bulletin__toc > ul { display: none; }
	.kwc-bulletin__toc.is-open > ul { display: block; }
}
@media print {
	.kwc-bulletin__toc-toggle { display: none !important; }
}

/* ------------------------------------------------------------------ *
 * Shortcode embed index (v0.27.4)
 *
 * [kwc_bulletin] renders on ordinary site pages, so these rules reset the
 * theme's list styling and present the categories as a responsive tile
 * grid. Scoped to the embed wrapper; the full bulletin app is untouched.
 * ------------------------------------------------------------------ */
.kwc-bulletin--embed .kwc-bulletin__index {
	list-style: none;
	margin: 1.25rem 0 1.75rem;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 0.75rem;
}
.kwc-bulletin--embed .kwc-bulletin__index-item {
	margin: 0;
	padding: 0;
	border: 0;
}
.kwc-bulletin--embed .kwc-bulletin__index-item a {
	display: block;
	padding: 0.85rem 1rem;
	background: #fff;
	border: 1px solid #e3e0ef;
	border-left: 3px solid #392082;
	border-radius: 8px;
	font-family: "Be Vietnam Pro", sans-serif;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.35;
	color: #392082;
	text-decoration: none;
	transition: border-color 0.12s ease, background-color 0.12s ease;
}
.kwc-bulletin--embed .kwc-bulletin__index-item a:hover,
.kwc-bulletin--embed .kwc-bulletin__index-item a:focus-visible {
	background: #faf9fd;
	border-color: #392082;
	border-left-color: #66ECDF;
	color: #240d67;
}
.kwc-bulletin--embed .kwc-bulletin__index-item--link a::after {
	content: " \2197";
	font-size: 0.85em;
	color: #7a739b;
}
.kwc-bulletin--embed .kwc-bulletin__embed-division {
	margin: 1.75rem 0 0.25rem;
	font-family: "Be Vietnam Pro", sans-serif;
	color: #240d67;
}
.kwc-bulletin--embed .kwc-bulletin__embed-division a {
	color: inherit;
	text-decoration: none;
}
.kwc-bulletin--embed .kwc-bulletin__embed-division a:hover { text-decoration: underline; }
.kwc-bulletin--embed h2.kwc-bulletin__title a {
	color: #240d67;
	text-decoration: none;
}

/* Defense against theme-injected list markers inside the embed grid */
.kwc-bulletin--embed .kwc-bulletin__index-item::before { content: none !important; display: none !important; }
.kwc-bulletin--embed .kwc-bulletin__index-item::marker { content: none; }
.kwc-bulletin--embed .kwc-bulletin__index-item:hover { padding-left: 0; }

/* v0.29.1: category names link to their page; a separate chevron expands */
.kwc-bulletin__nav-grouprow {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}
.kwc-bulletin__nav-grouprow .kwc-bulletin__nav-top {
	flex: 1 1 auto;
	min-width: 0;
}
.kwc-bulletin__nav-expander {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	background: none;
	color: #392082;
	cursor: pointer;
	border-radius: 4px;
}
.kwc-bulletin__nav-expander:hover,
.kwc-bulletin__nav-expander:focus-visible {
	background: #eeebf7;
}
.kwc-bulletin__nav-expander .chev {
	display: inline-flex;
	transition: transform 0.15s ease;
}
.kwc-bulletin__nav-group[data-open="true"] > .kwc-bulletin__nav-grouprow .kwc-bulletin__nav-expander .chev {
	transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
	.kwc-bulletin__nav-expander .chev { transition: none; }
}

/* Full bulletin embedded via shortcode on a theme page */
.kwc-bulletin-shortcode-full .kwc-bulletin {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

/* ------------------------------------------------------------------ *
 * Embed hardening (v0.29.2)
 *
 * On the bulletin's own routes the plugin controls the page, but the
 * shortcode renders inside the host theme's content wrapper, where rules
 * like ".entry-content ul li" outrank component selectors. These rules
 * re-assert the bulletin's chrome (nav, TOC, index) against any theme;
 * article content inside the embed keeps normal list bullets.
 * ------------------------------------------------------------------ */
.kwc-bulletin-shortcode-full .kwc-bulletin,
.kwc-bulletin-shortcode-full .kwc-bulletin * {
	box-sizing: border-box;
}
.kwc-bulletin-shortcode-full .kwc-bulletin {
	font-family: var(--kwc-font-body) !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin h1,
.kwc-bulletin-shortcode-full .kwc-bulletin h2,
.kwc-bulletin-shortcode-full .kwc-bulletin h3,
.kwc-bulletin-shortcode-full .kwc-bulletin h4,
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-top,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc-title {
	font-family: var(--kwc-font-head) !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav ul,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc ul,
.kwc-bulletin-shortcode-full ul.kwc-bulletin__index {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav li,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc li,
.kwc-bulletin-shortcode-full .kwc-bulletin__index-item {
	margin: 0 !important;
	padding-left: 0 !important;
	list-style: none !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav li::before,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc li::before,
.kwc-bulletin-shortcode-full .kwc-bulletin__index-item::before {
	content: none !important;
	display: none !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav li::marker,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc li::marker,
.kwc-bulletin-shortcode-full .kwc-bulletin__index-item::marker {
	content: none;
}
/* Re-assert the section spacing that the margin reset above flattens */
.kwc-bulletin-shortcode-full .kwc-bulletin__nav li + .kwc-bulletin__nav-group,
.kwc-bulletin-shortcode-full .kwc-bulletin__nav .kwc-bulletin__nav-group + li {
	margin-top: 0.9rem !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav a,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc a {
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}
/* Article content inside the embed keeps honest list styling */
.kwc-bulletin-shortcode-full .kwc-bulletin__content ul {
	list-style: disc;
	margin: 0.5em 0 1em;
	padding-left: 1.5em;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content ol {
	list-style: decimal;
	margin: 0.5em 0 1em;
	padding-left: 1.5em;
}

/* ------------------------------------------------------------------ *
 * Embed hardening, round two (v0.30.1)
 *
 * Round one protected fonts and list markers; theme content rules were
 * still winning on sizes, weights, margins, and colors. This mirrors the
 * bulletin's own typographic spec into the embed scope with !important so
 * the shortcode renders pixel-identical to the bulletin's native pages
 * regardless of host-theme rules.
 * ------------------------------------------------------------------ */
.kwc-bulletin-shortcode-full .kwc-bulletin {
	font-size: 16px !important;
	line-height: 1.6 !important;
	color: var(--kwc-ink) !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__title {
	font-family: var(--kwc-font-head) !important;
	font-weight: 700 !important;
	font-size: clamp(1.8rem, 1.1rem + 1.9vw, 2.7rem) !important;
	line-height: 1.12 !important;
	color: var(--kwc-ink) !important;
	margin: 0 0 1.25rem !important;
	padding: 0 0 1rem !important;
	border: 0 !important;
	border-bottom: 2px solid var(--kwc-purple) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content {
	font-size: 1rem !important;
	line-height: 1.72 !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content p {
	font-size: inherit !important;
	line-height: inherit !important;
	margin: 0 0 1em !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content h2 {
	font-family: var(--kwc-font-head) !important;
	color: var(--kwc-purple-dark) !important;
	font-size: 1.5rem !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	margin: 2.4rem 0 0.9rem !important;
	padding: 0 0 0.4rem !important;
	border: 0 !important;
	border-bottom: 1px solid var(--kwc-line) !important;
	text-transform: none !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content h3 {
	font-family: var(--kwc-font-head) !important;
	color: var(--kwc-purple-dark) !important;
	font-size: 1.2rem !important;
	font-weight: 600 !important;
	margin: 1.9rem 0 0.6rem !important;
	text-transform: none !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content h4 {
	font-family: var(--kwc-font-head) !important;
	color: var(--kwc-purple-dark) !important;
	font-size: 1.05rem !important;
	font-weight: 600 !important;
	margin: 1.4rem 0 0.5rem !important;
	text-transform: none !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content a {
	color: var(--kwc-purple-web) !important;
	text-decoration: underline !important;
	text-underline-offset: 2px !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
	font-weight: inherit !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc {
	font-size: 1rem !important;
	line-height: 1.5 !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav a,
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-top,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc a {
	color: var(--kwc-ink) !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav a:hover,
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-top:hover,
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-top.is-current,
.kwc-bulletin-shortcode-full .kwc-bulletin__toc a:hover {
	color: var(--kwc-purple) !important;
}
.kwc-bulletin-shortcode-full ul.kwc-bulletin__index a {
	color: var(--kwc-purple-web) !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	font-size: 1rem !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__content th,
.kwc-bulletin-shortcode-full .kwc-bulletin__content td {
	font-size: inherit !important;
	border: 1px solid var(--kwc-line) !important;
	padding: 0.5rem 0.7rem !important;
}

/* v0.30.2: embed index separators (host themes strip li borders) and
 * 1rem breadcrumbs everywhere. */
.kwc-bulletin-shortcode-full ul.kwc-bulletin__index {
	border-top: 1px solid var(--kwc-line) !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__index-item {
	padding: 0.95rem 0.25rem !important;
	border-bottom: 1px solid var(--kwc-line) !important;
	transition: padding-left 0.12s ease;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__index-item:hover {
	padding-left: 0.75rem !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__crumbs,
.kwc-bulletin-shortcode-full .kwc-bulletin__crumbs a {
	font-size: 1rem !important;
}

/* v0.31.0/0.32.0: page sections nested in the left navigation */
.kwc-bulletin__nav-pagerow {
	display: flex;
	align-items: center;
	gap: 0.2rem;
}
.kwc-bulletin__nav-pagerow .kwc-bulletin__nav-link { flex: 1 1 auto; min-width: 0; }
.kwc-bulletin__nav-pagetoggle {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem;
	height: 1.6rem;
	padding: 0;
	border: 0;
	background: none;
	color: #6c6685;
	cursor: pointer;
	border-radius: 4px;
}
.kwc-bulletin__nav-pagetoggle:hover,
.kwc-bulletin__nav-pagetoggle:focus-visible { background: #eeebf7; color: var(--kwc-purple); }
.kwc-bulletin__nav-pagetoggle .chev { display: inline-flex; transition: transform 0.15s ease; }
.kwc-bulletin__nav-pagetoggle .chev svg { width: 11px; height: 11px; }
li[data-open="true"] > .kwc-bulletin__nav-pagerow .kwc-bulletin__nav-pagetoggle .chev { transform: rotate(180deg); }
.kwc-bulletin__nav li[data-open="false"] > .kwc-bulletin__nav-pagetoc,
li[data-open="false"] > .kwc-bulletin__nav-pagetoc { display: none; }
.kwc-bulletin__nav ul.kwc-bulletin__nav-pagetoc,
.kwc-bulletin__nav-pagetoc {
	list-style: none;
	margin: 0.2rem 0 0.5rem 1.4rem;
	padding: 0.1rem 0 0.1rem 0.9rem;
	border-left: 2px solid var(--kwc-line);
}
.kwc-bulletin__nav .kwc-bulletin__nav-pagetoc li { margin: 0; padding: 0; }
.kwc-bulletin__nav .kwc-bulletin__nav-pagetoc a,
.kwc-bulletin__nav-pagetoc a {
	display: block;
	padding: 0.22rem 0;
	font-size: 1rem;
	font-weight: 400;
	color: var(--kwc-ink);
	text-decoration: none;
}
.kwc-bulletin__nav-pagetoc a:hover { color: var(--kwc-purple); }
/* Embed mirror */
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-pagetoc { list-style: none !important; margin: 0.15rem 0 0.35rem !important; padding: 0 0 0 0.9rem !important; border-left: 2px solid var(--kwc-line) !important; }
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-pagetoc li { margin: 0 !important; padding-left: 0 !important; border: 0 !important; }
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-pagetoc li::before { content: none !important; }
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-pagetoc a { font-weight: 400 !important; }

/* v0.32.0: search excerpts (dropdown) and the results page */
.kwc-bulletin__search-excerpt {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #5a5566;
}
.kwc-bulletin__search mark,
.kwc-bulletin__sr mark {
	background: #fff1c9;
	color: inherit;
	padding: 0 1px;
	border-radius: 2px;
}
.kwc-bulletin__search-all {
	display: block;
	padding: 0.55rem 0.75rem;
	font-weight: 600;
	color: var(--kwc-purple);
	text-decoration: none;
	border-top: 1px solid var(--kwc-line);
}
.kwc-bulletin__search-all:hover { background: #faf9fd; }
.kwc-bulletin__sr-count { color: #5a5566; }
.kwc-bulletin__sr-item {
	padding: 1rem 0;
	border-bottom: 1px solid var(--kwc-line);
}
.kwc-bulletin__sr-title {
	font-family: var(--kwc-font-head);
	font-weight: 600;
	font-size: 1.1rem;
	color: var(--kwc-purple-web);
	text-decoration: none;
}
.kwc-bulletin__sr-title:hover { text-decoration: underline; }
.kwc-bulletin__sr-cat {
	display: inline-block;
	margin-left: 0.6rem;
	font-size: 0.85rem;
	color: #6c6685;
}
.kwc-bulletin__sr-excerpt { margin: 0.35rem 0 0; }
/* Embed mirror for the new pieces */
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-pagerow { display: flex !important; }
.kwc-bulletin-shortcode-full li[data-open="false"] > .kwc-bulletin__nav-pagetoc { display: none !important; }
.kwc-bulletin-shortcode-full .kwc-bulletin__nav-pagetoc { margin: 0.2rem 0 0.5rem 1.4rem !important; padding: 0.1rem 0 0.1rem 0.9rem !important; }

/* v0.32.1: attribute-based collapse (works without CSS; enforced with it) */
.kwc-bulletin__nav-pagetoc[hidden] { display: none !important; }

/* Embed: restore top-level nav separators. The anti-theme underline reset
 * (nav a { border-bottom: 0 !important }) also removed the plugin's own
 * separator, which lives on the .kwc-bulletin__nav-top anchor. Higher
 * specificity + later order restores it; other links keep the reset. */
.kwc-bulletin-shortcode-full .kwc-bulletin__nav a.kwc-bulletin__nav-top {
	border-bottom: 1px solid var(--kwc-line) !important;
}

/* Embed: re-assert nav rhythm and indent that the ul/li resets flatten.
 * Native values mirrored exactly: children lists carry the section gap
 * (1rem below) and indent (0.4rem), child links carry their own padding
 * and track line, top rows keep their vertical padding. */
.kwc-bulletin-shortcode-full .kwc-bulletin__nav ul.kwc-bulletin__nav-children {
	margin: 0.5rem 0 1rem 0.4rem !important;
	padding: 0 !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav a.kwc-bulletin__nav-link {
	display: block !important;
	padding: 0.5rem 0.6rem 0.5rem 1.1rem !important;
	margin: 0 !important;
	border-left: 2px solid var(--kwc-line) !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav a.kwc-bulletin__nav-link.is-current {
	border-left-color: var(--kwc-purple) !important;
	font-weight: 600 !important;
}
.kwc-bulletin-shortcode-full .kwc-bulletin__nav a.kwc-bulletin__nav-top {
	display: block !important;
	padding: 0.8rem 0.5rem 0.7rem 0.9rem !important;
	line-height: 1.35 !important;
}
