/* =========================================================
   Final launch (November 2026)
   Navigation panel, Journal, Container Plans, Featured Homes,
   community interactions, contact form, inner page templates.
   Builds on the tokens and components; adds no new colours.
   ========================================================= */

/* ---------- Tap and focus ----------
   No grey/blue tap boxes on touch screens. Focus rings stay for
   keyboard users; after a tap or click (html.is-pointer, set by
   site.js) controls that receive focus by script show none. */

html {
	-webkit-tap-highlight-color: transparent;
}

.site-header__control,
.site-header__logo,
.site-menu a,
.site-menu button {
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	outline: none;
}

.site-header__control:focus,
.site-header__logo:focus {
	outline: none;
	background: none;
	box-shadow: none;
}

.site-header__control:focus-visible,
.site-header__logo:focus-visible {
	outline: 2px solid var(--corten);
	outline-offset: 2px;
	border-radius: 2px;
}

.is-pointer :focus-visible:not(input, textarea, select) {
	outline: none;
}

.site-header__control:active {
	background: none;
}

/* ---------- Menu panel: search, six links, fine rules ---------- */

.site-menu__inner {
	display: block;
	max-width: calc(760px + var(--gutter) * 2);
	padding-block: var(--space-lg) var(--space-2xl);
}

@media (min-width: 1024px) {
	.site-menu__inner {
		display: block;
		padding-block: var(--space-xl) var(--space-3xl);
	}
}

.site-menu__search {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	min-height: 56px;
	margin: 0 0 var(--space-lg);
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--ink);
	cursor: auto;
}

.site-menu__search .icon {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--muted);
}

.site-menu__search input {
	flex: 1;
	min-width: 0;
	min-height: 52px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	font: inherit;
	font-size: var(--fs-lead);
	outline: none;
}

.site-menu__search input::placeholder {
	color: var(--muted);
}

.site-menu__go {
	flex: none;
	min-height: 44px;
	padding: 0 var(--space-2xs);
	border: 0;
	background: none;
	color: var(--corten);
	font: inherit;
	font-size: var(--fs-nav);
	font-weight: var(--fw-medium);
	letter-spacing: var(--ls-nav);
	text-transform: uppercase;
}

.site-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 0;
}

.site-menu__list li {
	border-bottom: 1px solid var(--rule);
}

.site-menu__list a {
	display: flex;
	align-items: center;
	min-height: 56px;
	padding-block: clamp(12px, 0.5rem + 0.6vw, 20px);
	color: var(--ink);
	transition: color var(--dur-fast) ease;
}

.site-menu__name {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
	line-height: 1.1;
	letter-spacing: var(--ls-h3);
}

.site-menu__list a:hover,
.site-menu__list a:focus-visible,
.site-menu__list a[aria-current="page"] {
	color: var(--corten);
}

/* ---------- Shared: accent text ---------- */

.anchor-alias {
	position: absolute;
	top: 0;
}

/* ---------- The Journal ---------- */

.journal__intro {
	max-width: 62ch;
}

.journal-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 var(--grid-gap-wide);
	align-items: start;
}

/* Large screens: the featured article on the left, the supporting
   articles stacked beside it as compact rows */
@media (min-width: 1024px) {
	.journal-grid:not(.is-filtered) {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}

	.journal-grid:not(.is-filtered) .story--lead {
		grid-column: 1;
		grid-row: 1 / span 4;
	}

	.journal-grid:not(.is-filtered) .story:not(.story--lead) {
		grid-column: 2;
	}
}

.journal-grid .story[hidden] {
	display: none;
}

.journal-grid .story__link {
	display: grid;
	gap: var(--text-gap);
	align-content: start;
	height: 100%;
}

.journal-grid .story__label {
	color: var(--corten);
}

.journal-grid .story__title {
	color: var(--corten);
	font-size: var(--fs-h4);
}

.journal-grid .story__dek {
	display: block;
	max-width: 52ch;
	color: var(--ink);
	font-size: var(--fs-small);
	line-height: var(--lh-small);
}

.journal-grid .story__link:hover .story__title {
	color: var(--corten-deep);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.story__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-2xs);
	color: var(--muted);
	font-size: var(--fs-small);
}

