/**
 * textinvisible.com — site chrome and page furniture.
 *
 * The tools bring their own styles from the plugin. This file styles everything
 * around them, and shares the plugin's colour tokens so a tool never looks like
 * it was pasted onto the page from somewhere else.
 *
 * Voxel's default template renders a page with no wrapper at all, so the layout
 * here is doing real work rather than decorating something that already worked.
 *
 * Two rules worth keeping:
 *
 * 1. Light only. No prefers-color-scheme block — adding one back turns the site
 *    dark for every visitor whose machine is in dark mode.
 * 2. The page is wide; the *text* is not. The container is one width everywhere
 *    so the header, tool and footer line up, but prose is capped at a readable
 *    measure inside it. Full-width body text reads at about 120 characters a
 *    line, which is roughly twice what is comfortable.
 */

:root {
	/* Ink. Near-black rather than black — pure black on white is harsh. */
	--tx-fg: #14161c;
	--tx-heading: #0b0d12;
	--tx-muted: #5a6272;
	--tx-faint: #868d9c;

	/* Surfaces */
	--tx-bg: #ffffff;
	--tx-sunken: #f6f7fa;
	--tx-raised: #ffffff;
	--tx-line: #e3e6ec;
	--tx-line-soft: #eef0f4;

	/*
	 * Accent. This is the blue out of the logo SVG, matched exactly so buttons
	 * and links do not sit next to the brand in a different blue. It carries
	 * 8.2:1 against white, so it is safe as body-text link colour.
	 */
	--tx-accent: #004aad;
	--tx-accent-hover: #003a89;
	--tx-accent-soft: #e8f1fb;
	--tx-accent-line: #b6d2ee;

	--tx-ok: #0f7a52;
	--tx-ok-soft: #e8f6ef;

	--tx-radius: 10px;
	--tx-radius-lg: 16px;
	--tx-shadow: 0 1px 2px rgba(16, 20, 34, 0.04), 0 4px 16px rgba(16, 20, 34, 0.05);
	--tx-shadow-hover: 0 2px 6px rgba(0, 74, 173, 0.08), 0 12px 28px rgba(0, 74, 173, 0.10);

	--tx-wrap: 64rem;
}

/*
 * The tool ships with its own dark mode, which it keeps — it is a product used
 * on other sites. Here it is pinned to the light palette and given this site's
 * accent. A media query adds no specificity, so one extra class wins.
 */
.tx-main .txinv,
.tx-tool .txinv {
	--txinv-fg: #14161c;
	--txinv-muted: #5a6272;
	--txinv-bg: #ffffff;
	--txinv-sunken: #f6f7fa;
	--txinv-line: #e3e6ec;
	--txinv-accent: #004aad;
	--txinv-alert: #a4362a;
	--txinv-alert-bg: #fdeeeb;
	--txinv-ok: #0f7a52;
	--txinv-ok-bg: #e8f6ef;
	--txinv-warn: #7a5410;
	--txinv-warn-bg: #fbf1dd;
	--txinv-radius: 8px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	/*
	 * A bigger root than the browser default of 16px, and this is the line that
	 * does most of the work.
	 *
	 * The prose was already 1.125rem and read fine. The tool did not, and the
	 * reason was not the tool's design: every size in the plugin's stylesheet is
	 * in rem, so it measures against the ROOT size and not against the 1.125rem
	 * body sitting around it. The result was 18px paragraphs wrapped around
	 * 13px labels, which is why the tool felt cramped next to the page.
	 *
	 * A percentage rather than a pixel value, so somebody who has raised their
	 * browser's default text size still gets their setting, scaled — a fixed
	 * `17px` here would quietly overrule them.
	 */
	font-size: 106.25%;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;

	/*
	 * The header is sticky, so without this every jump to an id lands underneath
	 * it: an FAQ deep link, a link into a step list, and Google's own
	 * scroll-to-text highlight when somebody arrives from a search result. The
	 * header is about 65px tall, so 5rem clears it with room to spare.
	 */
	scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	background: var(--tx-bg);
	color: var(--tx-fg);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	font-size: 1.125rem;
	line-height: 1.75;
	letter-spacing: -0.005em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--tx-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.12s ease;
}

