/* Home — editorial optimized layout */

.home-body {
	background: #fff;
	color: #000;
}

.home-body a {
	color: #000;
}

.home-block {
	padding: 3.25rem 0 3.4rem;
	border-bottom: 1px solid #ebe4f2;
	scroll-margin-top: 4rem;
}

.home-block:last-child {
	border-bottom: 0;
}

.home-block--diagrams {
	position: relative;
	isolation: isolate;
	background: #141414;
	color: #fff;
	overflow: hidden;
	border-bottom-color: #2a2a2a;
}

.home-block--diagrams::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		url("../images/content/wellness-bg.jpg") center 45% / cover no-repeat;
	opacity: 0.72;
	pointer-events: none;
}

.home-block--diagrams::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	background:
		linear-gradient(180deg, rgba(20, 20, 20, 0.35) 0%, rgba(20, 20, 20, 0.42) 55%, rgba(20, 20, 20, 0.55) 100%);
	pointer-events: none;
}

.home-block--diagrams > .home-block__inner {
	position: relative;
	z-index: 1;
}

.home-block--diagrams .home-heading,
.home-block--diagrams .home-block__lead,
.home-block--diagrams a {
	color: #fff;
}

.home-block--diagrams .diagram-tile {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.18);
	color: #fff;
}

.home-block--diagrams .diagram-tile:hover {
	border-color: var(--color-accent);
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
}

.home-block--diagrams .diagram-tile__media {
	background: rgba(247, 241, 255, 0.12);
}

.home-block--diagrams .diagram-tile__media img {
	background: #1a1a1a;
}

.home-block--diagrams .diagram-tile__lead {
	color: #fff;
	border-top-color: rgba(255, 255, 255, 0.2);
}

.home-block--about {
	background: #f7f3fb;
}

.home-block__inner,
.home-block__inner--narrow {
	max-width: 72rem;
	margin: 0 auto;
	padding: 0 1.25rem;
	box-sizing: border-box;
}

@media (min-width: 1280px) {
	.home-block__inner,
	.home-block__inner--narrow {
		padding: 0;
	}
}

.home-block__head {
	margin-bottom: 1.5rem;
}

.home-block__head--split {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 1.5rem;
}

.home-block__lead {
	margin: 0.4rem 0 0;
	max-width: 34rem;
	font-size: var(--fs-lead);
	line-height: 1.7;
	color: #000;
}

.home-heading {
	display: block;
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-heading);
	font-weight: 500;
	letter-spacing: 0.02em;
}

/* Topic index — scannable rows (no card boxes) */
.topic-index {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0;
	border-top: 1px solid #e6dff0;
}

.topic-index--compact {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-bottom: 1.75rem;
}

.topic-index__item {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	gap: 0.65rem;
	align-content: space-between;
	min-height: 7.25rem;
	padding: 0.85rem 0.9rem;
	border-bottom: 1px solid #e6dff0;
	border-right: 1px solid #e6dff0;
	text-decoration: none;
	color: inherit;
	transition: background 0.2s ease;
}

.topic-index__item:nth-child(4n) {
	border-right: 0;
}

.topic-index__item:hover {
	background: rgba(218, 199, 248, 0.18);
	color: inherit;
}

.topic-index__body {
	display: grid;
	gap: 0.35rem;
	min-width: 0;
}

.topic-index__label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	justify-self: start;
	box-sizing: border-box;
	height: var(--label-h);
	min-height: var(--label-h);
	padding: 0 var(--label-pad-x) var(--label-nudge);
	font-size: var(--fs-tiny);
	line-height: 1;
	letter-spacing: 0.02em;
	color: var(--label-ink);
	background: var(--label-hint);
}

.topic-index__item--notes .topic-index__label { background: var(--label-notes); }
.topic-index__item--hint .topic-index__label { background: var(--label-hint); }
.topic-index__item--misc .topic-index__label { background: var(--label-misc); }
.topic-index__item--view .topic-index__label { background: var(--label-view); }

