/*
 * Quarkcademy layout.
 * Uses Knowlifi's own look: Poppins, accent #e44d30, cream #f8f4ef, black text,
 * square corners and dashed dividers. Only structure comes from the client prototype.
 */

:root {
	--qc-accent: #e44d30;
	--qc-accent-dark: #c43a20;
	--qc-accent-tint: rgba(228, 77, 48, 0.09);
	--qc-ink: #0a0a0a;
	--qc-muted: #5d5b57;
	--qc-bg: #f8f4ef;
	--qc-card: #fff;
	--qc-line: rgba(10, 10, 10, 0.14);
	--qc-dash: #ddd;
	--qc-header: 84px; /* sticky sidebar offset */
}

/* The theme's centred title band is replaced by our own page heads. */
body.qc-page .knowlifi-breadcrumbs { display: none; }
body.qc-page #knowlifi-site-content { background: var(--qc-bg); }

.qc-main { color: var(--qc-ink); font-size: 16px; line-height: 1.6; }
.qc-main *, .qc-main *::before, .qc-main *::after { box-sizing: border-box; }
.qc-main a { text-decoration: none; }
.qc-main :focus-visible { outline: 3px solid var(--qc-ink); outline-offset: 2px; }

.qc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- type */
.qc-eyebrow {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--qc-accent-dark);
}
.qc-h2 {
	margin: 0;
	font-size: clamp(28px, 3.2vw, 40px) !important;
	line-height: 1.15 !important;
	font-weight: 600;
	letter-spacing: -0.01em;
}
.qc-lead { margin: 16px 0 0; max-width: 680px; font-size: 18px; line-height: 1.7; color: var(--qc-muted); }
.qc-accent { color: var(--qc-accent); }

/* ------------------------------------------------------ buttons, chips */
.qc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 27px;
	border: 1px solid var(--qc-accent);
	border-radius: 0;
	background: var(--qc-accent);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.qc-btn:hover, .qc-btn:focus-visible { background: var(--qc-ink); border-color: var(--qc-ink); color: #fff; }
.qc-btn--ghost { background: transparent; color: var(--qc-ink); border-color: var(--qc-ink); }
.qc-btn--ghost:hover, .qc-btn--ghost:focus-visible { background: var(--qc-ink); color: #fff; }
.qc-btn--sm { padding: 9px 18px; font-size: 14px; }

.qc-badge {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid var(--qc-line);
	background: transparent;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--qc-ink);
}
.qc-badge--accent { background: var(--qc-accent-tint); border-color: transparent; color: var(--qc-accent-dark); }

.qc-link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--qc-ink); }
.qc-link-arrow i { color: var(--qc-accent); transition: transform 0.15s; }
.qc-link-arrow:hover { color: var(--qc-accent-dark); }
.qc-link-arrow:hover i { transform: translateX(4px); }

/* --------------------------------------------------------- crumbs, page head */
.qc-crumbs { padding: 22px 0 0; font-size: 14px; }
.qc-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--qc-muted); }
.qc-crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.qc-crumbs a { color: var(--qc-ink); }
.qc-crumbs a:hover { color: var(--qc-accent-dark); }
.qc-crumbs [aria-current] { color: var(--qc-muted); }

.qc-pagehead { padding: 8px 0 44px; border-bottom: 2px dashed var(--qc-dash); }
.qc-pagehead__body { padding-top: 28px; max-width: 760px; }
.qc-pagehead__title { margin: 0; font-size: clamp(34px, 5vw, 56px) !important; line-height: 1.08 !important; font-weight: 600; letter-spacing: -0.02em; }
.qc-pagehead__lead { margin: 16px 0 0; font-size: 18px; line-height: 1.7; color: var(--qc-muted); }
.qc-pagehead__lead p { margin: 0 0 0.6em; }

/* ----------------------------------------------------------------- sections */
.qc-section { padding: 84px 0; }
.qc-section--tight { padding: 56px 0; }
.qc-section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 44px; }