a:hover {
	color: var(--tx-accent-hover);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--tx-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.tx-skip {
	position: absolute;
	left: -9999px;
}

.tx-skip:focus {
	left: 1rem;
	top: 1rem;
	z-index: 100;
	padding: 0.7rem 1.1rem;
	background: var(--tx-bg);
	border: 1px solid var(--tx-accent);
	border-radius: var(--tx-radius);
	box-shadow: var(--tx-shadow);
}

/* ---- header ---- */

.tx-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.86);
	backdrop-filter: saturate(1.6) blur(10px);
	-webkit-backdrop-filter: saturate(1.6) blur(10px);
	border-bottom: 1px solid var(--tx-line-soft);
}

.tx-header-inner {
	max-width: var(--tx-wrap);
	margin: 0 auto;
	padding: 0.9rem 1.5rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 1.5rem;
}

.tx-logo {
	font-size: 1.075rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	color: var(--tx-heading);
	text-decoration: none;
	white-space: nowrap;
}

.tx-logo span {
	color: var(--tx-accent);
}

/*
 * The uploaded logo. The height is fixed and the width follows the file, so
 * replacing the logo with a differently proportioned one cannot change the
 * height of the header.
 */
.tx-logo-img {
	display: block;
	width: auto;
	height: 34px;
}

/*
 * The nav is pushed right by the header's `space-between`, not by
 * `margin-left: auto`. The difference only shows once the menu is too wide to
 * sit beside the logo — around 737px with five items and this logo.
 *
 * With `margin-left: auto` the wrapped nav kept being pushed to the far right,
 * so it landed on its own row hard against the right edge with the logo alone
 * above it, ragged. `space-between` distributes each flex line on its own, and
 * a line holding one item is simply placed at the start, so the wrapped nav
 * sits neatly under the logo instead. Same result at full width, sane result
 * at every other width.
 */
.tx-nav {
	min-width: 0;
}

/* The list is the flex row; the nav is just the landmark around it. */
.tx-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tx-menu li {
	margin: 0;
}

.tx-nav a {
	display: block;
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	color: var(--tx-muted);
	text-decoration: none;
	font-size: 0.96rem;
	font-weight: 500;
	white-space: nowrap;
	transition: background 0.12s ease, color 0.12s ease;
}

.tx-nav a:hover {
	color: var(--tx-heading);
	background: var(--tx-sunken);
}

.tx-nav .current-menu-item > a,
.tx-nav a[aria-current="page"] {
	color: var(--tx-accent);
	background: var(--tx-accent-soft);
	font-weight: 600;
}

/* ---- page shell ---- */

.tx-main {
	max-width: var(--tx-wrap);
	margin: 0 auto;
	padding: 3rem 1.5rem 5rem;
}

.tx-main h1 {
	font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.1rem);
	line-height: 1.08;
	letter-spacing: -0.035em;
	font-weight: 800;
	color: var(--tx-heading);
	margin: 0 0 0.75rem;
	text-wrap: balance;
}

.tx-main h2 {
	font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.6rem);
	line-height: 1.25;
	letter-spacing: -0.022em;
	font-weight: 700;
	color: var(--tx-heading);
	margin: 3.25rem 0 0.75rem;
	text-wrap: balance;
}

.tx-main h3 {
	font-size: 1.075rem;
	line-height: 1.35;
	letter-spacing: -0.012em;
	font-weight: 650;
	color: var(--tx-heading);
	margin: 2rem 0 0.5rem;
}

.tx-main p,
.tx-main li {
	margin: 0 0 1.1rem;
}

.tx-main ul,
.tx-main ol {
	padding-left: 1.35rem;
}

.tx-main li {
	margin-bottom: 0.55rem;
	padding-left: 0.2rem;
}

.tx-main li::marker {
	color: var(--tx-faint);
}

.tx-main strong {
	font-weight: 650;
	color: var(--tx-heading);
}

/* The standfirst under the page title. */
.tx-lede {
	font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.25rem);
	line-height: 1.55;
	color: var(--tx-muted);
	margin: 0 0 2.25rem !important;
	text-wrap: pretty;
}

/* ---- the tool ---- */

.tx-tool {
	margin: 2rem 0 2.5rem;
	padding: 1.75rem;
	background: var(--tx-raised);
	border: 1px solid var(--tx-line);
	border-radius: var(--tx-radius-lg);
	box-shadow: var(--tx-shadow);
}

