/* See The Flow — DIY guides (checklist steps, progress, hub cards). */

.stf-hero .stf-eyebrow a { color: inherit; text-decoration: none; }
.stf-hero .stf-eyebrow a:hover { text-decoration: underline; }
ul.stf-diy-meta.wp-block-list,
.stf-diy-meta {
	display: flex;
	padding-left: 0;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 1.25rem;
	padding: 0;
	list-style: none;
}
.stf-diy-meta li {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--muted);
	font-size: .9rem;
	padding: .35rem .85rem;
}
.stf-diy-meta li strong { color: var(--wp--preset--color--contrast); }

/* Progress panel */
.stf-diy-progress {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	margin: 0 0 2rem;
	padding: 1.25rem 1.5rem;
	scroll-margin-top: 6rem;
}
.stf-diy-progress__label {
	font-weight: 700;
	margin: 0 0 .6rem;
}
.stf-diy-progress__bar {
	background: var(--wp--preset--color--surface);
	border-radius: 999px;
	height: 10px;
	overflow: hidden;
}
.stf-diy-progress__bar span {
	background: var(--wp--preset--color--primary);
	border-radius: 999px;
	display: block;
	height: 100%;
	transition: width .35s ease;
	width: 0;
}
.stf-diy-progress__note {
	color: var(--wp--preset--color--muted);
	font-size: .92rem;
	margin: .7rem 0 0;
}
.stf-diy-progress__reset {
	background: none;
	border: 0;
	color: var(--wp--preset--color--muted);
	cursor: pointer;
	font: inherit;
	font-size: .88rem;
	margin-top: .35rem;
	padding: 0;
	text-decoration: underline;
}
.stf-diy-progress__reset[hidden] { display: none; }

/* Steps */
.stf-diy .stf-diy-step {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	margin: 0 0 1.25rem;
	padding: 1.5rem 1.75rem 1.4rem;
	scroll-margin-top: 6rem;
	transition: border-color .2s ease, background-color .2s ease;
}
.stf-diy .stf-diy-step > :first-child { margin-top: 0; }
.stf-diy .stf-diy-step h2 {
	font-size: clamp(1.35rem, 2.6vw, 1.7rem);
	line-height: 1.25;
	padding-left: 2.6rem;
	position: relative;
}
.stf-diy .stf-diy-step h2::before {
	border: 2px solid var(--wp--preset--color--border);
	border-radius: 50%;
	content: "";
	height: 1.75rem;
	left: 0;
	position: absolute;
	top: .1em;
	width: 1.75rem;
}
.stf-diy .stf-diy-step code {
	background: var(--wp--preset--color--surface);
	border-radius: 6px;
	font-size: .92em;
	padding: .1em .4em;
	word-break: break-word;
}
.stf-diy .stf-diy-step.is-done {
	background: #f7fbf8;
	border-color: #9fcdb0;
}
.stf-diy .stf-diy-step.is-done h2::before {
	background: #2f8a55 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
	border-color: #2f8a55;
}

.stf-diy-check {
	background: var(--wp--preset--color--primary);
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	margin-top: .75rem;
	padding: .65rem 1.3rem;
	transition: background-color .15s ease, color .15s ease;
}
.stf-diy-check:hover { background: var(--wp--preset--color--primary-dark); border-color: var(--wp--preset--color--primary-dark); }
.stf-diy-check[aria-pressed="true"] {
	background: #fff;
	border-color: #2f8a55;
	color: #2f8a55;
}

/* Finish box: always visible without JavaScript; with it, shown once all steps are done. */
.stf-diy .stf-diy-finish {
	background: var(--wp--preset--color--tint);
	border-radius: 16px;
	margin: 2rem 0;
	padding: 1.75rem;
}
.stf-diy .stf-diy-finish > :first-child { margin-top: 0; }
.stf-diy.is-ready .stf-diy-finish { display: none; }
.stf-diy.is-ready.is-complete .stf-diy-finish { animation: stf-diy-pop .4s ease; display: block; }
@keyframes stf-diy-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Floating counter */
.stf-diy-pill {
	background: var(--wp--preset--color--contrast);
	border-radius: 999px;
	bottom: 1rem;
	box-shadow: 0 8px 24px rgba(29, 32, 38, .2);
	color: #fff;
	font-size: .9rem;
	font-weight: 700;
	padding: .55rem 1rem;
	position: fixed;
	right: 1rem;
	text-decoration: none;
	z-index: 40;
}
.stf-diy-pill[hidden] { display: none; }

/* Hub cards */
.stf-diy-card__progress {
	align-self: flex-start;
	background: #eaf5ee;
	border-radius: 999px;
	color: #2f8a55;
	font-size: .85rem;
	font-weight: 700;
	padding: .2rem .7rem;
}
.stf-diy-card__progress[hidden] { display: none; }
.stf-diy-card__meta { color: var(--wp--preset--color--muted); font-size: .9rem; }
.stf-diy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .stf-diy-grid { grid-template-columns: 1fr; } }

@media (max-width: 600px) {
	.stf-diy .stf-diy-step { padding: 1.25rem 1.1rem; }
	.stf-diy-check { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.stf-diy-progress__bar span, .stf-diy .stf-diy-step, .stf-diy-check { transition: none; }
	.stf-diy.is-ready.is-complete .stf-diy-finish { animation: none; }
}
