/* =========================================================
   NEDA eCAMPUS — THE CONTACT PAGE FAQ, IN CHAPTERS

   Thirty-three questions is too many to scroll (owner, 2026-09-10), so the
   page's own h3 sections become a rail and one chapter's questions show at
   a time. The card, the numeral, the divider and the chevron plate are the
   front page's FAQ (`.neda-fp-faq__*` in neda-front-page.css) rather than a
   third FAQ style: the two are the same component in different columns.

   `neda-faq.css` still styles `.neda-faq` groups elsewhere and is not
   touched here — this markup never carries that class, so the two cannot
   collide.

   STATES follow the Neda control vocabulary: hover and focus are one cherry
   fill with white ink and no ring; the chosen chapter is text-box 4 with a
   black bold label and a 3px inset bar, so selection is never carried by
   the tint alone.
   ========================================================= */

.neda-cfaq {
	--cfaq-white: #ffffff;
	--cfaq-black: #000000;
	--cfaq-ink: rgba(0, 0, 0, 0.78);
	--cfaq-quiet: rgba(0, 0, 0, 0.72);
	--cfaq-cyan: #0ec4c5;
	--cfaq-cyan-light: #d8f2f2;
	--cfaq-cherry: #d7263d;
	--cfaq-chosen: #f1f3d6;
	--cfaq-radius: 10px;
	--cfaq-ease: 0.18s ease;
	--cfaq-line: rgba(0, 0, 0, 0.06);
}

.neda-cfaq__title {
	margin-block-end: 8px !important;
}

.neda-cfaq__wrap {
	display: grid;
	grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
	align-items: start;
	gap: clamp(20px, 3.4vw, 48px);
	margin-block-start: clamp(20px, 3vw, 32px);
}

/* ---- the rail ---------------------------------------------------------- */

.neda-cfaq__rail {
	/* Long panels leave the rail behind on a tall screen. The offset clears
	   the sticky site header; below `lg` the rail is not sticky at all. */
	position: sticky;
	top: clamp(88px, 12vh, 132px);
}