@media (max-width: 640px) {
	.tx-tool {
		padding: 1.1rem;
		border-radius: 12px;
		margin-left: -0.75rem;
		margin-right: -0.75rem;
	}
}

/* ---- tool cards ---- */

.tx-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
	gap: 1rem;
	margin: 1.75rem 0 2.5rem;
	padding: 0;
	list-style: none;
	max-width: none;
}

/*
 * Cards and steps are laid out, not read as a list, so the prose indent must
 * not reach them -- and a bare .tx-cards cannot say so.
 *
 * `.tx-main ul` is one class plus one element, which outranks `.tx-cards` on
 * its own no matter which comes later in the file. So `padding: 0` on the
 * card grid silently lost, and every card block sat about 23px right of the
 * paragraph above it while its right edge stayed flush -- which reads as the
 * whole block being off-centre. The reset has to carry the same scope to win.
 */
.tx-main .tx-cards,
.tx-main .tx-steps {
	padding-left: 0;
}

.tx-cards li {
	margin: 0;
	padding: 0;
}

.tx-cards li::marker {
	content: "";
}

.tx-card {
	display: block;
	height: 100%;
	padding: 1.35rem 1.4rem;
	background: var(--tx-raised);
	border: 1px solid var(--tx-line);
	border-radius: var(--tx-radius);
	text-decoration: none;
	color: inherit;
	transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.tx-card:hover {
	border-color: var(--tx-accent-line);
	box-shadow: var(--tx-shadow-hover);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.tx-card:hover {
		transform: none;
	}
}

.tx-card b {
	display: block;
	font-size: 1.02rem;
	font-weight: 650;
	letter-spacing: -0.012em;
	color: var(--tx-accent);
	margin-bottom: 0.3rem;
}

.tx-card span {
	display: block;
	font-size: 0.96rem;
	color: var(--tx-muted);
	line-height: 1.6;
}

/* ---- callout ---- */

.tx-note {
	margin: 1.75rem 0;
	padding: 1.1rem 1.25rem;
	background: var(--tx-accent-soft);
	border: 1px solid var(--tx-accent-line);
	border-radius: var(--tx-radius);
	font-size: 1rem;
	line-height: 1.65;
}

.tx-note p {
	margin-bottom: 0.7rem;
}

.tx-note p:last-child {
	margin-bottom: 0;
}

/* ---- numbered steps ----
 *
 * An ordered list with the number drawn as a chip, because "do this, then this"
 * is most of what people come here for and it should be scannable without
 * reading the sentences.
 */

.tx-steps {
	counter-reset: tx-step;
	list-style: none;
	margin: 1.5rem 0 2rem;
	padding: 0;
}

.tx-steps li {
	counter-increment: tx-step;
	position: relative;
	margin: 0 0 1rem;
	padding: 0 0 0 3rem;
	min-height: 2rem;
}

.tx-steps li::before {
	content: counter(tx-step);
	position: absolute;
	left: 0;
	top: -0.1rem;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--tx-accent);
	color: #fff;
	font-size: 0.92rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.tx-steps li::marker {
	content: "";
}

.tx-steps strong {
	display: block;
}

/* ---- worked example ----
 *
 * Before and after, side by side. The point of these pages is usually a
 * difference you cannot see, so the label has to carry what the eye cannot.
 */

.tx-example {
	max-width: none;
	margin: 1.75rem 0 2.25rem;
	border: 1px solid var(--tx-line);
	border-radius: var(--tx-radius);
	overflow: hidden;
	background: var(--tx-raised);
}

.tx-example-head {
	padding: 0.7rem 1.1rem;
	background: var(--tx-sunken);
	border-bottom: 1px solid var(--tx-line);
	font-size: 0.88rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tx-muted);
}

/*
 * Two explicit columns that become one row each below 560px.
 *
 * Under auto-fit this stacked on its own, but the divider between the halves is
 * `border-right` — stacked, that drew a stray vertical line down the right of
 * the "before" half and nothing at all between before and after, which is the
 * one edge this block exists to show. Naming the breakpoint lets the border
 * turn with it.
 */
.tx-example-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.tx-example-body > div {
	padding: 1.1rem 1.25rem;
	border-right: 1px solid var(--tx-line-soft);
}

.tx-example-body > div:last-child {
	border-right: none;
}

