/* =========================================================
   Homepage sections, in page order.
   Each block corresponds to one future WordPress block pattern.
   Spacing comes only from the tokens in tokens.css.
   ========================================================= */

/* ---------- Bands (coloured sections) ---------- */

.band--paper {
	background: var(--paper);
}

.band--ink {
	background: var(--ink);
	color: var(--on-ink);
}

.c-on-ink-accent {
	color: var(--corten-light);
}

/* =========================================================
   01 · Hero: type and one drawing, no photograph
   ========================================================= */

.hero {
	padding-top: clamp(40px, 1.6rem + 4vw, 104px);
}

.hero__title {
	margin: 0;
}

.hero__line {
	display: block;
	overflow: hidden;
	/* room for descenders while the line is masked */
	padding-bottom: 0.06em;
	margin-bottom: -0.06em;
}

.hero__line > span {
	display: inline-block;
}

.hero__line--indent {
	padding-left: clamp(0px, -6rem + 18vw, 220px);
}

.br-mobile {
	display: none;
}

/* Text on the left, the floor-plan sheet on the right */
.hero__body {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 1fr) minmax(0, 5fr);
	grid-template-areas: "text . sheet";
	align-items: end;
	gap: var(--space-xl) var(--grid-gap);
	margin-top: clamp(36px, 1.2rem + 3.6vw, 88px);
}

.hero__text {
	grid-area: text;
}

.hero__lede {
	max-width: 34em;
}


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

.hero__sheet {
	grid-area: sheet;
	display: grid;
	gap: var(--space-sm);
	padding: clamp(16px, 0.6rem + 1vw, 28px);
	background: var(--paper);
	border: 1px solid var(--rule);
	transition: border-color var(--dur-fast) ease;
}

.hero__sheet:hover {
	border-color: var(--ink);
}

.hero__drawing {
	width: 100%;
	aspect-ratio: 432 / 186;
}

/* Title block, as on a printed drawing */
.hero__block {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: var(--space-sm);
	align-items: center;
	padding-top: var(--space-xs);
	border-top: 1px solid var(--ink);
	font-size: 0.6875rem;
	font-weight: var(--fw-strong);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.3;
}

.hero__block > span:nth-child(2) {
	color: var(--muted);
}

.hero__block-link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3xs);
	transition: color var(--dur-fast) ease;
}

.hero__block-link .icon {
	width: 14px;
	height: 14px;
	transition: transform var(--dur) var(--ease);
}

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

.hero__sheet:hover .hero__block-link .icon {
	transform: translateX(3px);
}









/* Load-in: headline lines rise out of their masks, the sheet draws
   itself in once, the rest fades up. This is the page's one
   authored moment; sections below only fade. */
@media (prefers-reduced-motion: no-preference) {
	.js [data-hero-line] {
		transform: translateY(105%);
		transition: transform 1.1s var(--ease);
		transition-delay: calc(120ms + var(--i, 0) * 110ms);
	}

	.js [data-hero-item] {
		opacity: 0;
		transform: translateY(12px);
		transition: opacity 900ms var(--ease), transform 900ms var(--ease);
		transition-delay: calc(300ms + var(--i, 0) * 90ms);
	}

	.js .hero__drawing :is(rect, path, circle) {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
		transition: stroke-dashoffset 2.4s var(--ease-io) 700ms;
	}

	.js .hero__drawing text {
		opacity: 0;
		transition: opacity 700ms ease 2.2s;
	}

	.js .is-loaded [data-hero-line],
	.js .is-loaded [data-hero-item] {
		opacity: 1;
		transform: none;
	}

	.js .is-loaded .hero__drawing :is(rect, path, circle) {
		stroke-dashoffset: 0;
	}

	.js .is-loaded .hero__drawing text {
		opacity: 1;
	}
}

@media (max-width: 1023px) {
	.hero__body {
		grid-template-columns: 1fr;
		grid-template-areas:
			"text"
			"sheet";
		align-items: start;
	}

	.hero__sheet {
		max-width: 560px;
	}
}

@media (max-width: 760px) {
	.hero__line--indent {
		padding-left: 0;
	}
}

@media (max-width: 600px) {
	.br-mobile {
		display: inline;
	}

	.hero__body {
		gap: var(--space-lg);
	}

	.hero__block {
		grid-template-columns: 1fr auto;
	}

	.hero__block > span:nth-child(2) {
		display: none;
	}
}