.neda-cfaq__chapters {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.neda-cfaq__chapter-row {
	margin: 0;
	padding: 0;
}

.neda-cfaq a.neda-cfaq__chapter {
	position: relative;
	display: grid;
	gap: 2px;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid var(--cfaq-line);
	border-radius: var(--cfaq-radius);
	background: var(--cfaq-white);
	color: var(--cfaq-black);
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	transition: background var(--cfaq-ease), color var(--cfaq-ease),
		border-color var(--cfaq-ease), box-shadow var(--cfaq-ease);
}

.neda-cfaq__chapter-label {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.neda-cfaq__count {
	font-size: 13px;
	color: var(--cfaq-quiet);
	transition: color var(--cfaq-ease);
}

/* The chosen chapter. The bold black label is what carries the choice; the
   bar is the shape that survives hover, where the fill goes cherry. */
.neda-cfaq a.neda-cfaq__chapter[aria-selected="true"] {
	background: var(--cfaq-chosen);
	border-color: rgba(0, 0, 0, 0.12);
	color: var(--cfaq-black);
}

.neda-cfaq a.neda-cfaq__chapter[aria-selected="true"] .neda-cfaq__chapter-label {
	font-weight: 700;
	color: var(--cfaq-black);
}

.neda-cfaq a.neda-cfaq__chapter[aria-selected="true"]::before {
	content: "";
	position: absolute;
	inset-block: 8px;
	inset-inline-start: 0;
	inline-size: 3px;
	border-start-start-radius: var(--cfaq-radius);
	border-end-start-radius: var(--cfaq-radius);
	background: currentColor;
}

/*
 * HOVER AND FOCUS ARE ONE APPEARANCE, AND THEY COME LAST ON PURPOSE.
 *
 * Hover beats selected while the pointer is on it. These selectors weigh
 * the same as the `[aria-selected]` ones above, so the only thing deciding
 * it is source order - written before them, the chosen chapter kept its
 * text-box-4 fill under the pointer and the label went black on cherry at
 * 4.22:1. The bar stays: `currentColor` follows the ink to white, so the
 * choice is still visible on the control the pointer is over.
 *
 * A control that fills cherry gets no ring around it.
 *
 * THE INK IS NAMED, NOT INHERITED. A chapter is a link, and the theme
 * colours links cherry with a selector that beats a bare class. Measured
 * live 2026-09-10, before the `a.` was added: a hovered chapter computed
 * `color: rgb(215, 38, 61)` on a `rgb(215, 38, 61)` fill - the label gone
 * entirely - and the chosen one was cherry on text-box 4 at 4.39:1, under
 * the 4.5:1 that 15px text needs. The rest state was black and looked
 * fine, which is why this was worth measuring rather than reading.
 */
.neda-cfaq a.neda-cfaq__chapter:hover,
.neda-cfaq a.neda-cfaq__chapter:focus-visible {
	background: var(--cfaq-cherry);
	border-color: var(--cfaq-cherry);
	color: var(--cfaq-white);
	outline: none;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07), 0 12px 26px -12px rgba(0, 0, 0, 0.28);
}

.neda-cfaq a.neda-cfaq__chapter:hover .neda-cfaq__chapter-label,
.neda-cfaq a.neda-cfaq__chapter:focus-visible .neda-cfaq__chapter-label {
	color: var(--cfaq-white);
}

.neda-cfaq a.neda-cfaq__chapter:hover .neda-cfaq__count,
.neda-cfaq a.neda-cfaq__chapter:focus-visible .neda-cfaq__count {
	color: rgba(255, 255, 255, 0.86);
}

/* ---- the panels -------------------------------------------------------- */

.neda-cfaq__panels {
	min-width: 0;
}

.neda-cfaq__panel + .neda-cfaq__panel {
	margin-block-start: clamp(24px, 4vw, 40px);
}

/* With the enhancement running, the rail names the chapter and the heading
   would say it a second time. Without it, every panel is on the page and
   the heading is how you tell them apart, so it is only ever hidden here. */
[data-neda-cfaq="enhanced"] .neda-cfaq__panel-title {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.neda-cfaq__panel-title {
	margin-block: 0 14px !important;
	font-size: clamp(19px, 2vw, 22px);
	line-height: 1.25;
	color: var(--cfaq-black);
}

.neda-cfaq__list {
	display: grid;
	align-content: start;
	gap: 12px;
}

.neda-cfaq__item {
	background: var(--cfaq-white);
	border: 1px solid var(--cfaq-line);
	border-radius: var(--cfaq-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 18px -10px rgba(0, 0, 0, 0.12);
	transition: border-color var(--cfaq-ease), box-shadow var(--cfaq-ease);
}

.neda-cfaq__item:hover {
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07), 0 12px 26px -10px rgba(0, 0, 0, 0.18);
}

.neda-cfaq__item[open] {
	border-color: var(--cfaq-cyan);
}

.neda-cfaq__item > summary {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 18px;
	min-height: 44px;
	padding: 14px 16px;
	list-style: none;
	cursor: pointer;
}

.neda-cfaq__item > summary::-webkit-details-marker { display: none; }
.neda-cfaq__item > summary::marker { content: ""; }

/* No numbers (owner, 2026-09-14): the question and its chevron only. */

.neda-cfaq__q {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--cfaq-black);
}

/* A 10px plate, not a circle, and cyan only as a FILL behind a black
   glyph. */
.neda-cfaq__go {
	display: grid;
	place-items: center;
	inline-size: 36px;
	block-size: 36px;
	border-radius: var(--cfaq-radius);
	background: var(--cfaq-cyan-light);
	transition: background var(--cfaq-ease);
}

/* Physical borders on purpose: a chevron pointing DOWN is not directional,
   and a logical one half-mirrors in RTL into a corner pointing the wrong
   way. Same correction as the front page's. */
.neda-cfaq__go::before {
	content: "";
	inline-size: 9px;
	block-size: 9px;
	border-bottom: 2px solid var(--cfaq-black);
	border-right: 2px solid var(--cfaq-black);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform var(--cfaq-ease);
}

.neda-cfaq__item[open] .neda-cfaq__go { background: var(--cfaq-cyan); }
.neda-cfaq__item[open] .neda-cfaq__go::before { transform: rotate(225deg) translate(-2px, -2px); }

/* A summary is not a control that fills cherry, so it keeps the ring. */
.neda-cfaq__item > summary:focus-visible {
	outline: 3px solid var(--cfaq-cherry);
	outline-offset: 2px;
}

.neda-cfaq__a { padding: 0 16px 16px; }

.neda-cfaq__a p {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--cfaq-ink);
}

.neda-cfaq__a p + p { margin-block-start: 12px; }

.neda-cfaq__outro {
	margin-block-start: clamp(20px, 3vw, 28px);
}

.neda-cfaq__outro p {
	margin: 0;
	color: var(--cfaq-ink);
}

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 1024px) {
	.neda-cfaq__wrap { grid-template-columns: minmax(0, 1fr); }
	.neda-cfaq__rail { position: static; }
	.neda-cfaq__chapters {
		grid-auto-flow: column;
		grid-auto-columns: minmax(190px, 1fr);
		overflow-x: auto;
		padding-block-end: 6px;
	}
	.neda-cfaq__chapter { height: 100%; }
}

@media (max-width: 640px) {
	.neda-cfaq__chapters {
		grid-auto-flow: row;
		grid-auto-columns: auto;
		overflow-x: visible;
	}
	.neda-cfaq__item > summary { grid-template-columns: 1fr; gap: 12px; }
	.neda-cfaq__go { display: none; }
}

/* ---- preferences ------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.neda-cfaq__chapter,
	.neda-cfaq__item,
	.neda-cfaq__go,
	.neda-cfaq__go::before {
		transition: none;
	}
}

/* A cherry fill cannot carry focus where the user agent repaints
   backgrounds, and neither can a rule that ends in `outline: none`. */
@media (forced-colors: active) {
	.neda-cfaq__chapter:focus-visible,
	.neda-cfaq__item > summary:focus-visible {
		outline: 3px solid Highlight !important;
		outline-offset: 2px !important;
	}
	.neda-cfaq__chapter[aria-selected="true"] {
		border: 2px solid Highlight;
	}
	.neda-cfaq__go::before {
		border-bottom-color: CanvasText;
		border-right-color: CanvasText;
	}
}