@media (max-width: 560px) {
	.tx-example-body {
		grid-template-columns: 1fr;
	}

	.tx-example-body > div {
		border-right: none;
		border-bottom: 1px solid var(--tx-line-soft);
	}

	.tx-example-body > div:last-child {
		border-bottom: none;
	}
}

.tx-example h4 {
	margin: 0 0 0.5rem;
	font-size: 0.88rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tx-faint);
}

.tx-example p {
	margin: 0 0 0.5rem;
	font-size: 0.98rem;
	line-height: 1.6;
}

.tx-example p:last-child {
	margin-bottom: 0;
}

/* Monospace so an odd character cannot hide inside proportional spacing. */
.tx-mono {
	display: block;
	padding: 0.6rem 0.75rem;
	margin: 0 0 0.6rem;
	background: var(--tx-sunken);
	border: 1px solid var(--tx-line-soft);
	border-radius: 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.95rem;
	line-height: 1.5;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-word;
}

.tx-main code {
	padding: 0.12em 0.4em;
	background: var(--tx-sunken);
	border: 1px solid var(--tx-line-soft);
	border-radius: 5px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.875em;
}

/* ---- FAQ ----
 *
 * Plain <details>. Opens with no JavaScript, works from the keyboard, and a
 * crawler reads it whether it is open or shut.
 */

.tx-faq {
	margin: 1.25rem 0 0;
	border: 1px solid var(--tx-line);
	border-radius: var(--tx-radius);
	overflow: hidden;
}

.tx-faq details {
	border-bottom: 1px solid var(--tx-line-soft);
	background: var(--tx-raised);
}

.tx-faq details:last-child {
	border-bottom: none;
}

.tx-faq summary {
	padding: 1.05rem 1.25rem;
	font-weight: 600;
	color: var(--tx-heading);
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	transition: background 0.12s ease;
}

.tx-faq summary:hover {
	background: var(--tx-sunken);
}

.tx-faq summary::-webkit-details-marker {
	display: none;
}

.tx-faq summary::before {
	content: "+";
	flex: none;
	width: 1.1rem;
	color: var(--tx-accent);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.35;
}

.tx-faq details[open] summary::before {
	content: "\2212";
}

.tx-faq details[open] summary {
	background: var(--tx-sunken);
}

.tx-faq details > *:not(summary) {
	margin-left: 3.1rem;
	margin-right: 1.25rem;
	font-size: 1rem;
}

.tx-faq details > *:last-child {
	padding-bottom: 1.1rem;
}

/* ---- footer ---- */

.tx-footer {
	border-top: 1px solid var(--tx-line);
	background: var(--tx-sunken);
	padding: 3rem 1.5rem 2.25rem;
	font-size: 0.96rem;
}

/*
 * Four named columns rather than `repeat(auto-fit, minmax(13rem, 1fr))`.
 *
 * auto-fit fits as many columns as will go, which with exactly four children
 * guarantees a width where three fit and the fourth is orphaned on a row of its
 * own. At a 17px root that window was roughly 1000–1037px of viewport — which
 * is exactly where a 1024px iPad in landscape lands. Going straight from four
 * to two skips the orphan entirely, and two-by-two is a better shape on a
 * tablet than three-and-a-widow anyway.
 */
.tx-footer-inner {
	max-width: var(--tx-wrap);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
}

@media (max-width: 900px) {
	.tx-footer-inner {
		grid-template-columns: repeat(2, 1fr);
		gap: 2rem 1.5rem;
	}
}

/*
 * Two columns on a phone, not one.
 *
 * Stacked, the four blocks pushed the colophon most of a screen below the
 * last link, and "The tools" and "This site" are both short link lists that
 * sit happily side by side at half width.
 *
 * The fourth block is the exception and has to span: it is the only one
 * carrying a paragraph rather than links, and half a phone is too narrow to
 * read one in. It is the last child of the grid -- the colophon is a sibling
 * of .tx-footer-inner, not part of it -- so :last-child is safe here.
 */
@media (max-width: 560px) {
	.tx-footer-inner {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.75rem 1.25rem;
	}

	.tx-footer-inner > div:last-child {
		grid-column: 1 / -1;
	}
}

.tx-footer h2 {
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--tx-faint);
	margin: 0 0 0.85rem;
}

.tx-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tx-footer li {
	margin: 0 0 0.5rem;
}