.topic-index__title {
	font-size: var(--fs-title);
	font-weight: 500;
	line-height: 1.45;
}

.topic-index__date {
	font-size: var(--fs-meta);
	color: #000;
	white-space: nowrap;
}

/* Collapse for topic-index (PC 8 / mobile 4) */
.topic-index:not(.is-expanded) .topic-index__item.is-collapsed {
	display: none;
}

.topic-index.is-expanded .topic-index__item.is-collapsed,
.topic-index.is-expanded .topic-index__item.is-collapsed-mobile {
	display: grid;
}

.topic-index-more {
	margin: 0;
	padding: 0.95rem 0 0.15rem;
	border-top: 0;
	text-align: center;
}

.topic-index-more[data-collapse-range="mobile-only"] {
	display: none;
}

@media (max-width: 720px) {
	.topic-index:not(.is-expanded) .topic-index__item.is-collapsed-mobile {
		display: none;
	}

	.topic-index-more[data-collapse-range="mobile-only"] {
		display: block;
	}
}

@media (max-width: 960px) {
	.topic-index:not(.is-expanded) .topic-index__item.is-collapsed {
		display: none;
	}

	.topic-index.is-expanded .topic-index__item.is-collapsed {
		display: grid;
	}
}

/* Diagram stage — 4-column visual anchor */
.diagram-stage {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
}

.diagram-tile {
	display: grid;
	grid-template-rows: auto 1fr;
	gap: 0;
	align-items: stretch;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border: 1px solid #e4dde9;
	overflow: hidden;
	transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.diagram-tile:hover {
	border-color: #c9b6ea;
	transform: translateY(-2px);
	color: inherit;
}

.diagram-tile__media {
	display: block;
	padding: 0.75rem;
	background: #f7f1ff;
}

.diagram-tile__media img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: #fff;
}

.diagram-tile__copy {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 0.55rem;
	padding: 0.9rem 0.85rem 1rem;
}

.diagram-tile__title {
	font-family: var(--font-body);
	font-size: var(--fs-title);
	font-weight: 500;
	line-height: 1.45;
}

.diagram-tile__lead {
	font-size: var(--fs-meta);
	line-height: 1.55;
	color: #000;
	padding-top: 0.5rem;
	border-top: 1px solid #ebe4f2;
}

/* Note */
.home-note {
	margin: 0;
	padding: 1.25rem 0 0;
	border-top: 1px solid #ebe4f2;
	font-size: 0.95rem;
	line-height: 1.95;
	color: #000;
}

.note-link {
	text-decoration: none;
	color: #000;
	border-bottom: 1px solid rgba(79, 66, 104, 0.28);
}

.note-link:hover {
	border-bottom-color: currentColor;
}

/* Records */
.record-panel {
	border: 1px solid #ddd6e4;
	background: #fff;
	overflow: hidden;
}

.filter-tabs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	border-bottom: 1px solid #ddd6e4;
}

.filter-tabs__btn {
	border: 0;
	border-right: 1px solid #ddd6e4;
	background: #efebf4;
	color: #000;
	padding: 0.8rem 0.75rem;
	font: inherit;
	font-size: var(--fs-ui);
	cursor: pointer;
}

.filter-tabs__btn:last-child {
	border-right: 0;
}

.filter-tabs__btn.is-active {
	background: #fff;
	font-weight: 500;
}

.record-item {
	border-bottom: 1px solid #ece7f1;
}

.record-item.is-collapsed,
.record-item.is-hidden,
.faq-q-list__item.is-collapsed {
	display: none;
}

.record-list.is-expanded .record-item.is-collapsed:not(.is-hidden),
.record-list.is-expanded .record-item.is-collapsed-mobile:not(.is-hidden),
.faq-q-list.is-expanded .faq-q-list__item.is-collapsed,
.faq-q-list.is-expanded .faq-q-list__item.is-collapsed-mobile {
	display: block;
}

