/**
 * hostsnix/works-steps — frontend.
 * Values measured from the home page "How HostsNiX Works" section at 1440px.
 */

.hsx-ws {
	position: relative;
	padding-block: 24px;
	background-image: linear-gradient(hsl(var(--background)), hsl(var(--secondary) / 0.2));
}
@media (min-width: 768px) { .hsx-ws { padding-block: 40px; } }

.hsx-ws-inner {
	width: 100%;
	max-width: 72rem;
	margin-inline: auto;
	padding-inline: 24px;
}

/* ── Header ── */
.hsx-ws-head { text-align: center; margin-bottom: 16px; }
@media (min-width: 768px) { .hsx-ws-head { margin-bottom: 24px; } }

.hsx-ws-h2 {
	margin-bottom: 4px;
	font-size: 30px; line-height: 1.2;
	font-weight: 700;
	color: hsl(var(--foreground));
}
@media (min-width: 768px)  { .hsx-ws-h2 { font-size: 36px; margin-bottom: 8px; line-height: 40px;} }
@media (min-width: 1024px) { .hsx-ws-h2 { font-size: 48px; line-height: 48px;} }

.hsx-ws-intro {
	max-width: 42rem;
	margin-inline: auto;
	font-size: 16px; line-height: 24px;
	color: hsl(var(--muted-foreground));
}
@media (min-width: 768px)  { .hsx-ws-intro { font-size: 18px; line-height: 28px;} }
@media (min-width: 1024px) { .hsx-ws-intro { font-size: 20px; line-height: 28px;} }

/* ── Rail ──
   Hidden below md, where the accordion summaries are the navigation instead. */
.hsx-ws-rail { display: none; }

@media (min-width: 768px) {
	.hsx-ws-rail {
		position: relative;
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		margin-bottom: 32px;
		padding-inline: 8px;
	}

	/* The track stops 60px short at each end so it meets the first and last
	   node's centre rather than running past them. */
	.hsx-ws-track,
	.hsx-ws-progress {
		position: absolute;
		top: 24px;
		height: 2px;
	}
	.hsx-ws-track { left: 60px; right: 60px; background-color: hsl(var(--border)); }
	.hsx-ws-progress {
		left: 60px;
		width: 0;
		background-color: hsl(var(--primary));
		transition: width 0.5s cubic-bezier(0, 0, 0.2, 1);
	}

	.hsx-ws-step {
		position: relative;
		z-index: 10;
		display: flex;
		width: 140px;
		flex-shrink: 0;
		flex-direction: column;
		align-items: center;
		gap: 12px;
		padding-inline: 4px;
		text-decoration: none;
		cursor: pointer;
	}
}

.hsx-ws-node {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	width: 48px;
	flex-shrink: 0;
	border: 2px solid hsl(var(--border));
	border-radius: 9999px;
	background-color: #fff;
	color: hsl(var(--muted-foreground));
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.hsx-ws-node-svg { height: 20px; width: 20px; }

.hsx-ws-step.is-active .hsx-ws-node,
.hsx-ws-panel[open] .hsx-ws-node {
	border-color: transparent;
	background-color: hsl(var(--primary));
	color: #fff;
	box-shadow: 0 10px 15px -3px hsl(var(--primary) / 0.3), 0 4px 6px -4px hsl(var(--primary) / 0.3);
}

.hsx-ws-step-label {
	font-size: 13px;
	line-height: 1.375;
	font-weight: 600;
	text-align: center;
	color: hsl(var(--muted-foreground));
	transition: color 0.2s ease;
}
.hsx-ws-step.is-active .hsx-ws-step-label { color: hsl(var(--primary)); }

/* ── Accordion summary — the navigation below md ── */
.hsx-ws-panels { display: flex; flex-direction: column; gap: 12px; }

.hsx-ws-panel { border-radius: 16px; }

.hsx-ws-summary {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
	cursor: pointer;
	list-style: none;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.6);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset,
		0 12px 32px -14px hsl(var(--primary) / 0.16);
}
.hsx-ws-summary::-webkit-details-marker { display: none; }

