/* ---------------------------------------------------------------------------
 * Front page — section 6 "Half a million products. No timeouts." (dark band).
 *
 * Merged into main.css at the end of the pass.
 *
 * What the reviews found, and what changed here:
 *  · The band was a 1009px full-viewport slab carrying four paragraphs and one
 *    192px card. The card sat centred in a 520px column with ~164px of void
 *    above and below it. The two-column split is gone: head → full-width
 *    console → a four-across row of iconographed points, on --compact padding.
 *  · The 63-tick meter was a `repeat(auto-fill, minmax(10px,1fr))` grid, so it
 *    wrapped to two rows at 768 and three (with an empty third) at 360. It is
 *    now one nowrap flex row of `flex:1 1 0; min-width:0` ticks that compress
 *    to hairlines instead of wrapping.
 *  · The band had no iconography. Four conceptual line icons now sit on the
 *    points, one stroke weight, currentColor.
 *
 * Only tokens from main.css are used — no new shadow recipes, no new colours.
 * ------------------------------------------------------------------------ */

/* --- Head: H2 and lead side by side, so this band does not open with the
       same eyebrow → H2 → lead stack as every other section. --------------- */
.sf-scale .sf-scale__head { margin-bottom: var(--sf-space-6); }
.sf-scale .sf-scale__head .sf-h2 { margin: var(--sf-space-2) 0 0; }
.sf-scale .sf-scale__lead { margin: var(--sf-space-4) 0 0; max-width: 46ch; }

@media (min-width: 900px) {
	.sf-scale .sf-scale__head {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: var(--sf-space-8);
		align-items: end;
		margin-bottom: var(--sf-space-5);
	}
	.sf-scale .sf-scale__lead { margin: 0 0 6px; }
}

/* --- The console panel ---------------------------------------------------- */
.sf-scale__console { margin-top: 0; }

.sf-runbox {
	position: relative;
	border: 1px solid var(--sf-dark-line);
	border-radius: var(--sf-r-lg);
	background: linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .028));
	box-shadow: var(--sf-e4), inset 0 1px 0 rgba(255, 255, 255, .10);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	overflow: hidden;
}
/* Brand hairline along the top edge, following the corner radius. */
.sf-runbox::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: 0;
	height: 2px;
	background: var(--sf-grad-brand);
	border-start-start-radius: inherit;
	border-start-end-radius: inherit;
	pointer-events: none;
}

.sf-runbox__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--sf-space-2) var(--sf-space-3);
	padding: 12px var(--sf-space-4);
	border-bottom: 1px solid var(--sf-dark-line);
	background: rgba(255, 255, 255, .035);
}
.sf-runbox__dots { display: flex; gap: 6px; flex: none; }
.sf-runbox__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .26); }
.sf-runbox__title { color: var(--sf-on-dark); font-size: 0.9375rem; }
.sf-runbox__title strong { font-weight: 600; }
.sf-runbox__count {
	margin-inline-start: auto;
	font-family: var(--sf-font-mono);
	font-size: 0.75rem;
	color: var(--sf-on-dark-muted);
}

/* --- Progress track: ONE fixed-height row, never wraps --------------------- */
.sf-runbox__track { padding: 14px var(--sf-space-4); }
.sf-btrack {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 2px;
	height: 26px;
	width: 100%;
}
.sf-btrack i {
	flex: 1 1 0;
	min-width: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, .13);
}
.sf-btrack i.is-done { background: var(--sf-on-dark-brand); box-shadow: 0 0 10px rgba(165, 180, 252, .16); }
.sf-btrack i.is-active {
	background: var(--sf-cyan);
	box-shadow: 0 0 0 1px rgba(34, 211, 238, .5), 0 0 16px rgba(34, 211, 238, .55);
	animation: sf-btrack-pulse 2.4s var(--sf-ease) infinite;
}
@keyframes sf-btrack-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: .55; }
}

/* --- Panes: run log + memory trace ---------------------------------------- */
.sf-runbox__body {
	display: grid;
	gap: var(--sf-space-4);
	padding: 0 var(--sf-space-4) 14px;
}
/* The two panes sit side by side from 600 up — stacking them cost ~180px of
   band height on tablets for no gain; the log rows are only ~15 characters. */
@media (min-width: 600px) {
	.sf-runbox__body { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
}
@media (min-width: 1100px) {
	.sf-runbox__body { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); }
}

.sf-runbox__pane {
	border: 1px solid var(--sf-dark-line);
	border-radius: var(--sf-r);
	background: rgba(3, 6, 16, .46);
	padding: 14px var(--sf-space-4);
}
.sf-runbox__cap {
	display: flex;
	justify-content: space-between;
	gap: var(--sf-space-3);
	margin: 0 0 var(--sf-space-3);
	font-family: var(--sf-font-mono);
	font-size: 0.6875rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sf-on-dark-muted);
}
.sf-runbox__cap-alt { color: var(--sf-on-dark-brand); }