@media (max-width: 720px) {
	.record-list:not(.is-expanded) .record-item.is-collapsed-mobile:not(.is-hidden),
	.faq-q-list:not(.is-expanded) .faq-q-list__item.is-collapsed-mobile {
		display: none;
	}
}

.record-item a {
	display: grid;
	grid-template-columns: 7.2rem minmax(0, 1fr) 5.2rem;
	gap: 0.75rem;
	align-items: center;
	padding: 0.78rem 0.95rem;
	text-decoration: none;
	color: inherit;
}

.record-item a:hover {
	background: #f7f3fb;
	color: inherit;
}

.record-item__type {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: var(--label-h);
	min-height: var(--label-h);
	padding: 0 var(--label-pad-x) var(--label-nudge);
	font-size: var(--fs-label);
	line-height: 1;
	color: var(--label-ink);
	background: var(--label-hint);
	white-space: nowrap;
}

.record-item--notes .record-item__type { background: var(--label-notes); }
.record-item--hint .record-item__type { background: var(--label-hint); }
.record-item--misc .record-item__type { background: var(--label-misc); }
.record-item--view .record-item__type { background: var(--label-view); }

.record-item__main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.55rem;
	min-width: 0;
}

.record-item__title {
	font-size: var(--fs-title);
	font-weight: 500;
}

.record-item__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: var(--label-h);
	min-height: var(--label-h);
	padding: 0 0.4em var(--label-nudge);
	border: 1px solid #cfc6db;
	font-size: 0.7rem;
	line-height: 1;
	color: #000;
}

.record-item__date {
	text-align: right;
	font-size: var(--fs-meta);
	color: #000;
	white-space: nowrap;
}

.record-list {
	position: relative;
}

.record-list:not(.is-expanded)::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3.5rem;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 85%);
}

.record-more {
	margin: 0;
	padding: 0.95rem 1rem 0.95rem;
	text-align: center;
	position: relative;
	z-index: 1;
	background: transparent;
}

.tag-cloud {
	margin-top: 1.75rem;
	padding: 1.25rem 0 0;
	background: none;
	border: 0;
	border-top: 1px solid #ebe4f2;
}

.tag-cloud__head {
	margin-bottom: 0.85rem;
	max-width: none;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem 0.75rem;
}

.tag-cloud__eyebrow {
	margin: 0;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #000;
}

.tag-cloud__title {
	margin: 0;
	font-family: var(--font-body);
	font-size: 0.92rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #000;
	line-height: 1.4;
}

.tag-cloud__lead {
	display: none;
}

.tag-cloud__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.tag-cloud__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.65rem;
	border: 0;
	background: #f7f3fb;
	box-shadow: none;
	text-decoration: none;
	color: #000;
	font-size: 0.84rem;
	line-height: 1.25;
	transition: background 0.15s ease, color 0.15s ease;
}

.tag-cloud__item--high {
	background: #ebe1fb;
	border: 0;
	box-shadow: none;
}

.tag-cloud__item--mid {
	background: #f3ecfb;
}

.tag-cloud__item:hover,
.tag-cloud__item:focus-visible {
	background: #e0d4f5;
	color: #000;
	transform: none;
	box-shadow: none;
	outline: none;
}

.tag-cloud__mark {
	display: none;
}

.tag-cloud__name {
	font-weight: 500;
}

.tag-cloud__item--high .tag-cloud__name {
	font-weight: 500;
}

.tag-cloud__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: var(--label-h);
	min-height: var(--label-h);
	margin-left: 0.05rem;
	min-width: 1.5rem;
	padding: 0 0.28rem var(--label-nudge);
	background: #fff;
	color: #000;
	font-size: 0.72rem;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.tag-cloud__unit {
	font-size: 0.64rem;
}

