/* ============================================================
   MDCD Portal — standalone-feel chrome for the Medicaid HCBS
   Waiver Dataset "portal-within-a-portal" living under
   crr.bc.edu/projects/medicaid-hcbs-waiver-dataset/.

   Scoped via body.mdcd-portal so styles never leak to the main
   CRR site and so the existing CRR theme rules can co-exist
   on a single WP install.

   Color system stays in the CRR family (deep burgundy + sand)
   but pairs with a fresh blue accent that matches the
   existing [mdcd_browser] React app palette (--mdcd-blue).
   ============================================================ */

body.mdcd-portal {
	--mdcdp-burgundy:        #80172b;
	--mdcdp-burgundy-dark:   #5e0f1f;
	--mdcdp-burgundy-tint:   #f4e5e8;
	--mdcdp-sand:            #f4eddc;
	--mdcdp-sand-dark:       #c9b785;
	--mdcdp-ink:             #1f1f1f;
	--mdcdp-muted:           #5b5b5b;
	--mdcdp-rule:            #d9d3c4;
	--mdcdp-bg:              #fbf9f4;
	--mdcdp-card-bg:         #ffffff;
	--mdcdp-blue:            #2c7da0;
	--mdcdp-blue-dark:       #1a5f7a;
	--mdcdp-accent:          #a26d3c;
	--mdcdp-radius:          6px;
	--mdcdp-radius-lg:       10px;
	--mdcdp-shadow-sm:       0 1px 2px rgba(0,0,0,.06);
	--mdcdp-shadow:          0 4px 14px rgba(0,0,0,.08);
	--mdcdp-shadow-lg:       0 12px 32px rgba(0,0,0,.12);
	--mdcdp-font-sans:       "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--mdcdp-font-serif:      "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
	--mdcdp-max-width:       1180px;

	margin: 0;
	padding: 0;
	background: var(--mdcdp-bg);
	color: var(--mdcdp-ink);
	font-family: var(--mdcdp-font-sans);
	font-size: 17px;
	line-height: 1.55;
}

/* Suppress the standard CRR site chrome and any plugin chrome
   that gets injected at the body root (boxzilla popups, etc.).
   These selectors are intentionally specific to body.mdcd-portal
   so they never leak into the main site. */
body.mdcd-portal #header,
body.mdcd-portal #colophon,
body.mdcd-portal #wpadminbar + #header,
body.mdcd-portal .site-header,
body.mdcd-portal .site-footer,
body.mdcd-portal .article-sidebar,
body.mdcd-portal #secondary,
body.mdcd-portal aside.sidebar {
	display: none !important;
}

/* Defeat the main CRR theme's site-width constraints (.site is locked to
   ~1024px / 1440px via inline styles + style-crr.css in places). The portal
   needs to be a true full-bleed shell. */
body.mdcd-portal #page,
body.mdcd-portal #page.site,
body.mdcd-portal .mdcd-portal-site {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--mdcdp-bg) !important;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body.mdcd-portal .mdcd-portal-main {
	flex: 1 0 auto;
	display: block;
	width: 100%;
	max-width: none;
}

body.mdcd-portal .mdcd-portal-header,
body.mdcd-portal .mdcd-portal-hero,
body.mdcd-portal .mdcd-portal-landing-body,
body.mdcd-portal .mdcd-portal-footer {
	display: block;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}

body.mdcd-portal .mdcd-portal-container {
	display: block !important;
	width: 100% !important;
	max-width: var(--mdcdp-max-width) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 24px !important;
	padding-right: 24px !important;
	box-sizing: border-box !important;
}

/* Strip default list markers and the theme's .entry-content list padding from
   every list we render in the portal — bullets/numbers off, padding off. */
body.mdcd-portal .mdcd-portal-actions,
body.mdcd-portal .mdcd-portal-actions > li,
body.mdcd-portal .mdcd-portal-nav-list,
body.mdcd-portal .mdcd-portal-nav-list > li,
body.mdcd-portal .mdcd-portal-footer-nav ul,
body.mdcd-portal .mdcd-portal-footer-nav li,
body.mdcd-portal .mdcd-download-list,
body.mdcd-portal .mdcd-download-list > li,
body.mdcd-portal .mdcd-portal-breadcrumbs ol,
body.mdcd-portal .mdcd-portal-breadcrumbs li,
body.mdcd-portal .entry-content .mdcd-portal-actions,
body.mdcd-portal .entry-content .mdcd-portal-actions > li,
body.mdcd-portal .entry-content .mdcd-download-list,
body.mdcd-portal .entry-content .mdcd-download-list > li {
	list-style: none !important;
	list-style-type: none !important;
	margin-left: 0 !important;
	padding-left: 0 !important;
}