.hsx-ws-node--sm { height: 40px; width: 40px; }
.hsx-ws-node--sm .hsx-ws-node-svg { height: 18px; width: 18px; }

.hsx-ws-summary-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left; }

/* text-base font-bold truncate on the live accordion header: 16/24, not 15/1.3.
   Only visible below md, which is why it went unnoticed until the tool-page
   harness compared it. */
.hsx-ws-summary-title {
	font-size: 16px;
	line-height: 24px;
	font-weight: 700;
	color: hsl(var(--foreground));
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hsx-ws-chev {
	margin-left: auto;
	height: 18px;
	width: 18px;
	flex-shrink: 0;
	color: hsl(var(--muted-foreground));
	transition: transform 0.2s ease;
}
.hsx-ws-panel[open] .hsx-ws-chev { transform: rotate(180deg); }

/* ── Panel body ── */
.hsx-ws-card { border-radius: 16px; padding: 20px; margin-top: 12px; }

@media (min-width: 768px) {
	/* From md the summaries are gone and the rail drives the panels, so every
	   panel occupies the same grid cell and only the open one is visible. */
	.hsx-ws-panels { display: grid; gap: 0; }
	.hsx-ws-summary { display: none; }
	.hsx-ws-panel { grid-column: 1; grid-row: 1; }
	.hsx-ws-panel:not([open]) { visibility: hidden; pointer-events: none; }
	.hsx-ws-card { margin-top: 0; padding: 32px; }
}
@media (min-width: 1024px) { .hsx-ws-card { padding: 40px; } }

/* A closed <details> hides its body natively; this keeps that true above md
   too, where the element is a grid cell rather than a flow item. */
.hsx-ws-panel:not([open]) .hsx-ws-card { display: none; }
@media (min-width: 768px) { .hsx-ws-panel:not([open]) .hsx-ws-card { display: block; } }

.hsx-ws-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 1024px) {
	.hsx-ws-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 220px; gap: 32px; }
}

.hsx-ws-copy { min-width: 0; }
.hsx-ws-copy-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }

/* Two classes, because .hsx-bubble sets height/width at the same specificity
   and whichever stylesheet loads second would otherwise win. */
.hsx-ws-copy-head .hsx-ws-bubble { height: 56px; width: 56px; border-radius: 16px; }
.hsx-ws-bubble-svg { height: 24px; width: 24px; }

.hsx-ws-eyebrow {
	display: block;
	font-size: 12px;
	line-height: 16px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: hsl(var(--primary));
}

.hsx-ws-title { font-size: 24px; line-height: 32px; font-weight: 700; color: hsl(var(--foreground)); }

.hsx-ws-text { font-size: 16px; line-height: 1.625; color: hsl(var(--muted-foreground)); }

.hsx-ws-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.hsx-ws-chip {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	border: 1px solid hsl(var(--border) / 0.4);
	border-radius: 12px;
	background-color: hsl(var(--secondary) / 0.4);
	padding: 12px 16px;
	font-size: 14px;
	line-height: 1.4;
	color: hsl(var(--foreground));
	transition: border-color 0.2s ease;
}
.hsx-ws-chip:hover { border-color: hsl(var(--primary) / 0.3); }

.hsx-ws-chip-dot {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	width: 24px;
	flex-shrink: 0;
	margin-top: 2px;
	border-radius: 9999px;
	background-color: hsl(var(--primary) / 0.1);
	color: hsl(var(--primary));
}
.hsx-ws-chip-svg { height: 14px; width: 14px; }

.hsx-ws-art-wrap { display: none; }
@media (min-width: 1024px) { .hsx-ws-art-wrap { display: flex; align-items: center; justify-content: center; } }

.hsx-ws-art { display: block; width: 100%; max-width: 220px; color: hsl(var(--primary)); }
.hsx-ws-art svg {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 18px 30px rgba(16, 185, 129, 0.18));
}