.story__meta > * + *::before {
	content: "·";
	margin-right: var(--space-2xs);
}

.story__read {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--corten);
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
}

.story__read .icon {
	width: 16px;
	height: 16px;
	transition: transform var(--dur-fast) var(--ease);
}

.story__link:hover .story__read .icon {
	transform: translateX(3px);
}

/* The featured article: large photograph, then its words */
.journal-grid .story--lead {
	padding-bottom: var(--space-xl);
}

.journal-grid .story--lead .story__media {
	aspect-ratio: 3 / 2;
	margin-bottom: calc(var(--media-gap) - var(--text-gap));
}

.journal-grid .story--lead .story__title {
	max-width: 22ch;
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--ls-h3);
}

.journal-grid .story--lead .story__dek {
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
}

.journal-grid .story--lead .story__read {
	display: none;
}

/* Supporting articles: compact rows, thumbnail beside the words,
   separated by hairlines */
.journal-grid .story:not(.story--lead) {
	padding-block: var(--space-md);
	border-top: 1px solid var(--rule);
}

.journal-grid .story:not(.story--lead) .story__link {
	grid-template-columns: 104px minmax(0, 1fr);
	gap: var(--space-md);
	align-items: start;
}

.journal-grid .story:not(.story--lead) .story__media {
	aspect-ratio: 1 / 1;
}

.journal-grid .story:not(.story--lead) .story__body {
	display: grid;
	gap: var(--text-gap);
	align-content: start;
}

.journal-grid .story:not(.story--lead) :is(.story__dek, .story__read) {
	display: none;
}

@media (min-width: 640px) {
	.journal-grid .story:not(.story--lead) .story__link {
		grid-template-columns: 168px minmax(0, 1fr);
	}
}

@media (min-width: 1024px) {
	.journal-grid:not(.is-filtered) .story:not(.story--lead) .story__link {
		grid-template-columns: 136px minmax(0, 1fr);
	}

	.journal-grid:not(.is-filtered) .story:not(.story--lead):nth-child(2) {
		padding-top: 0;
		border-top: 0;
	}
}

.journal-grid .story--lead .story__body {
	display: grid;
	gap: var(--text-gap);
}

.journal__more {
	margin-top: var(--head-space);
}

/* ---------- Container Plans: square cards, rust text ---------- */

.plan-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-xl) var(--grid-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.plan-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.plan-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.plan-card__link {
	display: grid;
	gap: var(--text-gap);
	align-content: start;
	height: 100%;
	color: var(--corten);
}

.plan-card__media {
	aspect-ratio: 1 / 1;
	margin-bottom: calc(var(--media-gap) - var(--text-gap));
}

.plan-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.plan-card__title {
	color: var(--corten);
	font-family: var(--font-display);
	font-size: var(--fs-h4);
	line-height: var(--lh-h4);
	letter-spacing: var(--ls-h4);
}

.plan-card__specs {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--corten);
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
}

.plan-card__specs li + li::before {
	content: "·";
	margin-right: var(--space-2xs);
}

.plan-card__desc {
	color: var(--corten);
	font-size: var(--fs-small);
	line-height: var(--lh-small);
}

.plan-card__link:hover .plan-card__title {
	color: var(--corten-deep);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* Homepage plans carousel (the rail component, as in Featured Homes) */
.plans {
	overflow: hidden;
}

.plans__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm) var(--space-lg);
}

.plans__rail {
	margin-top: 0;
}

.plan-tile {
	width: clamp(272px, 13rem + 14vw, 400px);
}

.plan-tile__link {
	display: grid;
	gap: var(--text-gap);
	align-content: start;
	height: 100%;
}

.plan-tile__media {
	aspect-ratio: 1 / 1;
	margin-bottom: calc(var(--media-gap) - var(--text-gap));
}

.plan-tile__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.plan-tile__title {
	margin-top: var(--space-2xs);
	color: var(--corten);
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--ls-h3);
}

.plan-tile__config {
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid var(--rule);
	color: var(--ink);
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
	font-variant-numeric: tabular-nums;
}

.plan-tile__desc {
	margin-top: var(--space-xs);
	color: var(--ink-soft);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
}

.plan-tile__link:hover .plan-tile__title {
	color: var(--corten-deep);
}