/* =========================================================
   02 · The Journal
   ========================================================= */

.journal__grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--space-xl) var(--grid-gap);
	transition: opacity 280ms ease;
}

.journal__grid.is-switching {
	opacity: 0;
}

.story[hidden] {
	display: none;
}

/* Lead */
.story.is-lead {
	grid-column: 1 / span 7;
	grid-row: span 2;
}

.story.is-lead .story__media {
	aspect-ratio: 5 / 4;
}

.story.is-lead .story__title {
	font-size: var(--fs-h3);
	line-height: var(--lh-h3);
	letter-spacing: var(--ls-h3);
}

.story.is-lead .story__dek {
	display: block;
	font-size: var(--fs-lead);
	line-height: var(--lh-lead);
}

/* "Build of the Week" kicker added by js above the hub label */
.story__kicker {
	color: var(--ink);
}

/* Side stories: image beside text */
.story.is-side {
	grid-column: 8 / span 5;
}

.story.is-side .story__link {
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: var(--space-md);
}

.story.is-side .story__media {
	aspect-ratio: 4 / 5;
}

.story.is-side .story__dek {
	display: block;
	font-size: var(--fs-small);
	line-height: var(--lh-small);
}

.story.is-side + .story.is-side {
	padding-top: var(--space-xl);
	margin-top: calc(var(--space-xl) * -1);
	border-top: 1px solid var(--rule);
}

/* Bottom row */
.story.is-row,
.journal__grid > .most-read {
	grid-column: span 3;
}

.story.is-row {
	padding-top: var(--space-md);
	border-top: 1px solid var(--rule);
}

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

@media (max-width: 1100px) {
	.story.is-lead {
		grid-column: 1 / -1;
		grid-row: auto;
	}

	.story.is-lead .story__media {
		aspect-ratio: 16 / 10;
	}

	.story.is-side {
		grid-column: span 6;
	}

	.story.is-side + .story.is-side {
		padding-top: 0;
		margin-top: 0;
		border-top: 0;
	}

	.story.is-row,
	.journal__grid > .most-read {
		grid-column: span 6;
	}
}

@media (max-width: 1023px) {
	/* Filters scroll sideways instead of wrapping */
	.journal .section-head {
		align-items: stretch;
	}

	.filters {
		flex-wrap: nowrap;
		width: 100%;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.filters::-webkit-scrollbar {
		display: none;
	}

	.filter {
		flex: none;
	}

	.filter:first-child {
		padding-left: 0;
	}
}

@media (max-width: 640px) {
	.journal__grid {
		gap: var(--space-md);
	}

	.story.is-side,
	.story.is-row,
	.journal__grid > .most-read {
		grid-column: 1 / -1;
	}

	.story.is-lead {
		margin-bottom: var(--space-sm);
	}

	.story.is-lead .story__media {
		aspect-ratio: 4 / 3;
	}

	/* Compact list rows */
	.story.is-side,
	.story.is-row {
		padding-top: var(--space-md);
		border-top: 1px solid var(--rule);
	}

	.story.is-side .story__link,
	.story.is-row .story__link {
		grid-template-columns: 104px 1fr;
		gap: var(--space-sm);
	}

	.story.is-side .story__media,
	.story.is-row .story__media {
		aspect-ratio: 1;
	}

	.story.is-side .story__dek {
		display: none;
	}

	.journal__grid > .most-read {
		margin-top: var(--space-lg);
	}
}

/* =========================================================
   03 · The Cost Sheet
   ========================================================= */

.costsheet__top {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: var(--grid-gap-wide);
	align-items: end;
}

.costsheet__frame {
	aspect-ratio: 4 / 5;
}

/* Series line sits under the title, never above it */
.costsheet__series {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-xs);
	margin-top: var(--title-gap);
	color: var(--muted);
	font-size: var(--fs-small);
}

.specs {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-sm);
	margin-top: var(--space-lg);
	padding-block: var(--space-sm);
	border-block: 1px solid var(--ink);
}

.specs dt {
	color: var(--muted);
	font-size: 0.75rem;
}

.specs dd {
	font-size: var(--fs-small);
	font-weight: var(--fw-medium);
}