body.mdcd-portal .mdcd-portal-actions > li::before,
body.mdcd-portal .mdcd-portal-actions > li::marker,
body.mdcd-portal .mdcd-download-list > li::before,
body.mdcd-portal .mdcd-download-list > li::marker,
body.mdcd-portal .mdcd-portal-nav-list > li::before,
body.mdcd-portal .mdcd-portal-nav-list > li::marker,
body.mdcd-portal .mdcd-portal-footer-nav li::before,
body.mdcd-portal .mdcd-portal-footer-nav li::marker {
	content: none !important;
	display: none !important;
}

/* ------------------------------------------------------------
   Header
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-portal-header {
	background: var(--mdcdp-burgundy);
	color: #fff;
	border-bottom: 4px solid var(--mdcdp-sand-dark);
}

body.mdcd-portal .mdcd-portal-header * {
	color: #fff;
}

body.mdcd-portal .mdcd-portal-header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	padding-top: 16px;
	padding-bottom: 16px;
}

body.mdcd-portal .mdcd-portal-branding {
	display: flex;
	align-items: center;
	gap: 18px;
	min-width: 0;
}

/* CRR attribution badge — small but unambiguously legible (white-on-white
   inside a solid mark, light-on-burgundy text outside it). */
body.mdcd-portal .mdcd-portal-attribution {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #fff !important;
	text-decoration: none;
	border-right: 1px solid rgba(255,255,255,.45);
	padding-right: 18px;
	font-size: 11px;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
}

body.mdcd-portal .mdcd-portal-attribution:hover,
body.mdcd-portal .mdcd-portal-attribution:focus {
	text-decoration: none;
}

body.mdcd-portal .mdcd-portal-attribution-mark {
	display: inline-block;
	background: #fff;
	color: var(--mdcdp-burgundy) !important;
	padding: 5px 7px;
	font-weight: 800;
	font-family: var(--mdcdp-font-serif);
	font-size: 14px;
	letter-spacing: .06em;
	line-height: 1;
	border-radius: 2px;
}

body.mdcd-portal .mdcd-portal-attribution-text {
	color: #fff !important;
	opacity: 1;
}

body.mdcd-portal .mdcd-portal-title-link {
	color: #fff;
	text-decoration: none;
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

body.mdcd-portal .mdcd-portal-title-link:hover,
body.mdcd-portal .mdcd-portal-title-link:focus {
	text-decoration: none;
}

body.mdcd-portal .mdcd-portal-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.15;
	color: #fff !important;
}

body.mdcd-portal .mdcd-portal-byline {
	font-size: 11px;
	letter-spacing: .06em;
	color: rgba(255,255,255,.82) !important;
	text-transform: uppercase;
}

/* ------------------------------------------------------------
   Sub-navigation
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-portal-nav {
	margin-left: auto;
	position: relative;
}

body.mdcd-portal .mdcd-portal-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid rgba(255,255,255,.5);
	border-radius: var(--mdcdp-radius);
	padding: 8px 10px;
	cursor: pointer;
	color: #fff;
}

body.mdcd-portal .mdcd-portal-nav-toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: #fff;
	margin: 4px 0;
}

body.mdcd-portal .mdcd-portal-nav-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
}

body.mdcd-portal a.mdcd-portal-nav-item {
	display: inline-block;
	padding: 8px 14px;
	border-radius: var(--mdcdp-radius);
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	transition: background-color .15s ease;
	border: 1px solid transparent;
	line-height: 1.2;
}

body.mdcd-portal a.mdcd-portal-nav-item:hover,
body.mdcd-portal a.mdcd-portal-nav-item:focus {
	background: rgba(255,255,255,.18);
	border-color: rgba(255,255,255,.35);
	text-decoration: none;
	color: #fff !important;
}

body.mdcd-portal a.mdcd-portal-nav-item.is-current,
body.mdcd-portal a.mdcd-portal-nav-item[aria-current="page"] {
	background: #fff;
	color: var(--mdcdp-burgundy) !important;
	border-color: #fff;
	box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

/* The label is wrapped in a <span>, which is also a descendant of
   .mdcd-portal-header and therefore picked up by the blanket
   "color: #fff" rule above. We have to re-color the inner span (and any
   other children) explicitly so the active item reads burgundy-on-white
   instead of white-on-white. */