.plans .rail-progress {
	margin-top: var(--space-lg);
}

.plans__note {
	margin-top: var(--head-space);
	max-width: 70ch;
}

/* ---------- Featured Homes ---------- */

.home-tile__inner {
	display: grid;
	align-content: start;
}

.home-tile .tile__meta + .tile__meta {
	margin-top: 0;
}

.tile__desc {
	display: -webkit-box;
	margin-top: var(--space-2xs);
	overflow: hidden;
	color: var(--ink-soft);
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

a.home-tile__inner:hover .tile__title {
	color: var(--corten);
}

.featured-homes__all {
	margin-top: var(--space-lg);
}

/* ---------- The Cost Sheet ---------- */

.costsheet__intro {
	max-width: 52ch;
	margin-top: var(--title-gap);
	color: var(--muted);
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
}

/* ---------- Free plans ---------- */

.dispatch__action {
	margin-top: var(--space-lg);
}

.dispatch__fine {
	margin-top: var(--space-sm);
	color: var(--on-ink-muted);
}

/* ---------- Instagram ---------- */

.instagram .showcase__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--control-gap) var(--space-lg);
}

/* ---------- Community: people, likes, comments, reactions ---------- */

.avatar {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--paper-deep);
	color: var(--ink);
	font-size: 0.8125rem;
	font-weight: var(--fw-strong);
	letter-spacing: 0.04em;
}

.feed-card__head,
.community-post__by {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
}

.feed-card__who {
	display: grid;
	line-height: 1.3;
}

.feed-card__name {
	font-weight: var(--fw-medium);
}

.feed-card__kind {
	color: var(--corten);
}

.feed-card article {
	grid-template-rows: auto auto 1fr auto;
}

.feed-card--text article {
	grid-template-rows: auto 1fr auto;
}

.feed-card__actions {
	gap: 0 var(--space-lg);
	margin-top: 0;
	padding-top: var(--space-3xs);
}

.feed-card__action {
	color: var(--ink-soft);
	-webkit-tap-highlight-color: transparent;
}

.feed-card__action .t-num {
	font-weight: var(--fw-strong);
}

.feed-card__action--like[aria-pressed="true"] {
	color: var(--corten);
}

.feed-card__action--like:active .icon {
	transform: scale(0.88);
}

.feed-card__action--like .icon {
	transition: transform var(--dur-fast) var(--ease), fill var(--dur-fast) ease;
}

.feed-card__action--share {
	margin-left: auto;
}

.feed-card__action[aria-busy="true"] {
	opacity: 0.7;
}

.community-post__by {
	margin-top: var(--space-md);
}

.reactions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs);
	margin-top: var(--space-md);
}

.reaction {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 var(--space-xs);
	border: 1px solid var(--rule);
	border-radius: 2px;
	background: none;
	color: var(--ink-soft);
	font: inherit;
	font-size: var(--fs-small);
	-webkit-tap-highlight-color: transparent;
}

.reaction__emoji {
	font-size: 1rem;
	line-height: 1;
	filter: saturate(0.6);
}

.reaction:hover {
	border-color: var(--rule-strong);
}

.reaction[aria-pressed="true"] {
	border-color: var(--corten);
	color: var(--corten);
}

.reaction[aria-pressed="true"] .reaction__emoji {
	filter: none;
}

.community-post__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	margin-top: var(--space-xl);
}

.report-link {
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: var(--fs-small);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.report-link:hover {
	color: var(--ink);
}

.report-link:disabled {
	text-decoration: none;
	cursor: default;
}

.comment-report {
	margin-top: var(--space-3xs);
}

.comment-report .report-link {
	min-height: 32px;
	font-size: var(--fs-label);
}

.feed__start {
	padding: var(--space-xl) 0;
	border-block: 1px solid var(--rule);
	text-align: center;
}

.feed__start .c-muted {
	max-width: 52ch;
	margin: var(--space-2xs) auto 0;
}

.share__privacy {
	max-width: 62ch;
}

/* ---------- Contact form ---------- */

.contact-form {
	display: grid;
	gap: var(--space-md);
	margin-block: var(--space-xl);
	padding-top: var(--space-lg);
	border-top: 1px solid var(--ink);
}

.contact-form form {
	display: grid;
	gap: var(--space-md);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--muted);
}

