/* Layer 2: bookcloth, the cover, the shelf, chapter identity, margin slips, progress and find. */

:root { --ch: #16233f; }
.ni-ch-1 { --ch: #16233f; }
.ni-ch-2 { --ch: #6a1f2b; }
.ni-ch-3 { --ch: #40295a; }
.ni-ch-4 { --ch: #1e4a3c; }
.ni-ch-5 { --ch: #1f4f5e; }
.ni-ch-6 { --ch: #573818; }
.ni-ch-7 { --ch: #8f3209; }

.ni-cloth {
	background-color: var(--ch); color: var(--on-cloth);
	background-image: repeating-linear-gradient(0deg, rgb(255 255 255 / .025) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgb(0 0 0 / .05) 0 1px, transparent 1px 3px);
}
.ni-cloth a { color: var(--on-cloth); text-decoration-color: rgb(243 236 224 / .55); }
.ni-cloth a:hover { color: #fff; text-decoration-color: #fff; }
.ni-cloth h1, .ni-cloth h2 { color: var(--on-cloth); }
.ni-cloth .ni-eyebrow { color: var(--on-cloth); opacity: 1; }
.ni-cloth .ni-standfirst, .ni-cloth .ni-byline, .ni-cloth .ni-crumbs, .ni-cloth .ni-crumbs a, .ni-cloth .ni-crumbs [aria-current] { color: var(--on-cloth); }
.ni-cloth :focus-visible { outline-color: #fff; }
.ni-band { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
.ni-main { overflow-x: clip; }

/* Home: the bound cover. */
.ni-home .ni-masthead { background: var(--cloth); border-bottom-color: rgb(243 236 224 / .5); }
.ni-home .ni-masthead::after { border-bottom-color: rgb(243 236 224 / .5); }
.ni-home .ni-wordmark, .ni-home .ni-nav__list a, .ni-home .ni-nav__num, .ni-home .ni-find-open { color: var(--on-cloth); }
.ni-home .ni-nav__toggle, .ni-home .ni-find-open { color: var(--on-cloth); border-color: rgb(243 236 224 / .7); }
.ni-home .ni-nav__list a:hover { color: #fff; }
@media (max-width: 61.99em) {
	.js .ni-home .ni-nav.is-open .ni-nav__list { background: var(--cloth); border-bottom-color: var(--on-cloth); }
	.js .ni-home .ni-nav.is-open .ni-nav__list li { border-bottom-color: rgb(243 236 224 / .25); }
}
.ni-cover { position: relative; overflow: hidden; }
.ni-cover::before { content: ""; position: absolute; inset: clamp(8px, 1.4vw, 18px); border: 1px solid rgb(243 236 224 / .38); pointer-events: none; }
.ni-cover__inner { position: relative; max-width: 84rem; margin: 0 auto; padding: clamp(2.75rem, 6vw, 5.5rem) calc(var(--gutter) + .75rem) clamp(2.5rem, 5vw, 4.5rem); display: grid; gap: 1.75rem; align-items: center; }
.ni-cover h1 { font-size: clamp(2.5rem, 4.5vw, 4.1rem); line-height: 1.05; margin: .7rem 0 1.15rem; letter-spacing: -.01em; text-wrap: pretty; }
.ni-cover__lede { font-size: 1.08em; max-width: 34em; }
.ni-cover__lede a { font-weight: 500; }
/* The intro gains a line when the web font arrives; hold that line so the buttons stay put. */
@media (min-width: 75em) { .ni-cover__lede { min-height: 6lh; } }
.ni-cover__actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .85rem 1.6rem; align-items: center; }
.ni-button--paper { background: var(--on-cloth); color: var(--ink) !important; border-color: var(--on-cloth); }
.ni-button--paper:hover { background: #fff; border-color: #fff; color: var(--ink) !important; }
.ni-cover__art img { width: 100%; }
@media (min-width: 62em) {
	.ni-cover__inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 2.5rem; }
	.ni-cover__art { margin-right: calc(-1 * var(--gutter) - .75rem); }
}

/* The shelf. Width follows real page counts. */
.ni-contents { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.ni-contents__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 2rem; }
.ni-contents__h { text-align: left; padding: 0; font-size: clamp(2.4rem, 5vw, 3.5rem); }
.ni-contents__h::after { display: none; }
.ni-contents__note { font-style: italic; color: var(--ink-soft); }
.ni-shelf { display: none; }
@media (min-width: 62em) {
	.ni-shelf { display: flex; align-items: flex-end; gap: 5px; margin-top: 2rem; border-bottom: 10px solid var(--ink); padding: 0 .5rem; min-height: 372px; }
	.ni-spine {
		flex: var(--grow) 1 0; min-width: 0; height: var(--h); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
		padding: 1rem .35rem .9rem; color: var(--on-cloth); text-decoration: none; border-radius: 3px 3px 0 0; transition: transform .28s cubic-bezier(.2, .7, .2, 1);
		background-color: var(--ch); background-image: repeating-linear-gradient(0deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgb(0 0 0 / .1) 0 1px, transparent 1px 3px);
	}
	.ni-spine::before, .ni-spine::after { content: ""; position: absolute; left: 0; right: 0; height: 3px; border-block: 1px solid rgb(243 236 224 / .55); }
	.ni-spine::before { top: 3.4rem; }
	.ni-spine::after { bottom: 2.9rem; }
	.ni-spine:hover, .ni-spine:focus-visible { transform: translateY(-12px); color: var(--on-cloth); }
	.ni-spine__num { font-family: var(--display); font-size: 1.35rem; line-height: 1; }
	.ni-spine__title { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--display); font-size: clamp(1.3rem, 1.75vw, 1.7rem); line-height: 1; white-space: nowrap; }
	.ni-spine__count { font-family: var(--label); font-size: .78rem; font-feature-settings: "lnum"; }
}
@media (prefers-reduced-motion: reduce) { .ni-spine { transition: none; } .ni-spine:hover { transform: none; } }

.ni-book__num { color: var(--ch); }
@media (max-width: 47.99em) { .ni-contents__spine-note { display: none; } }
@media (max-width: 47.99em) {
	/* On a phone the contents become books laid flat. */
	.ni-book__row { background-color: var(--ch); color: var(--on-cloth); grid-template-columns: 2.4rem minmax(0, 1fr); padding: 1rem .9rem 1.05rem; border: 0; margin-top: 4px; border-radius: 2px 3px 3px 2px; background-image: repeating-linear-gradient(0deg, rgb(255 255 255 / .05) 0 1px, transparent 1px 3px); }
	.ni-book__row .ni-book__num, .ni-book__row a, .ni-book__row .ni-book__desc, .ni-book__row .ni-book__count { color: var(--on-cloth); }
	.ni-book__row .ni-leaders__dots { display: none; }
	.ni-book__line { flex-direction: column; gap: .15rem; }
	.ni-book__row a { text-decoration: none; }
}

/* Check-record band on the home page. */
.ni-record > * { max-width: var(--page); }
.ni-record__grid { display: grid; gap: 1.5rem; margin-inline: auto; }
.ni-record .ni-leaders { margin: 0; }
.ni-record__more { margin-top: 1rem; }
.ni-record .ni-eyebrow { color: var(--on-cloth); }
.ni-record a { text-decoration-color: rgb(243 236 224 / .5); }
@media (min-width: 62em) { .ni-record__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 4rem; align-items: center; } }

.ni-preface { max-width: var(--page); }
@media (min-width: 62em) {
	.ni-content--columns { column-count: 2; column-gap: 4rem; }
	.ni-content--columns h2 { break-after: avoid; margin-top: 0; }
	.ni-content--columns > * { break-inside: avoid-column; }
	.ni-content--columns h2 ~ h2 { margin-top: 1.5em; }
}

/* Chapter opening. */
.ni-chapter { padding-bottom: clamp(2.25rem, 4vw, 3.5rem); margin-bottom: 2.25rem; }
.ni-chapter__inner { max-width: var(--page); margin-inline: auto; }
.ni-chapter__grid { display: grid; gap: 1.5rem; align-items: center; margin-top: clamp(1.5rem, 4vw, 3rem); }
.ni-chapter__title { margin: 0; align-items: flex-start; }
.ni-chapter__num { color: var(--on-cloth); font-size: clamp(4.5rem, 12vw, 9.5rem); }
.ni-chapter h1 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.05; }
.ni-chapter__plate { width: min(100%, 26rem); justify-self: end; height: auto; }
@media (min-width: 62em) { .ni-chapter__grid:has(.ni-chapter__plate) { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 3rem; } }
@media (max-width: 47.99em) { .ni-chapter__plate { justify-self: center; width: 72%; } }

.ni-layout--hub { border-top: 0; padding-top: 0; }
.ni-facts { border: 1px solid var(--ink); background: var(--card); padding: 1rem 1.1rem; font-family: var(--label); font-size: .92rem; font-feature-settings: "lnum"; }
.ni-facts__title { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.ni-facts__count { font-family: var(--text); font-size: 1.05rem; margin: .2rem 0 .5rem; }
.ni-facts__count strong { font-family: var(--display); font-weight: 400; font-size: 3rem; line-height: 1; color: var(--ch); margin-right: .15em; font-feature-settings: "lnum"; }
.ni-facts__count strong { display: inline-block; min-width: 1.2em; }
.ni-facts ul { list-style: none; padding: 0; margin-bottom: .75rem; }
.ni-facts li { display: flex; justify-content: space-between; padding: .3rem 0; border-top: 1px solid var(--rule); }
.ni-chapnav { display: grid; gap: .5rem; margin-top: 1rem; font-family: var(--text); line-height: 1.25; }
.ni-chapnav a { display: block; text-decoration: none; padding: .55rem 0; border-top: 1px solid var(--rule); }
.ni-chapnav span { display: block; font-family: var(--label); font-size: .76rem; color: var(--ink-soft); }
.ni-index { max-width: none; }
.ni-index__groups { display: grid; gap: 0 3.5rem; }
@media (min-width: 62em) { .ni-index__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Band heads for reviews, comparisons and tools. */
.ni-head.ni-band { max-width: none; padding-bottom: 2.25rem; margin-bottom: 2rem; }
.ni-head__inner { max-width: var(--page); margin-inline: auto; }
.ni-head.ni-band h1 { max-width: 20em; }
.ni-article--tool .ni-head.ni-band { margin-bottom: 0; padding-bottom: 5rem; }
.ni-panel { position: relative; margin-top: -3rem; box-shadow: 0 1px 0 var(--ink), 0 14px 34px -22px rgb(22 35 63 / .55); }
.ni-eyebrow { color: var(--signal); }
.ni-head:not(.ni-band) .ni-eyebrow { color: var(--ch-text, var(--signal)); }
.ni-standfirst { text-wrap: pretty; }
.ni-article--review .ni-layout, .ni-article--comparison .ni-layout { border-top: 0; padding-top: 0; }

/* Answer-first openers on commercial pages. */
.ni-article--review .ni-content > p:first-child, .ni-article--comparison .ni-content > p:first-child {
	font-size: 1.22em; line-height: 1.5; padding: 1.1rem 0 1.15rem; border-block: 2px solid var(--ink); margin-bottom: 1.5em;
}

/* Margin slip and rail. */
@media (min-width: 62em) {
	.ni-layout:not(.ni-layout--single) { grid-template-columns: minmax(0, var(--measure)) 17.5rem; }
	.ni-rail { display: flex; flex-direction: column; gap: 1.25rem; }
	.ni-rail__sticky { position: sticky; top: 1.5rem; }
	.ni-rail .ni-toc { position: static; max-height: calc(100vh - 7rem); }
	.ni-layout--hub { grid-template-columns: minmax(0, var(--measure)) 17.5rem; }
	.ni-layout--hub .ni-rail { position: sticky; top: 1.5rem; align-self: start; }
}
.ni-rail .ni-slip { margin: 0; }
.ni-rail .ni-slip .ni-stamp { font-size: .95rem; }
.ni-toc a[aria-current] { color: var(--signal); font-weight: 600; }

/* Waveform reading progress. Scroll-driven where supported; absent elsewhere. */
.ni-progress { display: none; }
@supports (animation-timeline: scroll()) {
	@keyframes ni-read { from { transform: scaleX(0); } to { transform: scaleX(1); } }
	@media (min-width: 62em) and (prefers-reduced-motion: no-preference) {
		.ni-progress { display: block; position: relative; height: 26px; margin-bottom: .85rem; background: var(--rule); -webkit-mask: var(--wave) left center / 100% 100% no-repeat; mask: var(--wave) left center / 100% 100% no-repeat; }
		.ni-progress span { position: absolute; inset: 0; background: var(--signal-bright); transform-origin: left; animation: ni-read linear both; animation-timeline: scroll(root); }
	}
	@media (max-width: 61.99em) and (prefers-reduced-motion: no-preference) {
		.ni-article::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; background: var(--signal-bright); transform-origin: left; animation: ni-read linear both; animation-timeline: scroll(root); z-index: 40; }
		.ni-article--hub::before { display: none; }
	}
}

/* Cross-document page turn. */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
	::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
	.ni-masthead { view-transition-name: masthead; }
}

/* Buttons keep the palette when tapped. */
button, .ni-button, .ni-spine, summary { -webkit-tap-highlight-color: transparent; }
.ni-nav.is-open .ni-nav__toggle { background: var(--ink); color: var(--paper); }
.ni-home .ni-nav.is-open .ni-nav__toggle { background: var(--on-cloth); color: var(--ink); }

/* Find a page. */
.ni-find-open { display: none; font-family: var(--label); font-size: .92rem; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--ink); padding: .4rem .8rem; min-height: 44px; cursor: pointer; margin-left: auto; order: 2; }
.js .ni-find-open { display: inline-flex; align-items: center; gap: .4em; }
.ni-find-open:hover { background: var(--ink); color: var(--paper); }
.ni-home .ni-find-open:hover { background: var(--on-cloth); color: var(--ink); }
.ni-nav { order: 3; }
@media (min-width: 62em) { .ni-nav { order: 1; margin-left: auto; } .ni-find-open { margin-left: 0; order: 2; } .ni-masthead__inner { flex-wrap: nowrap; gap: 1.25rem; } }
.ni-find { border: 1px solid var(--ink); padding: 0; width: min(38rem, calc(100vw - 2rem)); max-height: min(34rem, 80vh); background: var(--paper); color: var(--ink); margin: 8vh auto auto; font-family: var(--label); }
.ni-find::backdrop { background: rgb(22 35 63 / .62); }
.ni-find form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; padding: 1rem 1.1rem .75rem; border-bottom: 2px solid var(--ink); }
.ni-find label { grid-column: 1 / -1; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); }
.ni-find input { font: 400 1.25rem/1.3 var(--text); padding: .55rem .65rem; border: 1px solid var(--ink-soft); background: #fff; color: var(--ink); min-width: 0; border-radius: 0; }
.ni-find__close { font: 600 .92rem var(--label); background: none; border: 1px solid var(--ink); color: var(--ink); padding: 0 .85rem; min-height: 44px; cursor: pointer; }
.ni-find__status { padding: .6rem 1.1rem; font-size: .88rem; color: var(--ink-soft); }
.ni-find__results { list-style: none; padding: 0 1.1rem 1rem; }
.ni-find__results li { padding: .55rem 0; border-top: 1px solid var(--rule); }
.ni-find__results a { font-family: var(--text); font-size: 1.05rem; line-height: 1.3; display: block; text-decoration: none; }
.ni-find__results a:hover, .ni-find__results a:focus-visible { text-decoration: underline; text-decoration-color: var(--signal); }
.ni-find__results span { font-size: .8rem; color: var(--ink-soft); }

/* Tools. */
@media (min-width: 62em) { .ni-results { position: sticky; top: 1rem; } }
.ni-stickybar { display: none; }
@media (max-width: 61.99em) {
	.js .ni-stickybar { display: flex; justify-content: space-between; align-items: baseline; position: sticky; bottom: 0; z-index: 5; margin: 0 -1rem -1rem; padding: .7rem 1rem; background: var(--cloth); color: var(--on-cloth); font-size: .95rem; }
	.ni-stickybar strong { font-family: var(--display); font-weight: 400; font-size: 1.35rem; font-feature-settings: "lnum"; }
	.ni-toc { padding: 0 1rem; }
	.ni-toc summary { min-height: 44px; line-height: 44px; }
	.ni-toc[open] { padding-bottom: .75rem; }
	.ni-toc ol { margin-top: 0; }
	.ni-layout--hub .ni-rail { order: 2; }
}

/* Comparison tables keep their first column on a phone. */
@media (max-width: 47.99em) {
	.ni-table--verdict th:first-child, .ni-table--verdict td:first-child { position: sticky; left: 0; background: var(--paper); z-index: 1; box-shadow: 1px 0 0 var(--rule); padding-right: .6rem; max-width: 9.5rem; }
	.ni-table--verdict th, .ni-table--verdict td { padding-left: .6rem; }
}

/* Next step takes the chapter's cloth. */
.ni-onward__next { background-color: var(--ch); }
.ni-onward__next .ni-eyebrow { color: var(--on-cloth); }

/* Footer: seven cloth edges. */
.ni-colophon { box-shadow: inset 0 7px 0 0 transparent; position: relative; }
.ni-colophon::before { content: ""; display: block; height: 7px; background: linear-gradient(90deg, #16233f 0 14.28%, #6a1f2b 0 28.57%, #40295a 0 42.85%, #1e4a3c 0 57.14%, #1f4f5e 0 71.42%, #573818 0 85.71%, #8f3209 0); border-bottom: 1px solid #36435f; }

.ni-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Masthead stays above the cover; fits every phone width. */
.ni-masthead { position: relative; z-index: 30; }
.ni-icon { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 1px solid var(--ink); color: var(--ink); cursor: pointer; padding: 0; order: 2; }
.ni-home .ni-icon { color: var(--on-cloth); border-color: rgb(243 236 224 / .7); }
.ni-icon:hover { background: var(--ink); color: var(--paper); }
.ni-home .ni-icon:hover { background: var(--on-cloth); color: var(--ink); }
.ni-nav__night { display: none; }
.ni-find-open svg { flex: none; }
@media (min-width: 62em) { .js .ni-icon { display: inline-flex; margin-left: 0; order: 2; } }
@media (max-width: 61.99em) {
	.js .ni-masthead__inner { gap: .5rem; }
	.js .ni-nav.is-open .ni-nav__night { display: block; }
	.ni-nav__night button { font: inherit; font-size: 1.05rem; color: inherit; background: none; border: 0; padding: .8rem 0; width: 100%; text-align: left; cursor: pointer; min-height: 44px; }
}
@media (max-width: 29.99em) {
	.ni-find-open { padding: 0; width: 44px; justify-content: center; }
	.ni-find-open span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.ni-wordmark { font-size: 1.32rem; }
	.ni-nav__toggle { padding: .45rem .7rem; font-size: .9rem; }
	.ni-masthead__inner { padding-inline: 1rem; }
}

/* Cover art bleeds; border reads as blocking. */
.ni-cover::before { border-color: rgb(243 236 224 / .6); }
@media (min-width: 62em) {
	/* Fixed height for the cover, so a font swap inside it cannot move the shelf below. */
	.ni-cover__inner { min-height: clamp(38rem, 56vw, 49rem); align-items: start; }
	.ni-cover__art { margin-right: calc(-1 * var(--gutter) - 3.5rem); align-self: end; }
}
@media (max-width: 47.99em) {
	.ni-cover__inner { padding-block: 2.1rem 1.9rem; gap: 1.1rem; }
	.ni-cover h1 { font-size: clamp(1.95rem, 8.6vw, 2.5rem); margin: .4rem 0 .8rem; }
	.ni-cover__lede { font-size: .98rem; line-height: 1.55; }
	.ni-cover__actions { margin-top: 1.1rem; }
	.ni-cover__art { width: 74%; margin-inline: auto; }
	.ni-book__row .ni-book__num { color: var(--on-cloth) !important; }
}
.ni-toc a { padding-block: .05rem; }
@media (max-width: 61.99em) { .ni-toc a { padding-block: .45rem; } .ni-toc li { padding: 0; } }

/* Provenance: one compact strip in place of two boxes. */
.ni-provenance { display: grid; gap: .75rem 2rem; padding: .85rem 0; margin: 1.5em 0; border-block: 1px solid var(--rule); font-family: var(--label); font-size: .84rem; line-height: 1.45; color: var(--ink-soft); }
.ni-provenance .ni-callout { border: 0; padding: 0; margin: 0; background: none; font-size: inherit; }
.ni-provenance .ni-callout__label { position: static; background: none; padding: 0; margin: 0 0 .15rem !important; font-size: .72rem; color: var(--ink); }
.ni-provenance p + p { margin-top: 0; }
@media (min-width: 48em) { .ni-provenance:has(.ni-callout + .ni-callout) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tables on a phone. */
@media (max-width: 47.99em) {
	.ni-table--stack { overflow: visible; }
	.ni-table--stack table, .ni-table--stack tbody, .ni-table--stack tr, .ni-table--stack td { display: block; width: 100%; }
	.ni-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.ni-table--stack tr { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
	.ni-table--stack tbody tr:last-child { border-bottom: 0; }
	.ni-table--stack td { border: 0; padding: .15rem 0; }
	.ni-table--stack td:first-child { font-weight: 600; font-size: 1rem; }
	.ni-table--stack td:not(:first-child)::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-soft); }
	.ni-table:not(.ni-table--stack):not(.ni-table--record) {
		background: linear-gradient(to right, var(--paper) 30%, transparent) left / 24px 100% no-repeat local, linear-gradient(to left, var(--paper) 30%, transparent) right / 24px 100% no-repeat local, radial-gradient(farthest-side at 0 50%, rgb(22 35 63 / .28), transparent) left / 10px 100% no-repeat scroll, radial-gradient(farthest-side at 100% 50%, rgb(22 35 63 / .28), transparent) right / 10px 100% no-repeat scroll;
	}
}

/* Marginalia. */
.ni-progress { height: 34px !important; background: var(--rule); }
.ni-progress span { background: var(--ch) !important; }
.ni-now { display: none; }
@media (min-width: 62em) {
	.ni-now { display: block; font-family: var(--text); font-style: italic; font-size: .95rem; line-height: 1.3; color: var(--ink); margin-bottom: 1rem; min-height: 2.6em; }
	.ni-margin { font-family: var(--label); font-size: .84rem; margin-top: 1rem; color: var(--ink-soft); }
	.ni-margin-next { display: block; margin-top: 1rem; padding: .85rem 1rem; background: var(--ch); color: var(--on-cloth); font-family: var(--display); font-size: 1.1rem; line-height: 1.2; text-decoration: none; }
	.ni-margin-next span { display: block; font-family: var(--label); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .3rem; }
	.ni-margin-next:hover { color: #fff; }
	.ni-rail .ni-toc { max-height: calc(100vh - 20rem); }
}
@media (max-width: 61.99em) { .ni-margin, .ni-margin-next { display: none; } }

/* Step checklists. */
.ni-checkable { position: relative; list-style: none; }
.ni-check { position: absolute; left: -1.75em; top: .2em; width: 22px; height: 22px; margin: 0; accent-color: var(--ch); cursor: pointer; }
.ni-checkable.is-done { color: var(--ink-soft); }
.ni-content [data-x] { display: none; }
.ni-content[data-checklist] ul, .ni-content[data-checklist] ol { padding-left: 2em; }
.js .ni-checks[hidden] { display: flex; }
.ni-checks { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: 1rem; padding: .6rem .8rem; border: 1px solid var(--rule); background: var(--card); font-family: var(--label); font-size: .88rem; }
.ni-checks button { font: 600 .84rem var(--label); background: none; border: 1px solid var(--ink-soft); color: var(--ink); padding: .25rem .6rem; min-height: 32px; cursor: pointer; }

/* Calculator results lead with the answer. */
.ni-results__total { display: block !important; border-bottom: 2px solid var(--ink) !important; padding-bottom: .7rem !important; margin-bottom: .3rem; }
.ni-results__total span { display: block; font-size: .95rem; color: var(--ink-soft); }
.ni-results__total output { display: block; font-size: clamp(2.3rem, 4vw, 3rem) !important; line-height: 1.1; text-align: left; }
.ni-results__sentence { display: block !important; font-family: var(--text); font-style: italic; border-bottom: 1px solid var(--rule); }
.ni-results__sentence output { font-weight: 500; font-feature-settings: "lnum"; }

/* Plan ladder. */
.ni-ladder { grid-column: 1 / -1; border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.ni-ladder h2, .ni-curve h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.ni-ladder__note { color: var(--ink-soft); font-size: .92rem; margin: .3rem 0 .9rem; max-width: 46em; }
.ni-ladder__list { list-style: none; padding: 0; display: grid; gap: 3px; }
.ni-rung { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 11rem; gap: .9rem; align-items: center; width: 100%; font: inherit; font-size: .92rem; color: var(--ink); background: none; border: 0; border-bottom: 1px solid var(--rule); padding: .55rem .4rem; text-align: left; cursor: pointer; min-height: 44px; }
.ni-rung:hover { background: var(--paper-deep); }
.ni-rung.is-selected { background: var(--paper-deep); box-shadow: inset 3px 0 0 var(--signal-bright); }
.ni-rung__name em { display: block; font-size: .78rem; color: var(--signal); font-style: normal; }
.ni-rung__track { height: 12px; background: var(--paper-deep); display: block; }
.ni-rung__fill { display: block; height: 100%; background: var(--ch); transition: width .25s ease; }
.ni-rung--unread .ni-rung__track { background: none; border: 1px dashed var(--rule); }
.ni-rung__cost { font-weight: 700; text-align: right; font-feature-settings: "lnum", "tnum"; }
.ni-rung__cost small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .78rem; }
@media (max-width: 47.99em) {
	.ni-rung { grid-template-columns: minmax(0, 1fr) auto; }
	.ni-rung__track { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { .ni-rung__fill { transition: none; } }

/* Break-even chart. */
.ni-curve { grid-column: 1 / -1; border-top: 2px solid var(--ink); padding-top: 1.25rem; display: none; }
.js .ni-curve { display: block; }
.ni-curve__chart { height: 280px; font-family: var(--label); color: var(--ink-soft); }
.ni-curve svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ni-axis { stroke: var(--ink-soft); stroke-width: 1; }
.ni-tick { fill: var(--ink-soft); font-size: 13px; }
.ni-line { stroke-width: 3; }
.ni-line--pay { stroke: var(--ch); }
.ni-line--share { stroke: var(--signal-bright); stroke-dasharray: 8 6; }
.ni-drop { stroke: var(--ink-soft); stroke-dasharray: 2 4; }
.ni-dot { fill: var(--signal-bright); }
.ni-curve__be { fill: var(--ink); font-weight: 700; font-size: 15px; }
.ni-curve__tag { font-size: 13px; font-weight: 600; fill: var(--ink); }

/* Route finder line in the matrix. */
.ni-route { display: block; margin-top: .45rem; padding: .35rem .55rem; background: var(--paper-deep); color: var(--ink); font-weight: 600; font-size: .88rem; }
.ni-route[hidden] { display: none; }

/* Pre-flight bench. */
.ni-bench { margin: 2.25em 0; padding: 1.25rem 1.25rem 1.4rem; background: var(--card); border: 1px solid var(--ink); font-family: var(--label); font-size: .98rem; line-height: 1.5; }
.ni-bench__kicker { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--signal); }
.ni-bench h2 { margin-top: .3rem !important; font-size: clamp(1.4rem, 2.8vw, 1.8rem); }
.ni-bench > p { margin-top: .5rem; }
.ni-bench__tool { margin-top: 1rem; }
.js .ni-bench__tool[hidden] { display: block; }
.ni-bench label { font-weight: 600; font-size: .92rem; }
.ni-bench textarea { display: block; width: 100%; margin-top: .3rem; font: 400 1rem/1.5 var(--text); padding: .7rem; background: var(--field, #fff); color: var(--ink); border: 1px solid var(--ink-soft); border-radius: 0; resize: vertical; }
.ni-bench__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; margin-top: .75rem; }
.ni-bench__ghost, .ni-bench__hear { font: 600 .95rem var(--label); color: var(--ink); background: none; border: 1px solid var(--ink); padding: .5rem .85rem; min-height: 44px; cursor: pointer; }
.ni-bench__speech { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ni-bench__speech[hidden] { display: none; }
.ni-bench__speech select { font: 400 .92rem var(--label); padding: .45rem; min-height: 44px; max-width: 13rem; background: var(--field, #fff); color: var(--ink); border: 1px solid var(--ink-soft); border-radius: 0; }
.ni-bench__privacy { font-size: .84rem; color: var(--ink-soft); margin-top: .75rem; }
.ni-bench__summary { margin-top: 1rem; padding-top: .8rem; border-top: 2px solid var(--ink); }
.ni-bench__count { font-family: var(--display); font-size: 1.6rem; line-height: 1.15; }
.ni-bench__finding { margin-top: 1rem; padding-top: .7rem; border-top: 1px solid var(--rule); }
.ni-bench__finding h3 { font-family: var(--label); font-size: 1rem; font-weight: 700; margin: 0 !important; }
.ni-bench__advice, .ni-bench__empty { font-size: .9rem; color: var(--ink-soft); margin-top: .15rem; }
.ni-bench__finding ul { list-style: none; padding: 0; margin-top: .4rem; }
.ni-bench__finding li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .3rem 0; font-size: .92rem; }
.ni-bench__hear { min-height: 36px; padding: .2rem .6rem; font-size: .84rem; flex: none; }

/* Night reading. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) { --paper: #0f1524; --paper-deep: #1b2438; --card: #182033; --ink: #ece5d6; --ink-soft: #b4bccf; --rule: #39435c; --signal: #f2946f; --signal-bright: #e8603a; --ok: #7dc897; --warn: #e6b15a; --field: #0f1524; color-scheme: dark; }
	:root:not([data-theme="light"]) .ni-book__num, :root:not([data-theme="light"]) .ni-facts__count strong { color: var(--signal); }
	:root:not([data-theme="light"]) .ni-rung__fill, :root:not([data-theme="light"]) .ni-progress span, :root:not([data-theme="light"]) .ni-line--pay { background: var(--signal); stroke: var(--signal); }
}
:root[data-theme="dark"] { --paper: #0f1524; --paper-deep: #1b2438; --card: #182033; --ink: #ece5d6; --ink-soft: #b4bccf; --rule: #39435c; --signal: #f2946f; --signal-bright: #e8603a; --ok: #7dc897; --warn: #e6b15a; --field: #0f1524; color-scheme: dark; }
:root[data-theme="dark"] .ni-book__num, :root[data-theme="dark"] .ni-facts__count strong { color: var(--signal); }
:root[data-theme="dark"] .ni-rung__fill, :root[data-theme="dark"] .ni-progress span, :root[data-theme="dark"] .ni-line--pay { background: var(--signal) !important; stroke: var(--signal); }
@media (min-width: 62em) { .ni-nav__list { flex-wrap: nowrap; gap: .25rem .8rem; white-space: nowrap; font-size: .875rem; } }
@media (min-width: 62em) and (max-width: 74.99em) {
	/* Narrow desktops: drop the numerals so the header fits on one line. */
	.ni-nav__num { display: none; }
	.ni-nav__list { gap: .25rem .65rem; font-size: .84rem; }
	.ni-masthead__inner { gap: .75rem; }
	.ni-wordmark { font-size: 1.35rem; }
}
@media (min-width: 48em) { .ni-chapter__grid { min-height: 18rem; } }
.ni-home .ni-nav__night button { color: var(--on-cloth); }

.ni-head:not(.ni-band) { padding-top: 0; }
.ni-article--article .ni-head h1, .ni-article--trust .ni-head h1 { letter-spacing: -.005em; }
