/* =====================================================================
   /for-stations/ — the page for people who run a station

   Most of this page is built from the vocabulary in sections.css: the
   full-bleed gradient hero, the laptop frame, the code window, the tabs, the
   FAQ, the owner-cta banner at the end. What lives here is the handful of
   patterns that page needs and no other page has — a numbered sequence, a
   field list, and a table of HTTP headers.

   The audience is different from the rest of the site: somebody who runs a
   stream is reading this to find out what is required of them, in what
   format, and what it costs. So it is denser and plainer than the listener
   pages — closer to documentation than to a pitch — and the type sizes below
   are set for reading rather than for scanning.
   ===================================================================== */

/* The hero's own clearance under the fixed nav. The full-bleed panel does
   not get it from .component, which is where every other page gets it. */
#top.component-full {
	padding-top: var(--nav-h);
	border-bottom: 0;
}

.st-hero-ctas {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 2rem;
}

.st-hero-note {
	margin: 1rem 0 0;
	font-size: 0.875rem;
	color: var(--text-muted);
}

/* ---- the three-up strip under the hero ---------------------------- */

.st-trust {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.5rem;
}

.st-trust-item {
	padding-left: 1rem;
	border-left: 2px solid var(--accent-2);
}

.st-trust-item h3 {
	margin: 0 0 0.4rem;
	font-size: 1rem;
	font-weight: 650;
	text-transform: none;
}

.st-trust-item p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--text-muted);
}

/* ---- what your station gets --------------------------------------- */

.st-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
	gap: 1rem;
	margin-top: 2.5rem;
}

.st-card {
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--bg-card);
}

.st-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 650;
	text-transform: none;
}

.st-card p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--text-muted);
}

/* ---- the three steps ----------------------------------------------
   Numbered because the order is real: adding a station before checking
   whether it is already there is how a duplicate gets made, which is work
   for a volunteer rather than for us. The numbers are decoration only in
   the sense that a screen reader gets them from the <ol> instead. */

.st-steps {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 2.5rem 0 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.st-step {
	display: flex;
	gap: 1.25rem;
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--bg-elevated);
}

.st-step-n {
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-family: var(--font-display);
	font-size: 1.5rem;
	line-height: 1;
}

.st-step-body {
	min-width: 0;
}

.st-step-body h3 {
	margin: 0 0 0.4rem;
	font-size: 1.125rem;
	font-weight: 650;
	text-transform: none;
}

.st-step-body p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--text-muted);
	max-width: 62ch;
}

.st-step-link {
	display: inline-block;
	margin-top: 0.85rem;
	color: var(--accent-2);
	font-size: 0.9375rem;
	font-weight: 600;
}

.st-step-link:hover {
	text-decoration: underline;
}

/* The hint is part of the link's sentence, not a second link. Saying where a
   link goes before it is clicked is the cheapest courtesy on a page like
   this — two of these leave the site. */
.st-step-hint {
	margin-left: 0.4rem;
	color: var(--text-faint);
	font-weight: 400;
}

/* ---- what you will need ------------------------------------------- */

.st-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
	gap: 1px;
	margin-top: 2.5rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--border);
	overflow: hidden;
}

.st-field {
	padding: 1.25rem 1.5rem;
	background: var(--bg);
}

.st-field-head {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	margin-bottom: 0.35rem;
}

.st-field h3 {
	margin: 0;
	font-size: 1rem;
	font-weight: 650;
	text-transform: none;
}

.st-req {
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent-2);
}

.st-field p {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--text-muted);
}

.st-note {
	margin-top: 1.5rem;
	padding: 1.5rem;
	border: 1px solid var(--accent-soft);
	border-radius: var(--radius-lg);
	background: var(--accent-soft);
}

.st-note h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 650;
	text-transform: none;
}

.st-note p {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	max-width: 78ch;
}

/* ---- own your listing --------------------------------------------- */

.st-own {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2.5rem;
	align-items: start;
	margin-top: 2.5rem;
}

@media (max-width: 860px) {
	.st-own {
		grid-template-columns: 1fr;
	}
}

/* A grid item's minimum size is its content by default, and one of these
   contains a table of header names that do not wrap — which on a phone made
   the whole page 100px wider than the screen instead of scrolling the table
   inside its own box. */
.st-own-copy,
.st-own-code {
	min-width: 0;
}

.st-own-copy p {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	line-height: 1.7;
	color: var(--text-muted);
	max-width: 62ch;
}

.st-own-copy code,
.st-headers code {
	padding: 0.1rem 0.35rem;
	border-radius: 0.3rem;
	background: var(--bg-card);
	color: var(--accent-2);
	font-size: 0.875em;
}

.st-own-hls {
	color: var(--text-faint) !important;
}

.st-headers {
	width: 100%;
	margin: 1.5rem 0;
	border-collapse: collapse;
	font-size: 0.875rem;
	/* No scrolling box: a region that scrolls has to be reachable from the
	   keyboard, and this one was not. The header names never wrap; the
	   examples wrap anywhere instead (below), which keeps a phone's page
	   inside its width. */
	table-layout: fixed;
}

.st-headers th {
	padding: 0.5rem 0.75rem 0.5rem 0;
	text-align: left;
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-faint);
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

.st-headers td {
	padding: 0.5rem 0.75rem 0.5rem 0;
	border-bottom: 1px solid var(--border-soft);
	white-space: nowrap;
}

.st-headers td + td,
.st-headers th + th {
	width: 58%;
	white-space: normal;
	overflow-wrap: anywhere;
}

/* The server snippets wrap rather than scroll, for the same reason as the
   table: nothing here should need a scrollbar that a keyboard cannot reach.
   pre-wrap keeps the indentation, and a copied snippet is unchanged. */
.st-own .code-snippet {
	overflow-x: visible;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.st-own-alt {
	font-size: 0.875rem !important;
}

/* ---- what we do with your stream ---------------------------------- */

.st-plain {
	max-width: 62ch;
}

.st-plain h2 {
	margin: 0 0 1rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.st-plain p {
	margin: 0 0 1rem;
	font-size: 1rem;
	line-height: 1.7;
	color: var(--text-muted);
}

/* ---- the end ------------------------------------------------------- */

.st-end-ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.owner-cta p {
	margin: 0.5rem 0 0;
	color: var(--text-muted);
	max-width: 46ch;
}

/* Where the facts on this page came from. Small, but present: the field list
   and the header names are somebody else's documentation, and a station
   owner acting on them deserves to know when it was last read. */
.st-sources {
	margin: 2rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.6;
	color: var(--text-faint);
	max-width: 78ch;
}

.st-sources strong {
	color: var(--text-muted);
}

/* .btn never wraps, which is right for a short label and wrong for a long
   translated one: on a 390px phone the Spanish owner-guide link ran 5px past
   the edge and the whole page scrolled sideways. Only the page body, only
   narrow screens. */
@media (max-width: 480px) {
	main .btn {
		max-width: 100%;
		white-space: normal;
		text-align: center;
	}
}