.tx-footer a {
	color: var(--tx-fg);
	text-decoration: none;
}

.tx-footer a:hover {
	color: var(--tx-accent);
	text-decoration: underline;
}

.tx-footer p {
	margin: 0 0 0.5rem;
	color: var(--tx-muted);
	line-height: 1.65;
}

.tx-colophon {
	max-width: var(--tx-wrap);
	margin: 2.25rem auto 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--tx-line);
	color: var(--tx-faint);
	font-size: 0.92rem;
}

.tx-colophon p {
	margin: 0;
	color: var(--tx-faint);
}

@media (max-width: 640px) {
	.tx-main {
		padding: 2.25rem 1.25rem 3.5rem;
	}

	/*
	 * Not sticky on a phone.
	 *
	 * The logo takes a row of its own here and five menu items wrap onto two
	 * more, so the header is three rows tall. Pinned, that is roughly a fifth
	 * of the screen gone for the whole of every page. There is deliberately no
	 * hamburger -- every link stays visible, which is the right trade on a
	 * five-item menu -- so the way to pay for those three rows once instead of
	 * forever is to let the header scroll away.
	 *
	 * Revisit if a sticky header is ever wanted back: the fix then is a
	 * shorter header, not a menu hidden behind a tap.
	 */
	.tx-header {
		position: static;
	}

	/*
	 * With nothing pinned there is nothing for an anchor to land underneath,
	 * so the offset that clears the sticky header is not wanted here.
	 */
	html {
		scroll-padding-top: 1.25rem;
	}

	.tx-header-inner {
		padding: 0.75rem 1.25rem;
		justify-content: center;
		text-align: center;
	}

	/*
	 * Centre the brand on a phone. Giving the logo the whole row is what
	 * pushes the menu onto the line below, where it is centred as well.
	 * Without it the logo sits hard against the left edge with the menu
	 * wrapped underneath and off to one side.
	 */
	.tx-logo {
		flex: 0 0 100%;
	}

	.tx-logo-img {
		height: 30px;
		margin: 0 auto;
	}

	.tx-nav {
		width: 100%;
		margin-left: 0;
	}

	.tx-menu {
		justify-content: center;
	}

	.tx-main h2 {
		margin-top: 2.5rem;
	}

	/*
	 * Match .tx-main's mobile padding. The footer kept 1.5rem while the content
	 * above it dropped to 1.25rem, so the footer text started a few pixels
	 * further in than every line on the page above it.
	 */
	.tx-footer {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}

	/*
	 * The answer was indented 3.1rem to clear the +/- marker. On a 375px screen
	 * that left about 26 characters a line once the FAQ's own padding was taken
	 * off too. The marker is only 1.1rem wide plus a 0.75rem gap, so on a phone
	 * the answer starts under it instead of beside it.
	 */
	.tx-faq details > *:not(summary) {
		margin-left: 1.25rem;
		margin-right: 1.25rem;
	}
}

/* ---- winning against the parent theme ----
 *
 * This stylesheet is enqueued at priority 100 so it loads after Voxel's
 * commons.css and Elementor's global kit, both of which set a font family and a
 * link colour for the whole document. Before that change the pages rendered in
 * Roboto with green links, neither of which is from this file.
 *
 * Load order does the work; these rules are the belt to that pair of braces, so
 * a future plugin enqueueing later cannot quietly take the page back.
 */

body,
.tx-main,
.tx-header,
.tx-footer {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}

.tx-main a,
.tx-note a,
.tx-faq a {
	color: var(--tx-accent);
}

.tx-main a:hover,
.tx-note a:hover,
.tx-faq a:hover {
	color: var(--tx-accent-hover);
}

.tx-main .tx-card,
.tx-main .tx-card:hover {
	color: inherit;
}

.tx-main .tx-card b {
	color: var(--tx-accent);
}

.tx-footer a {
	color: var(--tx-fg);
}

.tx-footer a:hover {
	color: var(--tx-accent);
}

.tx-nav a {
	color: var(--tx-muted);
}

.tx-nav a:hover {
	color: var(--tx-heading);
}

.tx-nav .current-menu-item > a,
.tx-nav a[aria-current="page"] {
	color: var(--tx-accent);
}

.tx-logo {
	color: var(--tx-heading);
}

.tx-logo span {
	color: var(--tx-accent);
}