.total {
	display: grid;
	gap: var(--space-2xs);
	margin-top: var(--space-xl);
}

.total__figure {
	font-family: var(--font-display);
	font-size: clamp(3rem, 2rem + 4.2vw, 6rem);
	line-height: 0.95;
	letter-spacing: var(--ls-display);
}

.total__per {
	color: var(--muted);
}

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

.split__bar {
	display: flex;
	gap: 3px;
	height: 12px;
}

.split__seg {
	flex: 0 0 calc(var(--share) * 1%);
}

.split__seg--1, .split__key--1 { background: var(--ink); }
.split__seg--2, .split__key--2 { background: var(--stone); }
.split__seg--3, .split__key--3 { background: var(--corten); }

.split__legend {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2xs) var(--space-md);
	margin-top: var(--space-sm);
	font-size: var(--fs-small);
}

.split__legend li {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
}

.split__legend .t-num {
	color: var(--muted);
}

.split__key {
	display: inline-block;
	width: 10px;
	height: 10px;
	flex: none;
}

/* Itemised ledger: three groups side by side */
.ledger {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--grid-gap-wide);
	margin-top: var(--space-2xl);
}

.ledger__group {
	width: 100%;
	border-collapse: collapse;
}

.ledger__group caption {
	caption-side: top;
	padding-bottom: var(--space-xs);
	border-bottom: 1px solid var(--ink);
	font-family: var(--font-display);
	font-size: var(--fs-h4);
	line-height: var(--lh-h4);
	text-align: left;
}

.ledger__group caption .split__key {
	margin-right: var(--space-2xs);
	vertical-align: 0.1em;
}

.ledger__group caption .t-num {
	float: right;
	padding-top: 0.2em;
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: var(--fw-medium);
}

.ledger__group th,
.ledger__group td {
	padding: var(--space-xs) 0 var(--space-xs);
	border-bottom: 1px solid var(--rule-strong);
	vertical-align: top;
	font-size: var(--fs-small);
}

.ledger__group tbody th {
	width: 100%;
	padding-right: var(--space-sm);
	text-align: left;
	font-weight: 400;
}

.ledger__group td {
	text-align: right;
	white-space: nowrap;
	font-weight: var(--fw-medium);
}

/* Each line's share of its largest item, drawn as a hairline bar */
.ledger__group tbody th::after {
	content: "";
	display: block;
	height: 2px;
	margin-top: var(--space-2xs);
	width: calc(var(--v) * 100%);
	background: var(--ink);
	transform-origin: left;
	transition: transform 1.2s var(--ease) 200ms;
}

.ledger__group:nth-child(2) tbody th::after { background: var(--stone); }
.ledger__group:nth-child(3) tbody th::after { background: var(--corten); }

@media (prefers-reduced-motion: no-preference) {
	.js .ledger__group tbody th::after {
		transform: scaleX(0);
	}

	.js .ledger__group.is-in tbody th::after {
		transform: scaleX(1);
	}

	.js .split .split__bar {
		clip-path: inset(0 100% 0 0);
		transition: clip-path 1.4s var(--ease-io) 300ms;
	}

	.js .split.is-in .split__bar {
		clip-path: inset(0 0 0 0);
	}
}

.costsheet__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md) var(--grid-gap-wide);
	margin-top: var(--space-xl);
	padding-top: var(--space-md);
	border-top: 1px solid var(--rule-strong);
}

.costsheet__note {
	max-width: 58ch;
}

@media (max-width: 1023px) {
	.costsheet__top {
		grid-template-columns: 1fr;
		gap: var(--space-xl);
	}

	.costsheet__frame {
		aspect-ratio: 3 / 2;
	}

	.ledger {
		grid-template-columns: 1fr 1fr;
		gap: var(--space-xl) var(--grid-gap);
	}
}

@media (max-width: 640px) {
	.specs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: var(--space-sm);
	}

	.ledger {
		grid-template-columns: 1fr;
		gap: var(--space-xl);
		margin-top: var(--space-xl);
	}
}

/* =========================================================
   04 · Explore designs
   ========================================================= */

.designs {
	overflow: hidden;
}

.rail-controls {
	display: flex;
	gap: var(--space-2xs);
}

.rail-btn {
	display: inline-grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--rule-strong);
	background: transparent;
	transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}

.rail-btn:hover:not(:disabled) {
	border-color: var(--ink);
}