.breadcrumbs li + li::before {
	content: "/";
	margin-right: var(--space-2xs);
	color: var(--rule-strong);
}

.breadcrumbs a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
}

.breadcrumbs a:hover {
	color: var(--corten);
}

.breadcrumbs [aria-current] {
	display: inline-block;
	max-width: 40ch;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
	line-height: 32px;
}

.chd-front > .breadcrumbs,
.chd-page.chd-front > .wp-block-chd-breadcrumbs {
	max-width: calc(var(--max) + var(--gutter) * 2);
	margin: 0 auto;
	padding: var(--space-md) var(--gutter) 0;
}

.chd-front > .breadcrumbs + .section {
	padding-top: var(--space-xl);
}

/* ---------- Inner pages: articles, pages, plans ---------- */

.chd-page {
	padding-bottom: var(--section-space);
}

.chd-article__head,
.chd-listing__head {
	width: 100%;
	max-width: calc(820px + var(--gutter) * 2);
	margin-inline: auto;
	padding: clamp(24px, 1rem + 2vw, 48px) var(--gutter) 0;
}

.chd-listing__head {
	max-width: calc(var(--max) + var(--gutter) * 2);
}

.chd-article__head > * + *,
.chd-listing__head > * + * {
	margin-top: var(--space-sm);
}

.chd-article__head .breadcrumbs,
.chd-listing__head .breadcrumbs {
	margin-bottom: var(--space-lg);
}

.chd-card__topic {
	font-size: var(--fs-label);
	font-weight: var(--fw-medium);
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
}

.chd-card__topic a {
	color: var(--corten);
}

.chd-article__title,
.chd-listing__title {
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: 400;
	line-height: var(--lh-h2);
	letter-spacing: var(--ls-h2);
	text-wrap: balance;
}

.chd-article__dek,
.chd-listing__intro {
	max-width: 60ch;
	color: var(--muted);
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
}

.chd-article__dek .wp-block-post-excerpt__more-text {
	display: none;
}

.chd-plan__image {
	width: 100%;
	max-width: calc(1120px + var(--gutter) * 2);
	margin: var(--head-space) auto 0;
	padding-inline: var(--gutter);
}

.chd-plan__image {
	max-width: calc(820px + var(--gutter) * 2);
}