.sf-runlog {
	list-style: none;
	margin: 0;
	padding: 0;
	font-family: var(--sf-font-mono);
	font-size: 0.75rem;
	line-height: 1.5;
}
.sf-runlog li {
	display: flex;
	align-items: center;
	gap: var(--sf-space-3);
	padding: 3px 0;
	color: var(--sf-on-dark-muted);
}
.sf-runlog li + li { border-top: 1px solid rgba(255, 255, 255, .05); }
.sf-runlog li::before {
	content: "";
	width: 7px; height: 7px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .18);
	flex: none;
}
.sf-runlog .is-done::before { background: var(--sf-on-dark-brand); }
.sf-runlog .is-active::before { background: var(--sf-cyan); }
.sf-runlog__k { color: var(--sf-on-dark); }
.sf-runlog__s { margin-inline-start: auto; }
.sf-runlog .is-active .sf-runlog__s { color: var(--sf-cyan); }

.sf-runbox__pane--mem { display: flex; flex-direction: column; }
.sf-memspark {
	display: block;
	width: 100%;
	height: 80px;
	flex: 1 1 auto;
	color: var(--sf-on-dark-brand);
	overflow: visible;
}
.sf-runbox__memfoot {
	margin: var(--sf-space-3) 0 0;
	font-family: var(--sf-font-mono);
	font-size: 0.6875rem;
	letter-spacing: .04em;
	color: var(--sf-on-dark-muted);
}

.sf-runbox__notes {
	display: flex;
	flex-wrap: wrap;
	gap: 8px var(--sf-space-5);
	margin: 0;
	padding: 10px var(--sf-space-4);
	border-top: 1px solid var(--sf-dark-line);
	background: rgba(255, 255, 255, .03);
	list-style: none;
	font-family: var(--sf-font-mono);
	font-size: 0.75rem;
	color: var(--sf-on-dark-muted);
}
.sf-runbox__notes li { display: flex; align-items: center; gap: 8px; }
.sf-runbox__notes li::before {
	content: "";
	width: 5px; height: 5px;
	border-radius: 50%;
	background: var(--sf-on-dark-brand);
	flex: none;
}

/* --- The four points: a row, not a stacked column ------------------------- */
.sf-scale .sf-scale__facts {
	display: grid;
	gap: var(--sf-space-5) var(--sf-space-6);
	margin: var(--sf-space-5) 0 0;
}
@media (min-width: 620px) { .sf-scale .sf-scale__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .sf-scale .sf-scale__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sf-space-6); } }

.sf-scale .sf-scale__fact {
	position: relative;
	margin-top: 0;
	padding-top: var(--sf-space-4);
	border-top: 1px solid var(--sf-dark-line);
}
.sf-scale .sf-scale__fact::before {
	content: "";
	position: absolute;
	inset-block-start: -1px;
	inset-inline-start: 0;
	width: 34px;
	height: 2px;
	border-radius: 2px;
	background: var(--sf-on-dark-brand);
}
/* Chips pin to the top of every dt so the four columns share one chip line;
   the term gets a computed top pad that centres its FIRST line on the 36px
   chip, so one- and two-line headings still share a first-line baseline. */
.sf-scale .sf-scale__fact dt {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--sf-on-dark);
}
.sf-scale .sf-scale__term {
	padding-top: calc((36px - 1.35em) / 2);
	text-wrap: balance;
}
/* Where columns sit side by side AND the long headings wrap (narrow two-col
   620–767, and four-across from 1000), reserve a two-line heading block so
   every dd starts on the same row. 768–999 stays tight: all headings fit one
   line there. */
@media (min-width: 620px) and (max-width: 767px), (min-width: 1000px) {
	.sf-scale .sf-scale__term { min-height: calc((36px - 1.35em) / 2 + 2.7em); }
}
.sf-scale .sf-scale__fact dd {
	margin: 10px 0 0;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--sf-on-dark-muted);
}
.sf-scale__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid var(--sf-dark-line);
	background: rgba(255, 255, 255, .055);
	color: var(--sf-on-dark-brand);
	flex: none;
}
.sf-scale__icon svg { width: 20px; height: 20px; display: block; }

/* --- Narrow screens ------------------------------------------------------- */
@media (max-width: 600px) {
	.sf-btrack { gap: 1px; height: 32px; }
	.sf-btrack i { border-radius: 1px; }
	.sf-runbox__bar { padding: 12px var(--sf-space-3); }
	.sf-runbox__count { margin-inline-start: 0; }
	.sf-runbox__track { padding: var(--sf-space-4) var(--sf-space-3) var(--sf-space-3); }
	.sf-runbox__body { padding: 0 var(--sf-space-3) var(--sf-space-3); }
	.sf-runbox__notes { padding: var(--sf-space-3); }
	.sf-runlog { font-size: 0.6875rem; }
	.sf-memspark { height: 62px; }
}

@media (prefers-reduced-motion: reduce) {
	.sf-btrack i.is-active { animation: none; opacity: 1; }
}