.rail-btn:disabled {
	color: var(--rule-strong);
	cursor: default;
}

.rail {
	--inset: max(var(--gutter), calc((100vw - var(--max)) / 2));
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--inset);
	scrollbar-width: none;
}

.rail::-webkit-scrollbar {
	display: none;
}

.rail.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
}

.rail.is-dragging a {
	pointer-events: none;
}

.rail:focus-visible {
	outline-offset: -2px;
}

.rail__track {
	display: flex;
	gap: var(--grid-gap);
	width: max-content;
	padding-inline: var(--inset);
}

.tile {
	flex: none;
	width: clamp(232px, 12rem + 9vw, 320px);
	scroll-snap-align: start;
}

.rail-progress {
	position: relative;
	height: 1px;
	margin-top: var(--space-lg);
	background: var(--rule-strong);
}

.rail-progress span {
	position: absolute;
	inset: 0 auto 0 0;
	width: 20%;
	height: 1px;
	background: var(--ink);
}

.browse {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-lg) var(--grid-gap);
	margin-top: var(--space-xl);
}

.browse__group .t-label {
	padding-bottom: var(--space-2xs);
	border-bottom: 1px solid var(--rule);
}

.browse__group ul {
	list-style: none;
	margin: var(--space-2xs) 0 0;
	padding: 0;
}

.browse__group a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	transition: color var(--dur-fast) ease;
}

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

@media (max-width: 760px) {
	.browse {
		grid-template-columns: 1fr 1fr;
	}

	.rail-controls {
		display: none;
	}
}

/* =========================================================
   05 · Plans + custom design
   ========================================================= */

.plans__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--grid-gap);
}

/* Below 1024px the plans become a swipeable row */
@media (max-width: 1023px) {
	.plans__grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: min(78vw, 360px);
		margin-inline: calc(var(--gutter) * -1);
		padding-inline: var(--gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		scrollbar-width: none;
	}

	.plans__grid::-webkit-scrollbar {
		display: none;
	}

	.plan {
		scroll-snap-align: start;
	}
}

.custom {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: var(--grid-gap-wide);
	align-items: center;
	margin-top: var(--section-space);
	padding-top: var(--section-space);
	border-top: 1px solid var(--rule);
}

.custom__frame {
	aspect-ratio: 4 / 3;
}

.custom__content > .t-lead {
	margin-top: var(--title-gap);
	max-width: 34em;
}

.custom__steps {
	display: grid;
	margin-top: var(--space-lg);
	border-top: 1px solid var(--ink);
}

.custom__steps li {
	display: grid;
	grid-template-columns: 40px 1fr;
	padding-block: var(--space-xs);
	border-bottom: 1px solid var(--rule);
	font-weight: var(--fw-medium);
}

.custom__steps .t-num {
	color: var(--muted);
	font-size: var(--fs-small);
	font-weight: var(--fw-body);
}

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

@media (max-width: 1023px) {
	.custom {
		grid-template-columns: 1fr;
		gap: var(--space-xl);
	}

	.custom__frame {
		aspect-ratio: 3 / 2;
	}
}

/* =========================================================
   06 · Builder directory
   ========================================================= */

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

.quote-form {
	margin-top: var(--space-lg);
	max-width: 560px;
}

.quote-form__label {
	display: block;
	margin-bottom: var(--space-2xs);
}

.quote-form__row {
	display: flex;
	gap: var(--space-2xs);
}

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

.directory__states .t-label {
	margin-bottom: var(--space-2xs);
}

.verify {
	margin-top: var(--space-xl);
	padding-top: var(--space-sm);
	border-top: 1px solid var(--ink);
	max-width: 560px;
}

.verify ol {
	list-style: none;
	margin: var(--space-2xs) 0 0;
	padding: 0;
}

.verify li {
	padding-block: var(--space-xs);
	border-bottom: 1px solid var(--rule);
	font-size: var(--fs-small);
}

.verify .actions {
	margin-top: var(--space-sm);
}

@media (max-width: 1023px) {
	.directory__grid {
		grid-template-columns: 1fr;
		gap: var(--space-xl);
	}

	.builder {
		max-width: 640px;
	}
}

@media (max-width: 480px) {
	.quote-form__row {
		flex-direction: column;
	}
}