.chd-plan__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.chd-article__body,
.chd-plan__body {
	max-width: calc(var(--measure) + var(--gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.chd-article__body {
	padding-top: var(--head-space);
}

.chd-plan__body .chd-article__body {
	padding-inline: 0;
}

.chd-article__body .contact-form a {
	text-decoration: underline;
}

/* Plan page */
.plan-details {
	padding-top: var(--head-space);
}

.plan-details__specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 var(--grid-gap);
	margin: 0;
	border-top: 1px solid var(--ink);
}

.plan-details__specs > div {
	padding-block: var(--space-sm);
	border-bottom: 1px solid var(--rule);
}

.plan-details__specs dt {
	color: var(--muted);
	font-size: var(--fs-label);
	letter-spacing: var(--ls-label);
	text-transform: uppercase;
}

.plan-details__specs dd {
	margin: var(--space-3xs) 0 0;
	color: var(--corten);
	font-family: var(--font-display);
	font-size: var(--fs-h4);
}

.plan-details__drawing {
	margin: var(--space-xl) 0 0;
	padding: var(--space-md);
	background: var(--paper);
}

.plan-details__drawing svg {
	display: block;
	width: 100%;
	height: auto;
	color: var(--ink);
}

.plan-details__drawing figcaption {
	margin-top: var(--space-xs);
}

.plan-details__note {
	margin-top: var(--space-md);
}

.plan-details__actions {
	margin-top: var(--space-lg);
}

/* Listings: Journal, topics, search */
.chd-loop {
	max-width: calc(var(--max) + var(--gutter) * 2);
	margin: var(--head-space) auto 0;
	padding-inline: var(--gutter);
}

.chd-cards {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-xl) var(--grid-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.chd-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.chd-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.chd-card {
	display: grid;
	gap: var(--text-gap);
	align-content: start;
}

.chd-card .wp-block-post-featured-image {
	margin: 0 0 calc(var(--media-gap) - var(--text-gap));
	overflow: hidden;
}

.chd-card .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 600ms var(--ease);
}

.chd-card .wp-block-post-featured-image a:hover img {
	transform: scale(1.03);
}

.chd-card__title {
	font-family: var(--font-display);
	font-size: var(--fs-h4);
	font-weight: 400;
	line-height: var(--lh-h4);
}

.chd-card__title a {
	color: var(--corten);
}

.chd-card__title a:hover {
	color: var(--corten-deep);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.chd-card__excerpt {
	color: var(--corten);
	font-size: var(--fs-small);
	line-height: var(--lh-small);
}

.chd-card__excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

.chd-card__meta {
	gap: 0 var(--space-2xs);
	color: var(--muted);
	font-size: var(--fs-small);
}

.chd-card__meta > * + *::before {
	content: "·";
	margin-right: var(--space-2xs);
}

.chd-topics {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs);
	margin: var(--space-md) 0 0;
	padding: 0;
	list-style: none;
}

.chd-topics li a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 var(--space-sm);
	border: 1px solid var(--rule);
	color: var(--ink-soft);
	font-size: var(--fs-small);
}

.chd-topics li a:hover {
	border-color: var(--corten);
	color: var(--corten);
}

.chd-topics .cat-item-1 {
	display: none;
}

.chd-pagination {
	margin-top: var(--space-xl);
	padding-top: var(--space-md);
	border-top: 1px solid var(--rule);
}

.chd-pagination a {
	color: var(--corten);
}

.chd-empty {
	padding-block: var(--space-xl);
	color: var(--muted);
}

.chd-search {
	max-width: 640px;
}

/* ---------- Hero headline: balanced lines at every width ---------- */

.hero__line > span {
	text-wrap: balance;
}

/* ---------- Text links in the accent ---------- */

.link {
	color: var(--corten);
}

.link:hover {
	color: var(--corten-deep);
}

.band--ink .link {
	color: var(--corten-light);
}

/* Phones: Share as an icon, so the interaction row stays on one line */
@media (max-width: 419px) {
	.feed-card__actions {
		gap: 0 var(--space-md);
	}

	.feed-card__action--share [data-share-label] {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.feed-card__action--share {
		min-width: 44px;
		justify-content: flex-end;
	}
}

/* Breadcrumbs: a separator never wraps onto a line by itself */
.breadcrumbs li {
	display: inline-flex;
	min-width: 0;
	max-width: 100%;
	align-items: baseline;
}

.breadcrumbs [aria-current] {
	min-width: 0;
	max-width: 100%;
}

/* Newsletter sign-up: hidden spam trap */
.signup__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.signup .btn:disabled {
	opacity: 0.6;
	cursor: progress;
}

.rail-controls[hidden],
.rail-progress[hidden] {
	display: none;
}

/* Phones: byline facts wrap with space instead of dots */
@media (max-width: 639px) {
	.journal-grid .story__meta {
		column-gap: var(--space-sm);
	}

	.journal-grid .story__meta > * + *::before {
		content: none;
	}
}

/* =========================================================
   Container Plans page (/floor-plans/) and plan pages
   ========================================================= */

.plans-page {
	padding-top: var(--space-lg);
}

.plans-hero {
	max-width: 46rem;
	padding-bottom: var(--section-space);
}

.plans-hero__title {
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: 400;
	line-height: var(--lh-h2);
	letter-spacing: var(--ls-h2);
	text-wrap: balance;
}

.plans-hero__text {
	max-width: 38em;
	margin-top: var(--title-gap);
	color: var(--muted);
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
}

.plans-hero__link {
	margin-top: var(--space-lg);
}

.plan-library {
	padding-top: var(--space-xl);
	border-top: 1px solid var(--rule);
}

.plan-library__title {
	margin-bottom: var(--head-space);
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 400;
	line-height: var(--lh-h3);
	letter-spacing: var(--ls-h3);
}

.plan-library__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-2xl) var(--grid-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.plan-library__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.plan-library__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.plan-library .plan-tile {
	width: auto;
}

.plan-library + .plans__note,
.plan-library .plans__note {
	margin-top: var(--space-2xl);
}

/* Plan page: gallery beside the plan's information */
.plan-page {
	max-width: calc(var(--max) + var(--gutter) * 2);
	margin-inline: auto;
	padding: var(--space-md) var(--gutter) 0;
}

.plan-page .breadcrumbs {
	margin-bottom: var(--space-lg);
}

.plan-page__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--space-xl) var(--grid-gap-wide);
	align-items: start;
}