body.mdcd-portal a.mdcd-portal-nav-item.is-current *,
body.mdcd-portal a.mdcd-portal-nav-item[aria-current="page"] * {
	color: var(--mdcdp-burgundy) !important;
}

body.mdcd-portal a.mdcd-portal-nav-item.is-current:hover,
body.mdcd-portal a.mdcd-portal-nav-item.is-current:focus,
body.mdcd-portal a.mdcd-portal-nav-item[aria-current="page"]:hover,
body.mdcd-portal a.mdcd-portal-nav-item[aria-current="page"]:focus {
	background: #fff;
	color: var(--mdcdp-burgundy-dark) !important;
	border-color: #fff;
}

body.mdcd-portal a.mdcd-portal-nav-item.is-current:hover *,
body.mdcd-portal a.mdcd-portal-nav-item.is-current:focus *,
body.mdcd-portal a.mdcd-portal-nav-item[aria-current="page"]:hover *,
body.mdcd-portal a.mdcd-portal-nav-item[aria-current="page"]:focus * {
	color: var(--mdcdp-burgundy-dark) !important;
}

@media (max-width: 880px) {
	body.mdcd-portal .mdcd-portal-header-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	body.mdcd-portal .mdcd-portal-nav {
		margin-left: 0;
		width: 100%;
	}

	body.mdcd-portal .mdcd-portal-nav-toggle {
		display: inline-block;
	}

	body.mdcd-portal .mdcd-portal-nav-list {
		display: none;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		margin-top: 8px;
	}

	body.mdcd-portal .mdcd-portal-nav.is-open .mdcd-portal-nav-list {
		display: flex;
	}

	body.mdcd-portal a.mdcd-portal-nav-item {
		display: block;
	}
}

/* ------------------------------------------------------------
   Page content
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-portal-article-header {
	margin: 32px 0 24px;
}

body.mdcd-portal .mdcd-portal-breadcrumbs {
	font-size: 13px;
	color: var(--mdcdp-muted);
	margin-bottom: 8px;
}

body.mdcd-portal .mdcd-portal-breadcrumbs ol {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
}

body.mdcd-portal .mdcd-portal-breadcrumbs li + li::before {
	content: "›";
	margin-right: 8px;
	color: var(--mdcdp-sand-dark);
}

body.mdcd-portal .mdcd-portal-breadcrumbs a {
	color: var(--mdcdp-burgundy);
	text-decoration: none;
}

body.mdcd-portal .mdcd-portal-breadcrumbs a:hover {
	text-decoration: underline;
}

body.mdcd-portal .mdcd-portal-page-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 40px;
	font-weight: 600;
	line-height: 1.15;
	color: var(--mdcdp-burgundy);
	margin: 0;
}

body.mdcd-portal .mdcd-portal-content {
	max-width: 920px;
}

body.mdcd-portal .mdcd-portal-content h2 {
	font-family: var(--mdcdp-font-serif);
	font-size: 26px;
	color: var(--mdcdp-burgundy);
	margin-top: 36px;
	border-bottom: 1px solid var(--mdcdp-rule);
	padding-bottom: 6px;
}

body.mdcd-portal .mdcd-portal-content h3 {
	font-family: var(--mdcdp-font-serif);
	font-size: 20px;
	margin-top: 28px;
	color: var(--mdcdp-ink);
}

body.mdcd-portal .mdcd-portal-content a {
	color: var(--mdcdp-blue-dark);
	text-decoration: underline;
}

body.mdcd-portal .mdcd-portal-content a:hover {
	color: var(--mdcdp-burgundy);
}

/* The interactive browser is full-bleed, so let it escape the
   typography column when used inside a portal page. */