/* =========================================================
   07 · The Dispatch
   ========================================================= */

.dispatch__grid {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: var(--grid-gap-wide);
	align-items: center;
}

.dispatch__title em {
	color: var(--corten-light);
}

.dispatch__sub {
	margin-top: var(--title-gap);
	max-width: 34em;
	color: var(--on-ink-muted);
}

.signup {
	margin-top: var(--space-lg);
	max-width: 540px;
}

.signup__label {
	display: block;
	margin-bottom: var(--space-2xs);
	color: var(--on-ink-muted);
}

.signup__row {
	display: flex;
	gap: var(--space-2xs);
}

.signup__input {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 var(--space-sm);
	border: 1px solid var(--on-ink-muted);
	border-radius: 0;
	background: transparent;
	color: var(--on-ink);
	font-size: var(--fs-body);
	transition: border-color var(--dur-fast) ease;
}

.signup__input::placeholder {
	color: var(--on-ink-muted);
}

.signup__input:focus-visible {
	outline: none;
	border-color: var(--on-ink);
}

.signup__input[aria-invalid="true"] {
	border-color: var(--corten-light);
}

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

.signup__fine a {
	text-decoration: underline;
	text-underline-offset: 3px;
}



@media (max-width: 480px) {
	.signup__row {
		flex-direction: column;
	}

	.signup__input {
		flex: none;
	}
}

/* Drawing sheets: a small set fanned on the desk */
.dispatch__art {
	position: relative;
	width: 100%;
	max-width: 560px;
	aspect-ratio: 1 / 0.92;
	justify-self: center;
}

.sheet {
	position: absolute;
	width: 80%;
	padding: 2.4%;
	background: var(--paper);
	color: var(--ink);
	transition: transform 1.2s var(--ease);
}

.sheet__frame {
	display: grid;
	border: 1px solid var(--ink);
}

.sheet__drawing {
	width: 100%;
	aspect-ratio: 480 / 300;
	padding: 4% 4% 2%;
}

.sheet__block {
	display: grid;
	grid-template-columns: 1.4fr 1.2fr 0.6fr;
	border-top: 1px solid var(--ink);
	font-size: 0.625rem;
	font-weight: var(--fw-strong);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	line-height: 1.2;
}

.sheet__block span {
	padding: 6px 8px;
}

.sheet__block span + span {
	border-left: 1px solid var(--ink);
}

.sheet__block span:last-child {
	text-align: right;
}

@media (max-width: 600px) {
	.sheet__block {
		grid-template-columns: 1fr auto;
		font-size: 0.625rem;
	}

	.sheet__block span:first-child {
		display: none;
	}

	.sheet__block span:nth-child(2) {
		border-left: 0;
	}
}

.sheet--1 { top: 0;   left: 16%; transform: rotate(5deg); }
.sheet--2 { top: 20%; left: 2%;  transform: rotate(-4deg); }
.sheet--3 { top: 40%; left: 14%; transform: rotate(1.5deg); }

/* Before reveal the sheets sit squared up in a neat stack */
@media (prefers-reduced-motion: no-preference) {
	.js .dispatch__art:not(.is-in) .sheet {
		transform: rotate(0) translate(0, 0);
	}

	.js .dispatch__art:not(.is-in) .sheet--1 { transform: translate(-2%, 40%); }
	.js .dispatch__art:not(.is-in) .sheet--2 { transform: translate(12%, 20%); }

	.dispatch__art.is-in:hover .sheet--1 { transform: rotate(7deg) translate(10px, -8px); }
	.dispatch__art.is-in:hover .sheet--2 { transform: rotate(-6deg) translate(-8px, 0); }
	.dispatch__art.is-in:hover .sheet--3 { transform: rotate(0.5deg) translate(6px, 8px); }
}

@media (max-width: 1023px) {
	.dispatch__grid {
		grid-template-columns: 1fr;
		gap: var(--space-2xl);
	}

	.dispatch__art {
		max-width: 480px;
	}
}

/* =========================================================
   08 · Community
   ========================================================= */


.showcase {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.15fr;
	gap: var(--grid-gap);
}

.showcase__item .media {
	height: clamp(280px, 12rem + 14vw, 460px);
}


.showcase__cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-sm);
	height: clamp(280px, 12rem + 14vw, 460px);
	padding: clamp(20px, 1rem + 1vw, 32px);
	background: var(--paper);
}

