/**
 * Help Center - /support (issue #19).
 *
 * Two halves:
 *   1. Template furniture (.hc-hero, .hc-cat, .hc-rail, .hc-helpful).
 *   2. The hc-* article vocabulary that pasted HTML uses. Because article
 *      bodies are pasted rather than laid out per page, every visual decision
 *      about a step, a screenshot or a note lives HERE. Restyling forty
 *      articles is this file, not forty edits.
 *
 * Tokens are the theme's own (--ece-navy etc., declared in style.css); the
 * fallbacks keep this readable if the help center is ever rendered without it.
 */

.hc {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--hc-navy: var(--ece-navy, #1b3a5c);
	--hc-navy-soft: var(--ece-navy-soft, #eaf1f9);
	--hc-ink: var(--ece-ink, #1f2933);
	--hc-muted: var(--ece-muted, #5b6772);
	--hc-rule: var(--ece-rule, #dde4ec);
	--hc-orange: var(--ece-orange, #b8410e);
	--hc-orange-soft: var(--ece-orange-soft, #fbeee4);
	--hc-teal: var(--ece-teal, #0f6e63);
	--hc-teal-soft: var(--ece-teal-soft, #e4f3f0);
	--hc-paper: var(--ece-paper, #fff);

	color: var(--hc-ink);
	background: var(--hc-paper);
}

.hc-wrap {
	max-width: 1080px;
	margin: 0 auto;
	padding-inline: 20px;
}

/* ---------- hero ---------- */
.hc-hero {
	background: var(--hc-navy-soft);
	border-bottom: 1px solid var(--hc-rule);
	padding-block: 44px 38px;
	text-align: center;
}
.hc-hero h1 {
	margin: 0 0 8px;
	font-size: clamp(1.5rem, 3.4vw, 2.1rem);
	line-height: 1.2;
	color: var(--hc-navy);
	text-wrap: balance;
}
.hc-hero .hc-sub {
	margin: 0 auto 24px;
	max-width: 52ch;
	color: var(--hc-muted);
	font-size: 1rem;
}
.hc-hero .hc-crumb { justify-content: center; }

.hc-search {
	display: flex;
	max-width: 560px;
	margin: 0 auto;
	background: var(--hc-paper);
	border: 1px solid var(--hc-rule);
	border-radius: 10px;
	overflow: hidden;
}
.hc-search input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 13px 16px;
	font-size: 1rem;
	color: var(--hc-ink);
}
.hc-search input:focus { outline: none; }
.hc-search button {
	border: 0;
	background: var(--hc-navy);
	color: #fff;
	padding-inline: 24px;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
}
.hc-search button:hover { filter: brightness(1.1); }

/* ---------- index body ---------- */
.hc-body { padding-block: 34px 60px; }

.hc-label {
	margin: 0 0 16px;
	font-size: .75rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--hc-muted);
}
.hc-label-spaced { margin-top: 42px; }

.hc-cats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 14px;
}
.hc-cat {
	display: block;
	border: 1px solid var(--hc-rule);
	border-radius: 10px;
	padding: 18px 19px;
	text-decoration: none;
	color: inherit;
	background: var(--hc-paper);
}
.hc-cat:hover { border-color: var(--hc-navy); }
.hc-cat h2 {
	margin: 0 0 6px;
	font-size: 1.02rem;
	color: var(--hc-ink);
}
.hc-cat p {
	margin: 0 0 10px;
	font-size: .89rem;
	color: var(--hc-muted);
	line-height: 1.5;
}
.hc-cat .hc-n {
	font-size: .78rem;
	color: var(--hc-navy);
}

/* ---------- article lists ---------- */
.hc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--hc-rule);
	border-radius: 10px;
	overflow: hidden;
}
.hc-list li + li { border-top: 1px solid var(--hc-rule); }
.hc-list a {
	display: flex;
	align-items: baseline;
	gap: 14px;
	padding: 14px 18px;
	text-decoration: none;
	color: var(--hc-ink);
}
.hc-list a:hover { background: var(--hc-navy-soft); }
.hc-list .hc-t { flex: 1; font-size: .95rem; font-weight: 500; }
.hc-list .hc-m { flex: none; font-size: .78rem; color: var(--hc-muted); }

.hc-empty {
	border: 1px dashed var(--hc-rule);
	border-radius: 10px;
	padding: 28px 22px;
	text-align: center;
	color: var(--hc-muted);
}
.hc-empty p { margin: 0 0 6px; }
.hc-empty p:last-child { margin: 0; }

/* ---------- single article ---------- */
.hc-single .hc-wrap { padding-block: 22px 60px; }

.hc-crumb {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 18px;
	font-size: .82rem;
	color: var(--hc-muted);
}
.hc-crumb a { color: var(--hc-muted); text-decoration: none; }
.hc-crumb a:hover { color: var(--hc-navy); text-decoration: underline; }
.hc-crumb span { color: var(--hc-ink); }

.hc-cols {
	display: grid;
	grid-template-columns: 230px 1fr;
	gap: 40px;
	align-items: start;
}
/* One article in its topic: no rail, so the prose gets the whole width. */
.hc-norail .hc-cols { grid-template-columns: 1fr; }


.hc-rail {
	border-right: 1px solid var(--hc-rule);
	padding-right: 22px;
	position: sticky;
	top: 90px;
}
.hc-railhead {
	margin: 0 0 10px;
	font-size: .72rem;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--hc-muted);
}
.hc-rail nav a {
	display: block;
	padding: 5px 0;
	font-size: .9rem;
	color: var(--hc-muted);
	text-decoration: none;
	line-height: 1.4;
}
.hc-rail nav a:hover { color: var(--hc-navy); }
.hc-rail nav a.on { color: var(--hc-orange); font-weight: 600; }
.hc-railall {
	display: inline-block;
	margin-top: 14px;
	font-size: .82rem;
	color: var(--hc-navy);
}

.hc h1, .hc h2, .hc h3, .hc h4 { font-family: inherit; }

.hc-doc h1 {
	margin: 0 0 8px;
	font-size: clamp(1.4rem, 3vw, 1.95rem);
	line-height: 1.22;
	text-wrap: balance;
}
.hc-meta {
	margin: 0 0 26px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--hc-rule);
	font-size: .82rem;
	color: var(--hc-muted);
}
/* One reading size for the whole article. Steps and notes carry the actual
   instructions, so they must not be smaller than the intro paragraph. */
.hc-doc {
	font-size: 1.06rem;
	line-height: 1.7;
}
.hc-doc > p,
.hc-doc > ul,
.hc-doc > ol { margin-bottom: 16px; }
.hc-doc > h2 {
	font-size: 1.32rem;
	line-height: 1.3;
	margin: 38px 0 12px;
	text-wrap: balance;
}

/* ---------- the pasted-article vocabulary ---------- */

/* A numbered step. The counter is drawn here, so articles never hardcode
   numbers and inserting a step mid-article renumbers the rest for free. */
.hc-doc { counter-reset: hc-step; }
/* Each h2 starts a fresh procedure, so its steps restart at 1. Without this a
   second set of steps carries on from the first (4, 5, 6) and reads as one
   long sequence that the reader is already halfway through. */
.hc-doc h2 { counter-reset: hc-step; }
.hc-step {
	counter-increment: hc-step;
	display: grid;
	grid-template-columns: 30px 1fr;
	gap: 16px;
	margin-block: 0 26px;
}
.hc-step::before {
	content: counter(hc-step);
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--hc-navy);
	color: #fff;
	font-size: .85rem;
	font-weight: 600;
	display: grid;
	place-items: center;
	margin-top: 2px;
}
.hc-step > * { grid-column: 2; }
.hc-step h3 {
	margin: 0 0 8px;
	font-size: 1.12rem;
	line-height: 1.35;
}
.hc-step p { margin: 0 0 14px; }
.hc-doc p { max-width: none; }
.hc-step > *:last-child { margin-bottom: 0; }

/* A screenshot. Caption optional. Two side by side when wrapped in .hc-pair. */
.hc-shot {
	margin: 0 0 14px;
	border: 1px solid var(--hc-rule);
	border-radius: 8px;
	overflow: hidden;
	background: var(--hc-navy-soft);
}
.hc-shot img { display: block; width: 100%; height: auto; }
.hc-shot figcaption {
	padding: 8px 12px;
	font-size: .8rem;
	color: var(--hc-muted);
	border-top: 1px solid var(--hc-rule);
	background: var(--hc-paper);
}
/* Side by side, for two captures of SIMILAR shape (two phone-sized boxes, or
   two wide strips). Pairing a 1440-wide landscape shot with a 390-wide
   portrait one shrinks the landscape one until its buttons are unreadable, so
   the style guide tells authors to stack those instead. align-items keeps the
   shorter figure from stretching into dead space under its caption. */
.hc-pair {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 14px;
}
.hc-pair .hc-shot { flex: 1 1 0; min-width: 0; margin: 0; }

/* A phone capture shown on its own. Left at full width it dwarfs the text it
   belongs to, because the column is far wider than a phone. */
.hc-shot--phone { max-width: 300px; }

/* A phone capture with a line of text beside it. A narrow portrait image on
   its own leaves half the column empty and reads as a mistake; the sentence
   that would otherwise sit above it goes alongside instead. Stacks on a
   phone, where the text belongs above the image anyway. */
.hc-side {
	display: grid;
	/* The phone shot gets close to its native 390 so it stays readable, and the
	   text is capped to a sane measure instead of sprawling across the rest. */
	grid-template-columns: minmax(0, 1fr) minmax(250px, 350px);
	gap: 34px;
	/* Centred, not top-aligned: a two-line caption beside a tall portrait image
	   otherwise sits marooned in the top corner with dead space beneath it. */
	align-items: center;
	margin-bottom: 24px;
}
.hc-side .hc-side-text { max-width: 52ch; }
.hc-side .hc-side-text > :first-child { margin-top: 0; }
.hc-side .hc-side-text > :last-child { margin-bottom: 0; }
.hc-side .hc-shot { margin: 0; max-width: 100%; }

@media (max-width: 820px) {
	.hc-side { grid-template-columns: 1fr; gap: 14px; align-items: start; }
	.hc-side .hc-side-text { max-width: none; }
	.hc-side .hc-shot { max-width: 320px; }
}

/* A slot waiting for a screenshot. Visible on purpose: an author should see
   what is still missing, and it disappears the moment an <img> replaces it. */
.hc-shot--todo {
	border-style: dashed;
	background: var(--hc-navy-soft);
	padding: 22px 16px;
	text-align: center;
}
.hc-shot--todo b { display: block; font-size: .9rem; color: var(--hc-ink); margin-bottom: 4px; }
.hc-shot--todo span { font-size: .82rem; color: var(--hc-muted); }

/* An aside. Teal by default; .warn for the ones that cost money or time. */
.hc-note {
	margin: 0 0 20px;
	padding: 14px 17px;
	border-left: 3px solid var(--hc-teal);
	border-radius: 0 8px 8px 0;
	background: var(--hc-teal-soft);
	line-height: 1.65;
}
.hc-note :first-child { margin-top: 0; }
.hc-note :last-child { margin-bottom: 0; }
.hc-note.warn {
	border-left-color: var(--hc-orange);
	background: var(--hc-orange-soft);
}

/* ---------- helpful vote ---------- */
.hc-helpful {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 36px;
	padding-top: 22px;
	border-top: 1px solid var(--hc-rule);
}
.hc-helpful-q { font-size: .95rem; color: var(--hc-muted); }
.hc-helpful button {
	border: 1px solid var(--hc-rule);
	background: var(--hc-paper);
	color: var(--hc-ink);
	padding: 7px 20px;
	border-radius: 8px;
	font-size: .9rem;
	cursor: pointer;
}
.hc-helpful button:hover:not(:disabled) { border-color: var(--hc-navy); }
.hc-helpful button:disabled { opacity: .5; cursor: default; }
.hc-helpful-thanks { font-size: .95rem; color: var(--hc-teal); font-weight: 600; }

.hc-contact {
	margin-top: 22px;
	font-size: .9rem;
	color: var(--hc-muted);
}

/* ---------- phone ---------- */
@media (max-width: 880px) {
	.hc-cols { grid-template-columns: 1fr; gap: 22px; }
	.hc-rail {
		position: static;
		border-right: 0;
		border-bottom: 1px solid var(--hc-rule);
		padding-right: 0;
		padding-bottom: 18px;
	}
}
@media (max-width: 600px) {
	.hc-wrap { padding-inline: 16px; }
	.hc-hero { padding-block: 32px 28px; }
	.hc-cats { grid-template-columns: 1fr; }
	.hc-pair { grid-template-columns: 1fr; }
	.hc-list .hc-m { display: none; }
	.hc-step { grid-template-columns: 26px 1fr; gap: 12px; }
}