.tag-cloud__item:hover .tag-cloud__count,
.tag-cloud__item:focus-visible .tag-cloud__count {
	background: #fff;
	color: #000;
}

.type-nav {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.4rem;
}

.type-nav--inline {
	max-width: 26rem;
	width: 100%;
}

.type-nav__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 2rem;
	min-height: 2rem;
	padding: 0 0.35rem var(--label-nudge);
	text-decoration: none;
	font-size: var(--fs-label);
	line-height: 1;
	color: var(--label-ink);
	text-align: center;
}

.type-nav__btn--notes { background: var(--label-notes); }
.type-nav__btn--hint { background: var(--label-hint); }
.type-nav__btn--misc { background: var(--label-misc); }
.type-nav__btn--view { background: var(--label-view); }

.type-nav__btn:hover {
	filter: brightness(0.96);
	color: var(--label-ink);
}

/* FAQ */
.faq-layout {
	display: grid;
	grid-template-columns: 11rem minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
}

.faq-layout__title {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-heading);
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #000;
	line-height: 1.3;
}

.faq-layout__lead {
	margin: 0.55rem 0 0.35rem;
	font-size: var(--fs-lead);
}

.faq-layout__all {
	margin: 0;
	font-size: var(--fs-ui);
}

.faq-layout__all a {
	text-decoration: none;
	color: #000;
}

.faq-q-list {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}

.faq-q-list__item a {
	display: block;
	padding: 0.5rem 0;
	border-bottom: 1px solid #efeaf5;
	text-decoration: none;
	color: #000;
	font-size: var(--fs-title);
	line-height: 1.6;
}

.faq-q-list__item a:hover {
	color: #000;
}

.faq-q-list__item a span {
	margin-right: 0.25rem;
	color: #000;
}

.faq-layout__main .record-more {
	padding-left: 0;
	padding-right: 0;
}

/* About */
.about-heading {
	margin: 0 0 1.25rem;
	font-family: var(--font-body);
	font-size: var(--fs-heading);
	font-weight: 500;
}

.about-copy p {
	margin: 0 0 1.1rem;
	line-height: 1.95;
	font-size: 0.95rem;
}

.about-copy a {
	color: #000;
}

/* Hero */
.hero {
	position: relative;
	z-index: 1;
	min-height: min(72svh, 38rem);
	display: grid;
	align-items: end;
	color: #fff;
	overflow: hidden;
}

.hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 78% 42%;
}

.hero__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(105deg, rgba(10, 10, 12, 0.72) 0%, rgba(10, 10, 12, 0.35) 42%, rgba(10, 10, 12, 0.1) 70%, transparent 100%),
		linear-gradient(180deg, rgba(10, 10, 12, 0.12) 0%, transparent 40%, rgba(10, 10, 12, 0.55) 100%);
}

.hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 72rem;
	margin: 0 auto;
	padding: 3rem 1.25rem 3.5rem;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 1.15rem;
}

@media (min-width: 1280px) {
	.hero__content {
		padding-left: 0;
		padding-right: 0;
	}
}

.hero__brand {
	margin: 0;
	line-height: 0;
}

.hero__logo {
	display: block;
	width: min(22rem, 78vw);
	height: auto;
}

.hero__lead {
	margin: 0;
	max-width: 38rem;
	font-size: 0.9rem;
	font-weight: 400;
	line-height: 1.85;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.92);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero__lead a {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: rgba(218, 199, 248, 0.85);
	text-underline-offset: 0.18em;
	transition: text-decoration-color 0.15s ease, color 0.15s ease;
}