.showcase__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--control-gap) var(--space-md);
	margin-top: auto;
}

@media (max-width: 1100px) {
	.showcase {
		grid-template-columns: 1fr 1fr;
	}

	.showcase__item--wide {
		grid-column: 1 / -1;
	}

	.showcase__item .media {
		height: auto;
		aspect-ratio: 4 / 5;
	}

	.showcase__item--wide .media {
		aspect-ratio: 16 / 9;
	}

	.showcase__cta {
		grid-column: 1 / -1;
		height: auto;
		gap: var(--space-sm);
	}

	.showcase__actions {
		margin-top: var(--space-2xs);
	}

}

/* =========================================================
   Buyer information (clarify pass)
   ========================================================= */

/* What a plan includes, under its specs */
.plan__set {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2xs);
	margin-top: var(--space-xs);
	color: var(--muted);
	font-size: var(--fs-small);
}

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

.custom__terms {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2xs);
	margin-top: var(--space-sm);
	color: var(--muted);
}

.quote-form__note {
	max-width: 46ch;
	margin-top: var(--space-xs);
}

/* =========================================================
   Journal states and the permits index (harden pass)
   ========================================================= */

.journal__empty {
	grid-column: 1 / -1;
	padding-block: var(--space-xl);
	border-block: 1px solid var(--rule);
	color: var(--muted);
}

.journal__empty[hidden] {
	display: none;
}







/* =========================================================
   Phone and touch adaptations (adapt pass)
   ========================================================= */

/* Floor-plan labels stay readable when the drawing shrinks.
   The SVG scales to about 0.55 on a phone, so 18 units ≈ 10px. */
@media (max-width: 640px) {
	.plan__drawing text {
		font-size: 18px;
		letter-spacing: 0.04em;
	}

	.plan__drawing .dim-text {
		font-size: 19px;
	}

	.hero__drawing text {
		font-size: 16px;
		letter-spacing: 0.04em;
	}
}

/* Filter strip: a soft fade at the edge says "more this way" until
   the last topic is in view. */
.filters.has-more {
	-webkit-mask-image: linear-gradient(to right, #000 80%, transparent);
	mask-image: linear-gradient(to right, #000 80%, transparent);
}

/* One corten Get Quotes at a time: the header button steps back while
   the builder directory (which has its own) is on screen. */
.masthead__quotes,
.navbar__quotes {
	transition: opacity var(--dur) var(--ease), visibility 0s linear 0s;
}

.at-directory .masthead__quotes,
.at-directory .navbar.is-stuck .navbar__quotes {
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur);
}

@media (max-width: 1023px) {
	.menu-open .masthead__quotes {
		opacity: 0;
		visibility: hidden;
	}
}

/* Inline links inside sentences get a taller hit area without moving text */
.signup__fine a {
	display: inline-block;
	padding-block: 12px;
	margin-block: -12px;
}

/* =========================================================
   Order and length (layout + distill pass)
   ========================================================= */

/* Phones: the hero is type only, so the Designs photographs follow
   straight after it. The same drawing opens the plan cards below. */
@media (max-width: 640px) {
	.hero__sheet {
		display: none;
	}


	/* "Most read" repeats the stories above on a small screen */
	.journal__grid > .most-read {
		display: none;
	}
}

/* See all stories and the permits index share one row */
.journal__more {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-lg);
}

.costsheet__project {
	margin-top: var(--title-gap);
}

.showcase__note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2xs);
	margin-top: var(--space-md);
}

/* The quote button can grow to "Get quotes in British Columbia"
   without pushing the select around. */
@media (min-width: 481px) {
	.quote-form__row .btn {
		flex: 0 0 auto;
		min-width: 15.5rem;
	}
}

/* =========================================================
   Round 4: cost teaser, browse index, builder rows, search note
   ========================================================= */

/* Preview bar: one line on phones */
.preview-bar__short {
	display: none;
}

/* Cost teaser: the phone's first visual promise, since the hero
   drawing is hidden there. Desktop already shows the drawing. */
.hero__teaser {
	display: none;
}