/* --------------------------------------------------------------- hero, search */
.qc-hero { position: relative; overflow: hidden; padding: 100px 0 108px; text-align: center; border-bottom: 2px dashed var(--qc-dash); }
.qc-hero .container { position: relative; z-index: 1; }
.qc-orbit {
	position: absolute;
	left: 50%;
	top: 50%;
	width: min(760px, 150vw);
	aspect-ratio: 1;
	border: 1px solid var(--qc-line);
	border-radius: 50%;
	pointer-events: none;
	transform: translate(-50%, -50%) rotate(0deg);
	animation: qc-orbit 70s linear infinite;
}
.qc-orbit::after {
	content: "";
	position: absolute;
	top: -7px;
	left: 50%;
	width: 14px;
	height: 14px;
	margin-left: -7px;
	border-radius: 50%;
	background: var(--qc-accent);
}
.qc-orbit--outer { width: min(1180px, 240vw); animation-duration: 110s; animation-direction: reverse; }
.qc-orbit--outer::after { background: var(--qc-ink); width: 10px; height: 10px; top: -5px; margin-left: -5px; }
@keyframes qc-orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qc-orbit { animation: none; } }

.qc-hero__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 24px;
	padding: 6px 16px;
	border: 1px solid var(--qc-ink);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	background: var(--qc-bg);
}
.qc-hero__pill i { color: var(--qc-accent); }
.qc-hero__title { margin: 0 auto 24px; max-width: 900px; font-size: clamp(40px, 6.4vw, 76px) !important; line-height: 1.03 !important; font-weight: 600; letter-spacing: -0.03em; }
.qc-hero__lead { margin: 0 auto 40px; max-width: 680px; font-size: 18px; line-height: 1.7; color: var(--qc-muted); }

.qc-search { position: relative; max-width: 680px; margin: 0 auto; text-align: left; }
.qc-search__box { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--qc-ink); }
.qc-search__icon { display: flex; align-items: center; padding: 0 4px 0 18px; color: var(--qc-muted); }
.qc-search__input {
	flex: 1;
	min-width: 0;
	height: 58px;
	padding: 0 16px;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: 16px;
	line-height: 1;
	color: var(--qc-ink);
}
.qc-search__input:focus { outline: none; }
.qc-search__box:focus-within { outline: 3px solid var(--qc-ink); outline-offset: 2px; }
.qc-search__btn { padding: 0 30px; border: 0; border-radius: 0; background: var(--qc-accent); color: #fff; font-family: inherit; font-size: 16px; font-weight: 500; line-height: 1; cursor: pointer; }
.qc-search__btn:hover { background: var(--qc-ink); }
.qc-search__results {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	z-index: 20;
	max-height: 340px;
	overflow-y: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--qc-ink);
	box-shadow: 0 18px 40px rgba(10, 10, 10, 0.14);
}
.qc-search__results[hidden] { display: none; }
.qc-search__results a, .qc-search__empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; color: var(--qc-ink); font-size: 15px; }
.qc-search__results a:hover, .qc-search__results a.is-active { background: var(--qc-accent-tint); }
.qc-search__type { flex-shrink: 0; padding: 2px 8px; border: 1px solid var(--qc-line); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--qc-muted); }
.qc-search__empty { color: var(--qc-muted); }