.hero__lead a:hover,
.hero__lead a:focus-visible {
	color: var(--color-accent, #dac7f8);
	text-decoration-color: var(--color-accent, #dac7f8);
	outline: none;
}

@media (max-width: 960px) {
	.topic-index,
	.topic-index--compact {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.topic-index__item:nth-child(4n) {
		border-right: 1px solid #e6dff0;
	}

	.topic-index__item:nth-child(2n) {
		border-right: 0;
	}

	.diagram-stage {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.75rem;
	}

	.diagram-tile {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}

	.diagram-tile__media {
		padding: 0.55rem;
	}

	.diagram-tile__copy {
		padding: 0.7rem 0.7rem 0.85rem;
		gap: 0.4rem;
	}

	.faq-layout {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.record-item a {
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 0.55rem 0.65rem;
		align-items: start;
	}

	.record-item__type {
		align-self: center;
	}

	.record-item__date {
		align-self: center;
		text-align: right;
	}
}

@media (max-width: 720px) {
	.home-block {
		padding: 2.4rem 0 2.6rem;
	}

	.home-block--diagrams {
		padding: 2rem 0 2.15rem;
	}

	.home-block--diagrams::before {
		background-position: center 42%;
		opacity: 0.58;
	}

	.home-block--diagrams .home-block__inner {
		padding-left: 0.95rem;
		padding-right: 0.95rem;
	}

	.home-block--diagrams .home-block__head {
		margin-bottom: 1rem;
	}

	.topic-index,
	.topic-index--compact {
		grid-template-columns: 1fr;
	}

	.type-nav--inline {
		max-width: none;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.topic-index__item,
	.topic-index__item:nth-child(2n),
	.topic-index__item:nth-child(4n) {
		border-right: 0;
	}

	.topic-index__item {
		padding: 0.85rem 0;
		min-height: 0;
	}

	.diagram-stage {
		grid-template-columns: 1fr;
		gap: 0.55rem;
	}

	.diagram-tile {
		grid-template-columns: minmax(6.75rem, 36%) minmax(0, 1fr);
		grid-template-rows: auto;
		align-items: stretch;
	}

	.diagram-tile:hover {
		transform: none;
	}

	.diagram-tile__media {
		padding: 0.4rem;
		display: flex;
		align-items: center;
	}

	.diagram-tile__media img {
		min-height: 0;
		aspect-ratio: 4 / 3;
		object-fit: cover;
	}

	.diagram-tile__copy {
		padding: 0.45rem 0.55rem 0.45rem 0.45rem;
		gap: 0.3rem;
		justify-content: center;
	}

	.diagram-tile__title {
		line-height: 1.4;
	}

	.diagram-tile__lead {
		line-height: 1.45;
		padding-top: 0.3rem;
	}

	.filter-tabs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.filter-tabs__btn {
		padding: 0.7rem 0.25rem;
		line-height: 1.25;
	}

	.record-item a {
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas:
			"type date"
			"main main";
		gap: 0.35rem 0.55rem;
		padding: 0.7rem 0.75rem;
	}

	.record-item__type {
		grid-area: type;
		justify-self: start;
	}

	.record-item__main {
		grid-area: main;
	}

	.record-item__title {
		line-height: 1.45;
	}

	.record-item__date {
		grid-area: date;
		justify-self: end;
	}

	.home-block__head--split {
		align-items: stretch;
	}

	.hero {
		min-height: min(62svh, 32rem);
	}

	.hero__lead {
		font-size: var(--fs-lead);
		line-height: 1.8;
	}
}

@media (max-width: 390px) {
	.filter-tabs__btn {
		padding: 0.65rem 0.15rem;
	}

	.record-item a {
		padding: 0.65rem 0.65rem;
		gap: 0.3rem 0.45rem;
	}

	.type-nav__btn {
		padding: 0 0.2rem var(--label-nudge);
	}

	.diagram-tile {
		grid-template-columns: 5.85rem minmax(0, 1fr);
	}

	.diagram-tile__media {
		padding: 0.3rem;
	}

	.diagram-tile__title {
		font-size: var(--fs-title);
	}

	.diagram-tile__lead {
		font-size: var(--fs-meta);
	}
}