@media (max-width: 640px) {
	.preview-bar__long {
		display: none;
	}

	.preview-bar__short {
		display: inline;
	}

	.hero__teaser {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-sm);
		min-height: 44px;
		margin-top: var(--space-md);
		padding: var(--space-sm) 0;
		border-block: 1px solid var(--rule-strong);
		font-size: var(--fs-small);
		font-weight: var(--fw-medium);
	}

	.hero__teaser .t-num {
		font-family: var(--font-display);
		font-size: 1.125rem;
		font-weight: 400;
	}

	.hero__teaser .icon {
		flex: none;
		transition: transform var(--dur) var(--ease);
	}

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

/* Browse index: two facet groups plus a link on desktop, one link on phones */
.browse {
	grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 2fr);
	align-items: end;
}

.browse__all {
	justify-self: end;
}

.browse__phone {
	display: none;
	margin-top: var(--space-md);
}

@media (max-width: 640px) {
	.browse {
		display: none;
	}

	.browse__phone {
		display: block;
	}
}

/* Sample builder rows for the chosen location */
.builders-list {
	margin-top: var(--space-lg);
	max-width: 560px;
}

.builders-list__title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2xs);
	padding-bottom: var(--space-xs);
	border-bottom: 1px solid var(--ink);
	font-weight: var(--fw-strong);
}

.builders-list__rows li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--space-3xs) var(--space-sm);
	padding-block: var(--space-xs);
	border-bottom: 1px solid var(--rule);
}

.builders-list__rows strong {
	font-weight: var(--fw-medium);
}

.builders-list__rows .meta {
	grid-column: 1;
}

.builders-list__rows .builders-list__checks {
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: center;
	color: var(--muted);
	font-size: var(--fs-small);
	text-align: right;
}

.search-panel__note {
	min-height: 1.5em;
	margin-top: var(--space-sm);
	color: var(--muted);
}

.search-panel__note:empty {
	display: none;
}

/* =========================================================
   Filtered Journal (critique round 5)
   With fewer than three matching stories, the stories become
   compact rows beside Most read, and the topic's hub link sits
   right under the filters.
   ========================================================= */

.journal__hub {
	display: flex;
	justify-content: flex-end;
	margin: calc(var(--space-md) * -1) 0 var(--space-md);
}

.journal__hub[hidden] {
	display: none;
}

.journal__grid.is-compact .story.is-row {
	grid-column: 1 / span 8;
	padding-top: var(--space-md);
	border-top: 1px solid var(--rule);
}

.journal__grid.is-compact .story.is-row .story__link {
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: var(--space-md);
	align-items: start;
}

.journal__grid.is-compact .story.is-row .story__media {
	aspect-ratio: 4 / 3;
}

.journal__grid.is-compact .story.is-row .story__dek {
	display: block;
	font-size: var(--fs-small);
	line-height: var(--lh-small);
}

.journal__grid.is-compact > .most-read {
	grid-column: 9 / span 4;
	grid-row: 1 / span 3;
}

@media (max-width: 1100px) {
	.journal__grid.is-compact .story.is-row,
	.journal__grid.is-compact > .most-read {
		grid-column: 1 / -1;
		grid-row: auto;
	}
}

@media (max-width: 640px) {
	.journal__hub {
		justify-content: flex-start;
		margin-top: 0;
	}

	.journal__grid.is-compact .story.is-row .story__link {
		grid-template-columns: 104px 1fr;
		gap: var(--space-sm);
	}

	.journal__grid.is-compact .story.is-row .story__media {
		aspect-ratio: 1;
	}

	.journal__grid.is-compact .story.is-row .story__dek {
		display: none;
	}
}

/* =========================================================
   Phone hero: the plan drawing joins the cost teaser
   (critique round 5). The opening screen keeps no photograph,
   but now carries the brand's drawn moment, as desktop does.
   ========================================================= */

@media (max-width: 640px) {
	.hero__teaser {
		flex-wrap: wrap;
	}

	.hero__teaser-art {
		display: flex;
		flex: 0 0 100%;
		justify-content: center;
		padding: 8px;
		background: var(--paper);
		border: 1px solid var(--rule);
	}

	.hero__teaser-art .hero__drawing,
	.hero__teaser-art img {
		width: auto;
		max-width: 100%;
		height: 84px;
	}

	.hero__teaser-art img {
		mix-blend-mode: multiply;
		object-fit: contain;
	}

	.hero__teaser > span:not(.hero__teaser-art) {
		flex: 1;
	}
}