.qc-topics { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 32px; }
.qc-topics__label { margin-right: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--qc-muted); }
.qc-chip { display: inline-block; padding: 7px 14px; border: 1px solid var(--qc-line); background: #fff; font-size: 14px; font-weight: 500; color: var(--qc-ink); transition: border-color 0.15s, background 0.15s; }
.qc-chip:hover { border-color: var(--qc-ink); }
.qc-chip--accent { background: var(--qc-accent-tint); border-color: transparent; color: var(--qc-accent-dark); font-weight: 600; }
.qc-chip--accent:hover { background: var(--qc-accent); color: #fff; }

/* ------------------------------------------------------------------- stats */
.qc-stats { border-bottom: 2px dashed var(--qc-dash); background: #fff; }
.qc-stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.qc-stat { padding: 40px 16px; text-align: center; }
.qc-stat + .qc-stat { border-left: 1px dashed var(--qc-dash); }
.qc-stat__num { display: block; font-size: clamp(34px, 4.4vw, 52px); line-height: 1; font-weight: 600; letter-spacing: -0.02em; color: var(--qc-accent); }
.qc-stat__label { display: block; margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--qc-muted); }

/* -------------------------------------------------------------------- cards */
.qc-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.qc-card { display: flex; flex-direction: column; background: var(--qc-card); border: 1px solid var(--qc-line); transition: border-color 0.18s, transform 0.18s; }
.qc-card:hover { border-color: var(--qc-ink); transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .qc-card:hover { transform: none; } }

.qc-chapter-card { padding: 28px; border-top: 4px solid var(--qc-accent); }
.qc-chapter-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.qc-chapter-card__count { font-size: 13px; font-weight: 500; color: var(--qc-muted); }
.qc-chapter-card__count i { margin-right: 6px; color: var(--qc-accent); }
.qc-card__title { margin: 0 0 12px; font-size: 22px !important; line-height: 1.25 !important; font-weight: 600; letter-spacing: -0.01em; }
.qc-card__title a { color: var(--qc-ink); }
.qc-card__title a:hover { color: var(--qc-accent-dark); }
.qc-card__text { flex: 1; margin: 0 0 24px; font-size: 15px; line-height: 1.7; color: var(--qc-muted); }
.qc-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px dashed var(--qc-dash); }

.qc-sim-card { overflow: hidden; }
.qc-sim-card__media { position: relative; display: block; aspect-ratio: 16 / 9; background: #0a0a0a; overflow: hidden; }
.qc-sim-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.qc-sim-card:hover .qc-sim-card__media img { transform: scale(1.04); }
.qc-thumb-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 44px; color: var(--qc-accent); background: radial-gradient(circle at 30% 20%, #2a2a2a, #0a0a0a 70%); }
.qc-sim-card__play { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--qc-accent); color: #fff; font-size: 14px; }
.qc-sim-card__body { display: flex; flex: 1; flex-direction: column; padding: 22px 24px 24px; }
.qc-sim-card__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.qc-sim-card .qc-card__text { margin-bottom: 20px; }

.qc-empty { padding: 48px 32px; border: 2px dashed var(--qc-dash); background: rgba(255, 255, 255, 0.6); text-align: center; }
.qc-empty h2 { margin: 0 0 10px; font-size: 24px !important; font-weight: 600; }
.qc-empty p { max-width: 520px; margin: 0 auto 22px; color: var(--qc-muted); }
.qc-empty .qc-btn + .qc-btn { margin-left: 8px; }

/* --------------------------------------------------------------- CTA band */
.qc-cta { padding: 72px 0; background: var(--qc-ink); color: #fff; }
.qc-cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.qc-cta h2 { margin: 0 0 10px; font-size: clamp(26px, 3vw, 36px) !important; line-height: 1.2 !important; font-weight: 600; color: #fff; }
.qc-cta p { margin: 0; max-width: 560px; color: rgba(255, 255, 255, 0.72); }
.qc-cta .qc-btn:hover { background: #fff; border-color: #fff; color: var(--qc-ink); }

/* ------------------------------------------------- chapter page: layout */
.qc-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; padding: 28px 0 90px; }

.qc-sidebar { position: sticky; top: calc(var(--qc-header) + 16px); max-height: calc(100vh - var(--qc-header) - 32px); overflow-y: auto; }
.qc-sidebar__label { margin: 0 0 10px; padding: 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--qc-muted); }
.qc-chapter-nav { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.qc-chapter-nav a { display: flex; align-items: baseline; gap: 12px; padding: 12px 14px; border: 1px solid transparent; font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--qc-ink); transition: background 0.15s, border-color 0.15s; }
.qc-chapter-nav a:hover { background: #fff; border-color: var(--qc-line); }
.qc-chapter-nav__num { flex-shrink: 0; min-width: 1.4em; font-weight: 600; color: var(--qc-accent-dark); }
.qc-chapter-nav a[aria-current="page"] { background: var(--qc-accent); border-color: var(--qc-accent); color: #fff; font-weight: 600; }
.qc-chapter-nav a[aria-current="page"] .qc-chapter-nav__num { color: #fff; }
.qc-sidebar__other { margin: 22px 0 0; padding-top: 18px; border-top: 1px dashed var(--qc-dash); font-size: 14px; color: var(--qc-muted); }
.qc-sidebar__other a { display: inline-block; margin: 0 8px 4px 0; font-weight: 600; color: var(--qc-ink); border-bottom: 1px solid var(--qc-line); }
.qc-sidebar__other a:hover { color: var(--qc-accent-dark); border-color: var(--qc-accent-dark); }

.qc-reader { background: #fff; border: 1px solid var(--qc-line); padding: clamp(24px, 4vw, 52px); }
.qc-reader__head { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px dashed var(--qc-dash); }
.qc-reader__title { margin: 14px 0 0; font-size: clamp(30px, 4vw, 44px) !important; line-height: 1.12 !important; font-weight: 600; letter-spacing: -0.02em; }
.qc-reader__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--qc-muted); }
.qc-reader__facts i { margin-right: 7px; color: var(--qc-accent); }

.qc-toc { margin: 0 0 36px; padding: 18px 22px; background: var(--qc-bg); border-left: 4px solid var(--qc-accent); }
.qc-toc__label { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--qc-muted); }
.qc-toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.qc-toc a { font-size: 15px; color: var(--qc-ink); }
.qc-toc a:hover { color: var(--qc-accent-dark); text-decoration: underline; }
.qc-toc .is-sub { padding-left: 18px; font-size: 14px; }

.qc-notes { font-size: 17px; line-height: 1.85; color: #1b1b1b; overflow-wrap: break-word; }
.qc-notes > :first-child { margin-top: 0; }
.qc-notes h2 { margin: 2.1em 0 0.6em; font-size: 28px !important; line-height: 1.25 !important; font-weight: 600; letter-spacing: -0.01em; scroll-margin-top: calc(var(--qc-header) + 16px); }
.qc-notes h3 { margin: 1.9em 0 0.55em; font-size: 24px !important; line-height: 1.3 !important; font-weight: 600; scroll-margin-top: calc(var(--qc-header) + 16px); }
.qc-notes h4 { margin: 1.6em 0 0.5em; font-size: 19px !important; font-weight: 600; }
.qc-notes p { margin: 0 0 1.1em; }
.qc-notes ul, .qc-notes ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.qc-notes li { margin-bottom: 0.4em; }
.qc-notes img, .qc-notes figure { max-width: 100%; height: auto; }
.qc-notes table { width: 100%; margin: 0 0 1.4em; border-collapse: collapse; font-size: 15px; }
.qc-notes th, .qc-notes td { padding: 10px 14px; border: 1px solid var(--qc-line); text-align: left; }
.qc-notes th { background: var(--qc-bg); font-weight: 600; }
.qc-notes strong { font-weight: 600; }

/* Formula / key-point call-out: add the CSS class "qc-callout" to any block. */
.qc-callout, .qc-notes .qc-callout {
	margin: 1.6em 0;
	padding: 18px 22px;
	border-left: 4px solid var(--qc-accent);
	background: var(--qc-accent-tint);
	font-size: 16px;
	line-height: 1.6;
}
.qc-callout p { margin: 0; }
.qc-callout p + p { margin-top: 6px; }
.qc-formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 16px; font-weight: 700; color: var(--qc-accent-dark); }
.qc-callout small { display: block; margin-top: 4px; font-size: 13px; color: var(--qc-muted); }

.qc-block { margin-top: 48px; padding-top: 40px; border-top: 1px dashed var(--qc-dash); }
.qc-block__title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 22px !important; font-weight: 600; }
.qc-block__title i { color: var(--qc-accent); }
.qc-video { position: relative; aspect-ratio: 16 / 9; background: #0a0a0a; }
.qc-video iframe, .qc-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.qc-tryit__more { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.qc-tryit .qc-sim { margin-bottom: 16px; }

.qc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 32px; border-top: 1px dashed var(--qc-dash); }
.qc-pager a { display: block; padding: 18px 22px; border: 1px solid var(--qc-line); color: var(--qc-ink); transition: border-color 0.15s; }
.qc-pager a:hover { border-color: var(--qc-ink); }
.qc-pager small { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--qc-muted); }
.qc-pager strong { font-size: 16px; font-weight: 600; line-height: 1.3; }
.qc-pager__next { grid-column: 2; text-align: right; }
.qc-pager__prev + .qc-pager__next { grid-column: 2; }

/* ------------------------------------------------------ simulations hub */
.qc-pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.qc-pill { display: inline-block; padding: 9px 18px; border: 1px solid var(--qc-line); background: #fff; font-size: 14px; font-weight: 500; color: var(--qc-ink); transition: border-color 0.15s, background 0.15s; }
.qc-pill:hover { border-color: var(--qc-ink); }
.qc-pill[aria-current] { background: var(--qc-accent); border-color: var(--qc-accent); color: #fff; font-weight: 600; }
.qc-hubbar { padding: 32px 0 8px; }
.qc-hub { padding: 28px 0 90px; }

.qc-simhead { padding: 28px 0 24px; }
.qc-simhead__title { margin: 0; font-size: clamp(30px, 4.4vw, 48px) !important; line-height: 1.1 !important; font-weight: 600; letter-spacing: -0.02em; }
.qc-simpage { padding: 4px 0 90px; }
.qc-simpage .qc-pills { margin-bottom: 24px; }
.qc-simpage .qc-sim { margin-bottom: 0; }
.qc-siminfo { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; margin-top: 44px; align-items: start; }
.qc-siminfo__text { font-size: 17px; line-height: 1.8; }
.qc-siminfo__text h2 { margin: 1.6em 0 0.5em; font-size: 22px !important; font-weight: 600; }
.qc-siminfo__text > :first-child { margin-top: 0; }
.qc-siminfo__text ol { padding-left: 1.3em; }
.qc-siminfo__text li { margin-bottom: 0.5em; }
.qc-meta { display: grid; gap: 1px; background: var(--qc-line); border: 1px solid var(--qc-line); }
.qc-meta__item { padding: 16px 20px; background: #fff; }
.qc-meta__label { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--qc-muted); }
.qc-meta__value { font-size: 17px; font-weight: 600; }
.qc-meta__value a { color: var(--qc-ink); border-bottom: 1px solid var(--qc-line); }
.qc-meta__value a:hover { color: var(--qc-accent-dark); border-color: var(--qc-accent-dark); }
.qc-siminfo__cta { margin-top: 16px; }
.qc-siminfo__cta .qc-btn { width: 100%; }

.qc-pagination { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 8px; }
.qc-pagination .page-numbers { display: inline-block; min-width: 42px; padding: 9px 14px; border: 1px solid var(--qc-line); background: #fff; text-align: center; color: var(--qc-ink); }
.qc-pagination .current { background: var(--qc-ink); border-color: var(--qc-ink); color: #fff; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 991px) {
	.qc-section { padding: 60px 0; }
	.qc-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 16px; }

	/* Chapter list becomes a swipeable strip above the reader. */
	.qc-sidebar { position: static; max-height: none; overflow: visible; }
	.qc-chapter-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
	.qc-chapter-nav li { flex: 0 0 auto; scroll-snap-align: start; }
	.qc-chapter-nav a { background: #fff; border-color: var(--qc-line); white-space: nowrap; }
	.qc-sidebar__other { display: none; }

	.qc-siminfo { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.qc-stats__grid { grid-template-columns: repeat(2, 1fr); }
	.qc-stat:nth-child(3) { border-left: 0; }
	.qc-stat:nth-child(n + 3) { border-top: 1px dashed var(--qc-dash); }
}
@media (max-width: 575px) {
	.qc-hero { padding: 64px 0 72px; }
	.qc-search__btn { padding: 0 18px; }
	.qc-search__icon { display: none; }
	.qc-search__input { padding: 0 14px; }
	.qc-pager { grid-template-columns: 1fr; }
	.qc-pager__next { grid-column: auto; }
	.qc-grid { gap: 20px; }
	.qc-chapter-card { padding: 22px; }
}

/* The theme forces h1/h2/h3 sizes with !important on small screens; headings above opt out the same way. */
.qc-hero__title .qc-accent { font-size: inherit !important; line-height: inherit !important; }

/* ------------------------------------------------------------ papers */
.qc-paper-card { padding: 28px; border-top: 4px solid var(--qc-ink); }
.qc-paper-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.qc-paper-card__file { font-size: 13px; font-weight: 500; color: var(--qc-muted); white-space: nowrap; }
.qc-paper-card__file i { margin-right: 6px; color: var(--qc-accent); }
.qc-paper-card__count { font-size: 13px; color: var(--qc-muted); }

/* ------------------------------------------------------- contribute */
.qc-contribute { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; }
.qc-formcard { padding: clamp(24px, 3vw, 40px); background: #fff; border: 1px solid var(--qc-line); border-top: 4px solid var(--qc-accent); }
.qc-formcard__title { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 24px !important; line-height: 1.25 !important; font-weight: 600; }
.qc-formcard__title i { color: var(--qc-accent); }
.qc-formcard__note { margin: 0 0 24px; font-size: 15px; color: var(--qc-muted); }
.qc-form { display: grid; gap: 18px; }
.qc-field { display: grid; gap: 6px; min-width: 0; }
.qc-field label { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--qc-muted); }
.qc-field input, .qc-field select, .qc-field textarea {
	width: 100%;
	padding: 13px 14px;
	border: 1px solid var(--qc-line);
	border-radius: 0;
	background: var(--qc-bg);
	font: inherit;
	font-size: 15px;
	color: var(--qc-ink);
}
.qc-field textarea { resize: vertical; min-height: 110px; }
.qc-field input:focus, .qc-field select:focus, .qc-field textarea:focus { outline: 3px solid var(--qc-ink); outline-offset: 0; background: #fff; border-color: var(--qc-ink); }
.qc-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.qc-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--qc-muted); cursor: pointer; }
.qc-check span { font-weight: 400; }
.qc-check input { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--qc-accent); }
.qc-btn--wide { width: 100%; padding: 15px 27px; }
.qc-btn:disabled { opacity: 0.6; cursor: wait; }
.qc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qc-form-status:empty { display: none; }
.qc-form-status { margin: 0 0 18px; }
.qc-form-status:focus { outline: none; }
.qc-notice { margin: 0; padding: 14px 18px; border-left: 4px solid; font-size: 15px; }
.qc-notice--ok { background: rgba(31, 138, 76, 0.1); border-color: #1f8a4c; color: #145c33; }
.qc-notice--err { background: var(--qc-accent-tint); border-color: var(--qc-accent); color: #8a2410; }

.qc-feed__title, .qc-feed__title span:first-child { color: var(--qc-ink); }
.qc-feed__title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; font-size: 24px !important; line-height: 1.25 !important; font-weight: 600; }
.qc-feed__list { display: grid; gap: 20px; }
.qc-contrib-card { padding: 24px 26px; }
.qc-contrib-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 14px; }
.qc-contrib-card__by { font-size: 13px; color: var(--qc-muted); }
.qc-contrib-card .qc-card__title { font-size: 19px !important; line-height: 1.3 !important; }
.qc-contrib-card .qc-card__text { margin-bottom: 18px; }
.qc-upvote { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--qc-accent-dark); cursor: pointer; }
.qc-upvote:hover:not(.is-voted) { text-decoration: underline; }
.qc-upvote.is-voted { color: var(--qc-muted); cursor: default; }
.qc-upvote.is-voted i { color: var(--qc-accent); }
.qc-upvote:disabled { opacity: 0.6; }
.qc-feed .qc-empty h3 { margin: 0 0 8px; font-size: 20px !important; line-height: 1.3 !important; }

/* --------------------------------------------------- search results */
.qc-pagehead__search { margin-top: 28px; max-width: 680px; }
.qc-results { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; max-width: 860px; }
.qc-result { padding: 26px 0; border-bottom: 1px dashed var(--qc-dash); }
.qc-result:first-child { padding-top: 6px; }
.qc-result__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.qc-result__where { font-size: 13px; color: var(--qc-muted); }
.qc-result__title { margin: 0 0 8px; font-size: 24px !important; line-height: 1.25 !important; font-weight: 600; }
.qc-result__title a { color: var(--qc-ink); }
.qc-result__title a:hover { color: var(--qc-accent-dark); }
.qc-result__text { margin: 0; max-width: 700px; color: var(--qc-muted); line-height: 1.7; }
.qc-empty .qc-chip { margin: 4px; }

.qc-paperpage { margin-top: 12px; }

@media (max-width: 991px) {
	.qc-contribute { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 575px) {
	.qc-field-row { grid-template-columns: 1fr; }
	.qc-paper-card { padding: 22px; }
}