body.mdcd-portal .mdcd-portal-content #mdcd-browser-root,
body.mdcd-portal .mdcd-portal-content .mdcd-browser-shell {
	max-width: none;
}

/* ------------------------------------------------------------
   Landing hero
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-portal-hero {
	background:
		linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.55) 100%),
		var(--mdcdp-burgundy-dark);
	color: #fff;
	padding: 72px 0 64px;
	margin-bottom: 0;
	text-align: left;
}

body.mdcd-portal .mdcd-portal-hero .mdcd-portal-container {
	display: block !important;
	text-align: left;
}

body.mdcd-portal .mdcd-portal-hero-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 48px;
	line-height: 1.1;
	font-weight: 600;
	margin: 0 0 12px;
	color: #fff !important;
}

body.mdcd-portal .mdcd-portal-hero-tagline {
	font-size: 19px;
	max-width: 720px;
	color: rgba(255,255,255,.92);
	margin: 0;
}

body.mdcd-portal .mdcd-portal-landing-body {
	padding: 40px 0 64px;
}

/* The landing body is wrapped in the theme's .entry-content for editor
   compatibility; that wrapper often has its own max-width — neutralize it
   so the action grid uses the portal container width. */
body.mdcd-portal .mdcd-portal-landing-body .entry-content,
body.mdcd-portal .mdcd-portal-landing-body .mdcd-portal-content {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ------------------------------------------------------------
   Action cards (used by [mdcd_landing_actions])
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-portal-actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	/* Force every row to match the tallest row's height so every card
	   ends up the same size. Cards stretch via the default
	   `align-items: stretch`, and the CTA's `margin-top: auto` pushes the
	   "Open →" to the bottom so the extra space becomes top/middle
	   whitespace rather than a sad orphaned arrow. */
	grid-auto-rows: 1fr;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
	align-items: stretch;
}

/* Each card fills the full height of its grid row. The existing
   `margin-top: auto` on `.mdcd-portal-action-cta` then pushes the
   "Open →" to the bottom of the column, so cards with less copy
   naturally pad the gap between the description and the CTA instead
   of shrinking the outer card. */
body.mdcd-portal a.mdcd-portal-action,
body.mdcd-portal .mdcd-portal-action {
	height: 100%;
}

body.mdcd-portal a.mdcd-portal-action,
body.mdcd-portal a.mdcd-portal-action:link,
body.mdcd-portal a.mdcd-portal-action:visited {
	position: relative;
	background: var(--mdcdp-card-bg);
	border: 1px solid var(--mdcdp-rule);
	border-radius: var(--mdcdp-radius-lg);
	padding: 24px;
	box-shadow: var(--mdcdp-shadow-sm);
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-decoration: none !important;
	color: inherit;
	overflow: hidden;
	isolation: isolate;
	transition:
		transform .2s cubic-bezier(.2, .8, .2, 1),
		box-shadow .2s ease,
		background-color .2s ease,
		border-color .2s ease;
}

/* The CRR theme adds an underline on every `a:hover` — drop it everywhere
   inside the card (anchor + every descendant) so the card reads as a unit. */
body.mdcd-portal a.mdcd-portal-action:hover,
body.mdcd-portal a.mdcd-portal-action:focus,
body.mdcd-portal a.mdcd-portal-action:active,
body.mdcd-portal a.mdcd-portal-action:hover *,
body.mdcd-portal a.mdcd-portal-action:focus *,
body.mdcd-portal a.mdcd-portal-action:active * {
	text-decoration: none !important;
}

/* Soft inner glow on hover: a faint warm wash sliding up from the bottom.
   Implemented as a pseudo-element so it can animate independently of the
   card's transform / shadow. */
body.mdcd-portal a.mdcd-portal-action::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, var(--mdcdp-burgundy-tint) 100%);
	opacity: 0;
	z-index: -1;
	transition: opacity .2s ease;
	pointer-events: none;
}

/* Accent rail along the leading edge — invisible at rest, slides in on hover. */
body.mdcd-portal a.mdcd-portal-action::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 3px;
	background: var(--mdcdp-burgundy);
	transform: scaleY(0);
	transform-origin: top center;
	transition: transform .25s cubic-bezier(.2, .8, .2, 1);
	border-top-left-radius: var(--mdcdp-radius-lg);
	border-bottom-left-radius: var(--mdcdp-radius-lg);
}