@media (min-width: 1024px) {
	.plan-page__grid {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	}

	.plan-page__info {
		position: sticky;
		top: calc(var(--header-h, 76px) + var(--space-lg));
	}
}

.plan-page__title {
	color: var(--corten);
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	font-weight: 400;
	line-height: var(--lh-h2);
	letter-spacing: var(--ls-h2);
}

.plan-info__config {
	margin-top: var(--space-xs);
	padding-bottom: var(--space-sm);
	border-bottom: 1px solid var(--rule);
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
	font-variant-numeric: tabular-nums;
}

.plan-info__desc {
	margin-top: var(--space-md);
	color: var(--ink-soft);
	font-size: var(--article-fs);
	line-height: var(--article-lh);
}

.plan-info__desc > * + * {
	margin-top: var(--article-flow);
}

.plan-info__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm) var(--space-lg);
	margin-top: var(--space-lg);
}

.plan-info__share {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	min-height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ink);
	font: inherit;
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
	cursor: pointer;
}

.plan-info__share .icon {
	width: 18px;
	height: 18px;
}

.plan-info__share:hover {
	color: var(--corten);
}

.plan-info__note {
	margin-top: var(--space-lg);
}

/* Gallery: each image keeps its proportions inside a calm frame */
.plan-gallery__viewport {
	display: flex;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	background: var(--paper);
}

.plan-gallery__viewport::-webkit-scrollbar {
	display: none;
}

.plan-gallery__viewport:focus-visible {
	outline: 2px solid var(--corten);
	outline-offset: 3px;
}

.plan-gallery__slide {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: start;
}

.plan-gallery__open {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	cursor: zoom-in;
}

.plan-gallery__open img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.plan-gallery__slide--render .plan-gallery__open img {
	filter: saturate(0.86) contrast(1.02);
}

.plan-gallery__slide--plan .plan-gallery__open {
	background: var(--ground);
}

.plan-gallery__slide--plan .plan-gallery__open img {
	inset: var(--space-sm);
	width: calc(100% - var(--space-sm) * 2);
	height: calc(100% - var(--space-sm) * 2);
}

.plan-gallery__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-sm);
	margin-top: var(--space-sm);
}

.plan-gallery__count {
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.plan-gallery__thumbs {
	display: flex;
	gap: var(--space-2xs);
	margin: var(--space-sm) 0 0;
	padding: 0 0 2px;
	overflow-x: auto;
	list-style: none;
	scrollbar-width: thin;
}

.plan-gallery__thumb {
	display: block;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 1px solid transparent;
	background: var(--paper);
	opacity: 0.6;
	cursor: pointer;
	transition: opacity var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.plan-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.plan-gallery__thumb:hover,
.plan-gallery__thumb[aria-current="true"] {
	opacity: 1;
}

.plan-gallery__thumb[aria-current="true"] {
	border-color: var(--ink);
}

.plan-gallery--sketch {
	margin: 0;
	padding: var(--space-md);
	background: var(--paper);
}

.plan-gallery--sketch svg {
	display: block;
	width: 100%;
	height: auto;
	color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
	.plan-gallery__thumb {
		transition: none;
	}
}

.plan-info__desc :is(h2, h3, h4) {
	margin-top: 1.6em;
	color: var(--ink);
	font-family: var(--font-display);
	font-size: var(--fs-h4);
	font-weight: 400;
	line-height: var(--lh-h4);
}

.plan-info__desc :is(ul, ol) {
	padding-left: 1.25em;
}

.plan-info__desc ul {
	list-style: square;
}

.plan-info__desc ol {
	list-style: decimal;
}

.plan-info__desc li + li {
	margin-top: 0.4em;
}

.plan-info__desc li::marker {
	color: var(--muted);
}
