/* ──────────────────────────────────────────────────────────────────────────────────────────────
   The legal pages: Privacy Statement, and whatever follows it.

   ⚠ IT BORROWS THE BRAND SHEET AND ADDS ONLY WHAT PROSE NEEDS. ce-brand.css owns the hero, the
   full-bleed band, the shell and the tokens; everything here is about reading 14KB of terms
   without giving up.

   ⚠ THE READING COLUMN IS CAPPED, AND THE CARD IS NOT. The shell runs the house width so the page
   matches every other brand page, but a line of legal text 1,100px wide is unreadable — the eye
   loses the next line. The prose is capped near 72 characters; the headings and the contents list
   span the card.
   ────────────────────────────────────────────────────────────────────────────────────────────── */

/* ⚠ THE READING MEASURE IS DECLARED ONCE, IN rem, AND NOT IN ch. `ch` resolves against the
   ELEMENT'S OWN font-size, so 72ch gave three different column widths on one page — 659px on the
   16px prose, 535px on the 13px see-also line and 494px on the 12px "Last updated". Measured on
   the live page, 20 Nov 2026: they centred to three different left edges and read as misaligned
   rather than as a column. One absolute figure, shared by everything in the column. */
.ce-legal { --ce-legal-measure: 41rem; }

.ce-legal__shell { padding: 28px 24px 36px; }

.ce-legal__hero-in { padding-block: 2.75rem 4.5rem; }

/* ── contents ─────────────────────────────────────────────────────────────────────────────────
   ⚠ A LIST AT THE TOP IS NOT ENOUGH ON A NINETEEN-SECTION DOCUMENT. By section five it has
   scrolled away and the reader has no idea where they are in the agreement. Above 1000px it
   becomes a sticky rail beside the text; below it stays a block at the top, because a phone has no
   room for a rail and a sticky one would eat the screen. */