body.mdcd-portal a.mdcd-portal-action:hover,
body.mdcd-portal a.mdcd-portal-action:focus-visible {
	transform: translateY(-3px);
	border-color: var(--mdcdp-rule);
	box-shadow:
		0 10px 25px -10px rgba(128, 23, 43, .25),
		0 4px 8px -4px rgba(0, 0, 0, .08);
}

body.mdcd-portal a.mdcd-portal-action:hover::before,
body.mdcd-portal a.mdcd-portal-action:focus-visible::before {
	opacity: 1;
}

body.mdcd-portal a.mdcd-portal-action:hover::after,
body.mdcd-portal a.mdcd-portal-action:focus-visible::after {
	transform: scaleY(1);
}

/* Keyboard focus ring — distinct from hover so tab users see where they are. */
body.mdcd-portal a.mdcd-portal-action:focus-visible {
	outline: 2px solid var(--mdcdp-burgundy);
	outline-offset: 3px;
}

body.mdcd-portal .mdcd-portal-action-icon {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--mdcdp-burgundy-tint);
	color: var(--mdcdp-burgundy);
	border-radius: 50%;
	font-weight: 700;
	font-family: var(--mdcdp-font-serif);
	font-size: 18px;
	transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

body.mdcd-portal a.mdcd-portal-action:hover .mdcd-portal-action-icon,
body.mdcd-portal a.mdcd-portal-action:focus-visible .mdcd-portal-action-icon {
	background: var(--mdcdp-burgundy);
	color: #fff;
	transform: scale(1.05);
}

body.mdcd-portal .mdcd-portal-action-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 20px;
	font-weight: 600;
	color: var(--mdcdp-burgundy);
	margin: 4px 0 0;
	transition: color .2s ease;
}

body.mdcd-portal a.mdcd-portal-action:hover .mdcd-portal-action-title,
body.mdcd-portal a.mdcd-portal-action:focus-visible .mdcd-portal-action-title {
	color: var(--mdcdp-burgundy-dark);
}

body.mdcd-portal .mdcd-portal-action-desc {
	font-size: 15px;
	color: var(--mdcdp-muted);
	margin: 0;
}

body.mdcd-portal .mdcd-portal-action-cta {
	margin-top: auto;
	padding-top: 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--mdcdp-burgundy);
	letter-spacing: .02em;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