.ce-legal__toc {
	margin: 0 0 1.75rem;
	padding: 14px 16px;
	border-radius: 10px;
	background: var( --ce-surface, #f6f8fb );
	border: 1px solid var( --ce-border, #e3e8ef );
}
.ce-legal__toc-h {
	margin: 0 0 .5rem;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .6;
}
.ce-legal__toc ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .4rem 1.25rem;
}
.ce-legal__toc a {
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid transparent;
}
.ce-legal__toc a:hover,
.ce-legal__toc a:focus { border-bottom-color: currentColor; }

/* ── sections ─────────────────────────────────────────────────────────────────────────────── */
.ce-legal__section { padding-top: .5rem; }
.ce-legal__section + .ce-legal__section {
	margin-top: 2rem;
	padding-top: 1.75rem;
	border-top: 1px solid var( --ce-border, #e3e8ef );
}
/* ⚠ scroll-margin, NOT a spacer element. The contents list jumps to these, and a sticky site
   header would otherwise park the heading underneath itself. */
.ce-legal__section { scroll-margin-top: 90px; }

.ce-legal__h {
	margin: 0 0 .85rem;
	font-size: clamp( 1.25rem, 3vw, 1.6rem );
	line-height: 1.25;
	text-wrap: balance;
}

.ce-legal__body { max-width: var( --ce-legal-measure ); }
/* ⚠ CONSECUTIVE BLOCKS NEED THE PARAGRAPH GAP BETWEEN THEM. Each source paragraph is its own
   block, the last <p> in a block has its bottom margin stripped, and nothing replaced the gap
   across the boundary — so on Refunds the opening paragraph and the one telling a reader how to
   request a refund ran together with 0px between them. Measured on the page, 20 Nov 2026. */
.ce-legal__body + .ce-legal__body { margin-top: .9rem; }
.ce-legal__body p { margin: 0 0 .9rem; line-height: 1.65; }
.ce-legal__body p:last-child { margin-bottom: 0; }
.ce-legal__body strong { font-weight: 700; }
.ce-legal__body a { text-decoration: underline; }

/* ── sub-sections ─────────────────────────────────────────────────────────────────────────────
   ⚠ THESE WERE <details> AND ARE NOW HEADED SECTIONS. A contents rail plus a collapsed
   disclosure is two layers of hiding: the reader clicks a link, lands on the clause they asked
   for, and has to click again. On a legal page, hidden-by-default text is text a reader can say
   they never saw — and the print stylesheet already had to force every disclosure open so a saved
   copy was not missing its clauses. Needing to undo a component for the case that matters most is
   the component telling you it is wrong.
   ⚠ AND THEY CARRY STRUCTURE WITHOUT VERTICAL RULES. The first version gave every sub-section a
   left rule and an indent, which looked orderly in isolation and became a LADDER the moment one
   nested inside another: on Education's Nevada block, an outer rule down the whole group and an
   inner rule down each item inside it — Scott, 20 Nov 2026, "a lot of vertical lines". Vertical
   rules also run the full height of whatever they mark, so the longer the clause the louder the
   line, which is backwards.
   One device does the whole job instead: a HORIZONTAL hairline separates, space groups, and the
   type scale says which level you are on. The hairline is the same one already dividing top-level
   sections, so the page has one divider, used at two scales, rather than two unrelated systems. */
.ce-legal__sub { margin-top: 1.5rem; }
.ce-legal__subh {
	margin: 0 0 .5rem;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}
/* ⚠ THE STEP BETWEEN LEVELS IS SIZED, NOT INHERITED. A section heading is 25.6px and the level
   under it was 16px — a cliff, with nothing to say whether the 16px line opened a sub-section or
   labelled the sentence beneath it. Levels now read as three distinct jobs: a section (25.6px), a
   sub-section (18px, as written), and below that a LABEL.
   ⚠ THE LABELS ARE UPPERCASED BY THE STYLESHEET BECAUSE THE SOURCE IS INCONSISTENT. Education
   stores "APPROVED CREDIT HOURS" and "Course Completion Requirements" at the SAME level, exactly
   as the original document typed them. Rendered as written they read as two different kinds of
   thing; set as labels they read as one. This is presentation only — no stored text changes, and
   the extraction assertion still holds. */
/* ⚠ A SUB-SECTION HEADING STAYS A HEADING. It wore a solid brand pill for one build and Scott
   killed it on sight, correctly: a filled blue capsule reads as a BUTTON, and promising
   something to press where nothing is pressable is the underlined-heading mistake in a different
   costume. There is one pill weight on these pages, and it is the tinted label below.
   Hierarchy without a second pill: section heading (25.6px) → sub-section heading (18px, in the
   case the document wrote it) → tinted pill label. Three distinguishable levels, one device. */
.ce-legal__subh--3 { font-size: 18px; }

/* ⚠ THE PILL IS THE LABEL LANGUAGE ON EVERY LEGAL PAGE. It used to apply only to Refunds' four
   course types; these levels — Education's credit-hour labels, Privacy's data-rights labels —
   do exactly the same job and were plain bold text, so the same page taught the reader two
   different shapes for one idea. */
.ce-legal__subh--4,
.ce-legal__subh--5,
.ce-legal__subh--6,
.ce-legal__spec > .ce-legal__subh {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	margin: 0 0 .7rem;
	padding: .34rem .78rem;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.35;
	text-transform: uppercase;
	background: #e4eefb;
	background: color-mix( in srgb, var( --ce-brand, #0a4b78 ) 14%, #fff );
	color: #043f7c;
	color: color-mix( in srgb, var( --ce-brand, #0a4b78 ) 88%, #000 );
}

/* ── promoted items: stacked entries ──────────────────────────────────────────────────────────
   ⚠ FOUR DESIGNS WERE WRONG HERE, AND ALL FOUR FAILED THE SAME WAY. Accordions hid the clauses;
   plain headings shouted them (the source labels are all-caps, so at heading size they were 25px
   of capitals, four times); cards orphaned the fourth on its own row and stretched DIGITAL
   DOWNLOADS — one short sentence — into a box of white space beside a six-line neighbour; the
   spec table squeezed the rule into a narrow right-hand column.
   The content is what keeps breaking them. Two of the four entries carry WORD-FOR-WORD identical
   text, one is a single short sentence and one runs six lines. Any component that sets these
   beside each other, or in a shared column, publishes that unevenness. Stacked full-width entries
   do not: nothing is measured against its neighbour, so each one is simply as long as it is.
   A hairline separates, the label sits in a brand pill, and the prose keeps the page's own
   reading measure — the same devices the rest of the document already uses, at a smaller scale. */
.ce-legal__specs { margin-top: 1.75rem; }
.ce-legal__spec {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
}
.ce-legal__spec + .ce-legal__spec {
	margin-top: 1.75rem;
	padding-top: 1.75rem;
	border-top: 1px solid var( --ce-border, #e3e8ef );
}
/* ⚠ THE PILL IS ALREADY THE BRAND'S, WHICH IS WHY IT BELONGS HERE. Every one of these pages
   opens with .ce-brand-badge in its hero — a rounded, tinted, letter-spaced capital label — so a
   sub-section label shaped the same way is the page quoting itself rather than a new device.
   inline-flex, not block: a block h2 stretches the pill the full width of the column, at which
   point it is a bar.
   ⚠ THE TINTED PILL'S TEXT IS DARKENED AND THAT IS NOT A PREFERENCE. Brand blue on a tint of
   itself measures 4.45:1 at 11%, and 11px bold is NOT large text under WCAG, so it needs 4.5:1
   and misses by a hair — the kind of failure nobody notices and every later page inherits. A 14%
   tint with the text at 88% brand measures 5.20:1, and white on solid brand measures 5.20:1.
   All three figures were measured on the rendered pill in a browser, not estimated. Measure
   again if you restyle this.
   Flat colours precede each color-mix() as fallbacks: without one the background resolves to
   transparent and the label floats unanchored. */
.ce-legal__spec .ce-legal__body { max-width: var( --ce-legal-measure ); }
.ce-legal__spec .ce-legal__body p { font-size: 16px; line-height: 1.65; }

@media ( max-width: 699px ) {
	.ce-legal__spec + .ce-legal__spec { margin-top: 1.5rem; padding-top: 1.5rem; }
}

.ce-legal__sub .ce-legal__body { max-width: none; }

@media ( min-width: 600px ) {
	.ce-legal__shell   { padding: 36px 32px 44px; }
	.ce-legal__hero-in { padding-block: 3.5rem 5rem; padding-inline: 32px; }
}

/* ⚠ LAST IN THE FILE, AND THE HOUSE COLUMN ONLY WHERE THERE IS ROOM. Measured on production
   20 Nov 2026: /ce-packages/ and /nvcourses/ run .ce-brand-hero__inner at 1200px with the title at
   384. A page left to its own Elementor container renders at 1069px instead — close enough to look
   like a mistake rather than a choice. The breakout is needed because the container is NARROWER
   than the house column, so margin-inline:auto alone cannot reach it.
   ⚠ width:100vw NEEDS body { overflow-x: clip }, which ce-brand.css already sets; the hero inside
   does its own calc( 50% - 50vw ), which resolves to 0 once its parent is already 100vw, so the
   band is not broken out twice. Confined to >=1000px: a phone has no use for a 1200px cap and the
   container's own gutter is what keeps the card off the edge. */
@media ( min-width: 1000px ) {
	.ce-legal {
		width: 100vw;
		margin-left: calc( 50% - 50vw );
		margin-right: calc( 50% - 50vw );
	}
	.ce-legal__hero-in { max-width: 1200px; padding-inline: 1.5rem; }
	/* ⚠ margin-inline:auto, AND ONLY THE INLINE SIDES. Without it the shell is left-aligned inside
	   the 100vw breakout and starts at x=0 while the hero starts at 360 — measured on the live
	   Refund Policies page, 20 Nov 2026, the first legal page switched over. The SMS shell has
	   carried this since it was built; this one was written without it.
	   The SHORTHAND would silently flatten .ce-brand-shell's -64px top margin, which is the
	   overlap into the band. Inline sides only; verified the overlap still reads 64px after. */
	.ce-legal__shell   { max-width: 1200px; margin-inline: auto; padding: 36px 24px 44px; }
}

/* ⚠ THE DATE SITS ABOVE EVERYTHING AND READS QUIETLY. A legal page without one cannot be relied
   on — a reader asking what was in force when they signed up has no way to tell — but it is
   metadata, not the first sentence of the document. */
.ce-legal__effective {
	margin: 0 0 1.1rem;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .65;
}


/* ⚠ THE HEADINGS WERE ANCHORS AND ARE NOT ANY MORE. Astra underlines anchors inside
   .entry-content with `.ast-single-post .entry-content a`, which outranks a single class, so every
   section title on every legal page rendered underlined — reading as a link out of a document
   whose whole value is that the reader can trust what it says. The ids stay on the sections, so
   links already sent still land. Do not reintroduce an anchor here without checking what the theme
   does to it. {@see Legal_Page::section()} */
/* The lead is the opening prose: no heading above it, so it needs the top rule removed too. */
.ce-legal__section.is-lead + .ce-legal__section { border-top: 0; padding-top: 0; margin-top: 1.5rem; }

/* ── the other documents ──────────────────────────────────────────────────────────────────── */
.ce-legal__related {
	margin-top: 2.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var( --ce-border, #e3e8ef );
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .5rem 1.25rem;
	font-size: 13px;
}
.ce-legal__related span {
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: 11px;
	opacity: .6;
}
.ce-legal__related a { font-weight: 600; }

/* ── the sticky rail ──────────────────────────────────────────────────────────────────────── */
@media ( min-width: 1000px ) {
	.ce-legal__layout {
		display: grid;
		grid-template-columns: 230px minmax( 0, 1fr );
		gap: 2.5rem;
		align-items: start;
	}
	.ce-legal__toc {
		position: sticky;
		/* clears a sticky site header, same figure as the sections' scroll-margin */
		top: 90px;
		margin: 0;
		max-height: calc( 100vh - 120px );
		overflow-y: auto;
	}
	.ce-legal__toc ul { display: block; }
	.ce-legal__toc li + li { margin-top: .4rem; }
	.ce-legal__toc a { display: block; line-height: 1.35; }
}

/* ── printing, which is what people actually do with these ───────────────────────────────────
   ⚠ A LEGAL PAGE GETS SAVED, NOT JUST READ. Someone keeping a copy of the terms they agreed to
   prints to PDF, and three things make that copy wrong: the disclosures print COLLAPSED, so the
   refund rules for their own course type are simply absent; the hero prints as a dark slab; and
   every link becomes invisible text. All three are fixed here.
   ⚠ `summary ~ *` IS THE RELIABLE WAY to force a <details> open for print — browsers disagree
   about honouring `details[open]` or `display` on the element itself. */
@media print {
	/* ⚠ NOTHING TO FORCE OPEN ANY MORE. This used to carry `summary ~ * { display: block }` to
	   stop a saved copy printing with its clauses collapsed. Headed sections print as they
	   read, which is the point of the change. */
	.ce-legal__sub { break-inside: avoid; }
	.ce-legal__subh { break-after: avoid; }
	.ce-legal__spec { break-inside: avoid; }
	.ce-legal__toc,
	.ce-legal__related { display: none; }
	.ce-legal__layout { display: block; }
	.ce-brand-hero,
	.ce-legal__hero { background: none !important; color: #000 !important; min-height: 0; padding: 0; }
	.ce-brand-hero::before,
	.ce-brand-hero::after,
	.ce-brand-badge { display: none; }
	.ce-brand-shell { margin-top: 0; box-shadow: none; padding: 0; }
	.ce-legal__body { max-width: none; }
	.ce-legal__section { break-inside: auto; }
	.ce-legal__h { break-after: avoid; }
	/* the URL, or the reader has a copy that cites documents it cannot reach */
	.ce-legal__body a::after { content: " (" attr( href ) ")"; font-size: .85em; word-break: break-all; }
}


/* ── the prose fills its column; the rail fills the rest ─────────────────────────────────────
   ⚠ THE MEASURE IS A CAP, NOT A TARGET, AND INSIDE THE RAIL LAYOUT IT DOES NOT BIND. Pinning a
   41rem column to the left of a 1152px card left a 493px hole; centring it left a thin ribbon
   with 248px either side — "thin and centered", which is what it looked like. The card is not
   narrowed, because it must stay in register with the hero. The rail fills the left, the prose
   fills what remains, and nothing floats.
   ⚠ A LONGER LINE NEEDS MORE LEADING. At ~880px the measure runs past the comfortable 75
   characters, so the line-height goes up: the eye finds the start of the next line by the gap,
   and a long line with tight leading is where it loses it. */
.ce-legal__main .ce-legal__body,
.ce-legal__main .ce-legal__sub { max-width: none; }
.ce-legal__main .ce-legal__body p { line-height: 1.72; }

/* With no rail — a document with fewer than two things to list — the cap still applies and the
   column is centred, which is the best available answer for a card that cannot be filled. */
.ce-legal:not(:has(.ce-legal__layout)) .ce-legal__effective,
.ce-legal:not(:has(.ce-legal__layout)) .ce-legal__section,
.ce-legal:not(:has(.ce-legal__layout)) .ce-legal__related {
	max-width: var( --ce-legal-measure );
	margin-inline: auto;
}