body.mdcd-portal .mdcd-portal-action-cta::after {
	content: "→";
	display: inline-block;
	transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

body.mdcd-portal a.mdcd-portal-action:hover .mdcd-portal-action-cta::after,
body.mdcd-portal a.mdcd-portal-action:focus-visible .mdcd-portal-action-cta::after {
	transform: translateX(4px);
}

/* Respect reduced-motion preference — keep the color cues, skip the lift /
   slide animations. */
@media (prefers-reduced-motion: reduce) {
	body.mdcd-portal a.mdcd-portal-action,
	body.mdcd-portal a.mdcd-portal-action::before,
	body.mdcd-portal a.mdcd-portal-action::after,
	body.mdcd-portal .mdcd-portal-action-icon,
	body.mdcd-portal .mdcd-portal-action-cta::after {
		transition: none;
	}
	body.mdcd-portal a.mdcd-portal-action:hover,
	body.mdcd-portal a.mdcd-portal-action:focus-visible {
		transform: none;
	}
	body.mdcd-portal a.mdcd-portal-action:hover .mdcd-portal-action-icon,
	body.mdcd-portal a.mdcd-portal-action:focus-visible .mdcd-portal-action-icon {
		transform: none;
	}
	body.mdcd-portal a.mdcd-portal-action:hover .mdcd-portal-action-cta::after,
	body.mdcd-portal a.mdcd-portal-action:focus-visible .mdcd-portal-action-cta::after {
		transform: none;
	}
}

/* ------------------------------------------------------------
   Documentation block (used by [mdcd_documentation])
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-doc-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	margin: 24px 0 12px;
	padding: 16px 20px;
	background: var(--mdcdp-sand);
	border: 1px solid var(--mdcdp-rule);
	border-radius: var(--mdcdp-radius);
}

body.mdcd-portal .mdcd-doc-toolbar label {
	font-weight: 600;
	font-size: 14px;
	color: var(--mdcdp-burgundy);
}

body.mdcd-portal .mdcd-doc-toolbar select,
body.mdcd-portal .mdcd-doc-toolbar input[type="search"] {
	font: inherit;
	padding: 6px 10px;
	border: 1px solid var(--mdcdp-rule);
	border-radius: var(--mdcdp-radius);
	background: #fff;
	min-width: 220px;
}

body.mdcd-portal .mdcd-doc-section {
	margin: 32px 0;
	padding-top: 8px;
}

body.mdcd-portal .mdcd-doc-section-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	border-bottom: 2px solid var(--mdcdp-burgundy);
	padding-bottom: 6px;
	margin-bottom: 16px;
}

body.mdcd-portal .mdcd-doc-section-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 24px;
	margin: 0;
	color: var(--mdcdp-burgundy);
}

body.mdcd-portal .mdcd-doc-section-physical {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	color: var(--mdcdp-muted);
}

body.mdcd-portal .mdcd-doc-section-description {
	margin-bottom: 16px;
	color: var(--mdcdp-ink);
}

body.mdcd-portal .mdcd-doc-variables {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: #fff;
	border: 1px solid var(--mdcdp-rule);
	border-radius: var(--mdcdp-radius);
	overflow: hidden;
}

body.mdcd-portal .mdcd-doc-variables th,
body.mdcd-portal .mdcd-doc-variables td {
	padding: 10px 12px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--mdcdp-rule);
}

body.mdcd-portal .mdcd-doc-variables th {
	background: var(--mdcdp-sand);
	font-weight: 700;
	color: var(--mdcdp-burgundy-dark);
	white-space: nowrap;
}

body.mdcd-portal .mdcd-doc-variables tr:last-child td {
	border-bottom: none;
}

body.mdcd-portal .mdcd-doc-variables tr:nth-child(2n) td {
	background: #fbf7ee;
}

body.mdcd-portal .mdcd-doc-variable-name {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-weight: 600;
	color: var(--mdcdp-burgundy);
	white-space: nowrap;
}

/* Hidden state used by the lightweight documentation filter JS. */
body.mdcd-portal .mdcd-doc-section.is-hidden,
body.mdcd-portal .mdcd-doc-variables tbody tr.is-hidden {
	display: none;
}

/* ------------------------------------------------------------
   Download block (used by [mdcd_downloads])
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-downloads {
	display: flex;
	flex-direction: column;
	gap: 48px;
}

body.mdcd-portal .mdcd-download-section {
	margin: 0;
}

body.mdcd-portal .mdcd-download-section-header {
	margin: 0 0 18px;
}

body.mdcd-portal .mdcd-download-section-header h2 {
	font-family: var(--mdcdp-font-serif);
	color: var(--mdcdp-burgundy);
	font-size: 26px;
	margin: 0 0 6px;
	border-bottom: 2px solid var(--mdcdp-burgundy);
	padding-bottom: 6px;
}

body.mdcd-portal .mdcd-download-section-lede {
	font-size: 15px;
	color: var(--mdcdp-muted);
	margin: 0;
	max-width: 760px;
}

/* --- Section 1: Full Current Dataset ---------------------------------- */

body.mdcd-portal .mdcd-download-full-card {
	background: linear-gradient(135deg, var(--mdcdp-sand) 0%, #fff 100%);
	border: 1px solid var(--mdcdp-rule);
	border-radius: var(--mdcdp-radius-lg);
	padding: 28px 32px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	box-shadow: var(--mdcdp-shadow-sm);
}

body.mdcd-portal .mdcd-download-full-meta {
	flex: 1 1 320px;
	min-width: 0;
}

body.mdcd-portal .mdcd-download-full-release {
	margin: 0 0 6px;
	font-size: 16px;
	color: var(--mdcdp-ink);
}

body.mdcd-portal .mdcd-download-full-release-date {
	color: var(--mdcdp-muted);
	margin-left: 4px;
	font-style: italic;
}

body.mdcd-portal .mdcd-download-full-format {
	margin: 0;
	font-size: 13px;
	color: var(--mdcdp-muted);
	letter-spacing: .02em;
	text-transform: uppercase;
}

body.mdcd-portal .mdcd-download-full-actions {
	flex: 0 0 auto;
}

/* --- Section 2: Previous Releases (year / quarter / release) ---------- */

body.mdcd-portal .mdcd-release-history {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

body.mdcd-portal .mdcd-release-year {
	display: block;
}

body.mdcd-portal .mdcd-release-year-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 22px;
	margin: 0 0 12px;
	color: var(--mdcdp-burgundy);
	border-bottom: 1px solid var(--mdcdp-rule);
	padding-bottom: 4px;
}

body.mdcd-portal .mdcd-release-quarter {
	margin: 0 0 16px;
	padding-left: 8px;
	border-left: 3px solid var(--mdcdp-sand-dark);
}

body.mdcd-portal .mdcd-release-quarter-title {
	font-family: var(--mdcdp-font-sans);
	font-size: 13px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mdcdp-burgundy-dark);
	margin: 0 0 6px;
	font-weight: 700;
}

body.mdcd-portal .mdcd-release-list {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

body.mdcd-portal .mdcd-release-list > li {
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.mdcd-portal .mdcd-release-list > li::before,
body.mdcd-portal .mdcd-release-list > li::marker {
	content: none !important;
	display: none !important;
}

body.mdcd-portal a.mdcd-release-link {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 12px;
	padding: 6px 10px;
	border-radius: var(--mdcdp-radius);
	color: var(--mdcdp-blue-dark) !important;
	text-decoration: none;
	font-size: 15px;
	transition: background-color .15s ease, color .15s ease;
}

body.mdcd-portal a.mdcd-release-link:hover,
body.mdcd-portal a.mdcd-release-link:focus {
	background: var(--mdcdp-burgundy-tint);
	color: var(--mdcdp-burgundy) !important;
	text-decoration: none;
}

body.mdcd-portal .mdcd-release-date {
	font-weight: 600;
	color: inherit;
}

body.mdcd-portal .mdcd-release-name {
	color: var(--mdcdp-muted);
	font-size: 14px;
}

body.mdcd-portal .mdcd-release-desc {
	color: var(--mdcdp-muted);
	font-size: 13px;
	font-style: italic;
}

body.mdcd-portal .mdcd-release-badge {
	display: inline-block;
	background: var(--mdcdp-burgundy);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 999px;
	line-height: 1.4;
}

/* --- Section 3: Per-table cards --------------------------------------- */

body.mdcd-portal .mdcd-download-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.mdcd-portal .mdcd-download-card {
	background: #fff;
	border: 1px solid var(--mdcdp-rule);
	border-radius: var(--mdcdp-radius);
	padding: 22px 22px 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: var(--mdcdp-shadow-sm);
	transition: box-shadow .15s ease, border-color .15s ease;
}

body.mdcd-portal .mdcd-download-card:hover {
	border-color: var(--mdcdp-burgundy);
	box-shadow: var(--mdcdp-shadow);
}

body.mdcd-portal .mdcd-download-card-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 19px;
	margin: 0;
	color: var(--mdcdp-burgundy);
	line-height: 1.25;
}

body.mdcd-portal .mdcd-download-card-desc {
	font-size: 14px;
	color: var(--mdcdp-ink);
	margin: 0;
	line-height: 1.45;
}

body.mdcd-portal .mdcd-download-card-physical {
	margin: 0;
	font-size: 12px;
	color: var(--mdcdp-muted);
}

body.mdcd-portal .mdcd-download-card-physical code {
	background: var(--mdcdp-sand);
	border: 1px solid var(--mdcdp-rule);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
	color: var(--mdcdp-burgundy-dark);
	word-break: break-all;
}

body.mdcd-portal .mdcd-download-card-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
}

body.mdcd-portal .mdcd-download-card-links a {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 6px 14px;
	border: 1px solid var(--mdcdp-burgundy);
	color: var(--mdcdp-burgundy);
	border-radius: 999px;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

body.mdcd-portal .mdcd-download-card-links a:hover,
body.mdcd-portal .mdcd-download-card-links a:focus {
	background: var(--mdcdp-burgundy);
	color: #fff;
}

/* --- Shared portal button --------------------------------------------- */

body.mdcd-portal .mdcd-portal-button {
	display: inline-block;
	padding: 12px 22px;
	border-radius: var(--mdcdp-radius);
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .02em;
	text-decoration: none !important;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}

body.mdcd-portal .mdcd-portal-button--primary {
	background: var(--mdcdp-burgundy);
	color: #fff !important;
	border-color: var(--mdcdp-burgundy);
}

body.mdcd-portal .mdcd-portal-button--primary:hover,
body.mdcd-portal .mdcd-portal-button--primary:focus {
	background: var(--mdcdp-burgundy-dark);
	border-color: var(--mdcdp-burgundy-dark);
	color: #fff !important;
}

body.mdcd-portal .mdcd-portal-button--ghost {
	background: #fff;
	color: var(--mdcdp-burgundy) !important;
	border-color: var(--mdcdp-burgundy);
	padding: 6px 16px;
	font-size: 13px;
}

body.mdcd-portal .mdcd-portal-button--ghost:hover,
body.mdcd-portal .mdcd-portal-button--ghost:focus {
	background: var(--mdcdp-burgundy);
	color: #fff !important;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

body.mdcd-portal .mdcd-portal-footer {
	margin-top: 64px;
	background: var(--mdcdp-burgundy-dark);
	color: #fff;
	padding: 32px 0 24px;
}

body.mdcd-portal .mdcd-portal-footer *,
body.mdcd-portal .mdcd-portal-footer a,
body.mdcd-portal .mdcd-portal-footer a:link,
body.mdcd-portal .mdcd-portal-footer a:visited,
body.mdcd-portal .mdcd-portal-footer a:hover,
body.mdcd-portal .mdcd-portal-footer a:focus,
body.mdcd-portal .mdcd-portal-footer a:active {
	color: #fff !important;
}

body.mdcd-portal .mdcd-portal-footer a {
	text-decoration: underline;
	text-decoration-color: rgba(255,255,255,.55);
	text-underline-offset: 3px;
}

body.mdcd-portal .mdcd-portal-footer a:hover,
body.mdcd-portal .mdcd-portal-footer a:focus {
	text-decoration-color: #fff;
}

body.mdcd-portal .mdcd-portal-footer-primary {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid rgba(255,255,255,.18);
}

body.mdcd-portal .mdcd-portal-footer-brand {
	margin: 0;
	font-size: 15px;
	max-width: 540px;
	line-height: 1.5;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

body.mdcd-portal .mdcd-portal-footer-brand-title {
	font-family: var(--mdcdp-font-serif);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: .01em;
}

body.mdcd-portal .mdcd-portal-footer-brand-line {
	font-size: 14px;
	color: rgba(255,255,255,.9) !important;
}

body.mdcd-portal .mdcd-portal-footer-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0;
	padding: 0;
}

body.mdcd-portal a.mdcd-portal-footer-nav-link {
	display: inline-block;
	color: #fff !important;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	padding: 2px 4px;
	border-radius: var(--mdcdp-radius);
}

body.mdcd-portal a.mdcd-portal-footer-nav-link:hover,
body.mdcd-portal a.mdcd-portal-footer-nav-link:focus {
	text-decoration: underline;
	text-decoration-color: #fff;
}

body.mdcd-portal .mdcd-portal-footer-nav-sep {
	color: rgba(255,255,255,.45) !important;
	font-size: 14px;
	user-select: none;
}

body.mdcd-portal .mdcd-portal-footer-secondary {
	padding-top: 16px;
}

body.mdcd-portal .mdcd-portal-copy {
	font-size: 12px;
	color: rgba(255,255,255,.88) !important;
	margin: 0;
}

body.mdcd-portal .mdcd-portal-copy .inline-divider {
	margin: 0 6px;
	color: rgba(255,255,255,.45) !important;
}

/* Hide WordPress admin bar styling collision with full-bleed body. */
body.mdcd-portal.admin-bar #page {
	min-height: calc(100vh - 32px);
}

@media (max-width: 600px) {
	body.mdcd-portal .mdcd-portal-page-title {
		font-size: 30px;
	}
	body.mdcd-portal .mdcd-portal-hero {
		padding: 48px 0 40px;
	}
	body.mdcd-portal .mdcd-portal-hero-title {
		font-size: 34px;
	}
}
