/* «С голоса» — the site.
 *
 * The palette is the app's (DictaKeySwift/DictaKeySwift/UI/Theme.swift):
 * surfaces and lines are shades of the text colour; nothing else is coloured.
 * The signal colour belongs to the mark alone (UI/BrandMark.swift).
 *
 * No web fonts are loaded: PT Serif ships with macOS and was drawn for
 * Cyrillic; the body is the system font, as in the app.
 */

:root {
	color-scheme: light dark;

	--paper: #ffffff;
	--ink: rgb(26 26 26);
	--ink-soft: rgb(26 26 26 / 0.64);
	--surface-faint: rgb(26 26 26 / 0.05);
	--surface: rgb(26 26 26 / 0.08);
	--surface-hover: rgb(26 26 26 / 0.14);
	--line: rgb(26 26 26 / 0.16);
	--signal: #ff5a3c; /* the mark's cursor, and only it */

	--radius: 7px;
	--column: 44rem;
	--wide: 60rem;
	--gutter: clamp(1.25rem, 5vw, 3rem);

	--serif: "PT Serif", ui-serif, "New York", Georgia, serif;
	--sans: system-ui, -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root {
		--paper: #1e1e1e;
		--ink: rgb(240 240 240);
		--ink-soft: rgb(240 240 240 / 0.66);
		--surface-faint: rgb(240 240 240 / 0.06);
		--surface: rgb(240 240 240 / 0.1);
		--surface-hover: rgb(240 240 240 / 0.17);
		--line: rgb(240 240 240 / 0.2);
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.55;
	overflow-wrap: break-word;
}

img,
svg {
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
	border-radius: 3px;
}

h1,
h2 {
	font-family: var(--serif);
	font-weight: 400;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

h1 {
	margin: 0;
	font-size: clamp(2.1rem, 6.4vw, 3.9rem);
	line-height: 1.08;
}

h2 {
	margin: 0 0 1.1rem;
	font-size: clamp(1.6rem, 3.6vw, 2.15rem);
	line-height: 1.18;
}

h3 {
	margin: 2.2rem 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 650;
	line-height: 1.35;
}

p,
ul,
ol,
dl {
	margin: 0 0 1rem;
}

ul,
ol {
	padding-left: 1.3rem;
}

li + li {
	margin-top: 0.35rem;
}

code,
kbd {
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	font-size: 0.92em;
}

kbd {
	padding: 0.08em 0.4em;
	border: 1px solid var(--line);
	border-radius: 5px;
	background: var(--surface-faint);
	white-space: nowrap;
}

.soft {
	color: var(--ink-soft);
}

.small {
	font-size: 0.9375rem;
}

/* ---- page frame ------------------------------------------------------ */

.frame {
	max-width: calc(var(--wide) + 2 * var(--gutter));
	margin: 0 auto;
	padding: 0 var(--gutter);
}

.column {
	max-width: var(--column);
}

.top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem 1.5rem;
	padding-top: 1.4rem;
	padding-bottom: 1.4rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-family: var(--serif);
	font-size: 1.3rem;
	line-height: 1;
	text-decoration: none;
}

.mark {
	width: 1.9rem;
	height: 1.9rem;
	flex: none;
}

.mark-letter {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.3;
	stroke-linecap: round;
}

.mark-cursor {
	fill: none;
	stroke: var(--signal);
	stroke-width: 1.43;
	stroke-linecap: round;
}

.nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1.4rem;
	margin-left: auto;
	font-size: 0.9375rem;
}

.nav a {
	text-decoration: none;
}

.nav a:hover {
	text-decoration: underline;
}

/* ---- buttons --------------------------------------------------------- */

.button {
	display: inline-block;
	padding: 0.72rem 1.25rem;
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink);
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.button:hover {
	background: var(--surface-hover);
}

.button-main {
	background: var(--ink);
	color: var(--paper);
}

.button-main:hover {
	background: var(--ink);
	opacity: 0.86;
}

.top-button {
	padding: 0.45rem 0.9rem;
	font-size: 0.9375rem;
}

/* On a phone: the name and the button on one line, the links under them. */
@media (max-width: 34rem) {
	.top-button {
		margin-left: auto;
	}

	.nav {
		order: 3;
		flex-basis: 100%;
		margin-left: 0;
	}
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem;
	margin: 1.8rem 0 1.1rem;
}

/* ---- the opening ----------------------------------------------------- */

.opening {
	padding-top: clamp(2.5rem, 9vw, 6.5rem);
	padding-bottom: clamp(2.5rem, 7vw, 5rem);
}

.opening h1 {
	max-width: 17em;
}

/* Under the heading: the words on the left, the example on the right. */
.opening-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
	gap: 2.4rem 3rem;
	align-items: start;
	margin-top: 2rem;
}

.opening-row .lede {
	margin-top: 0;
}

@media (max-width: 56rem) {
	.opening-row {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- the example in the opening -------------------------------------- */

/* A drawing of what happens on the screen: the menu bar with the mark, a
 * window with a text field, and the key under the thumb. Without motion it
 * shows the end of it — a phrase in place; the motion below replays the
 * whole of it three times, with three phrases. */
.stage {
	margin: 0;
}

.stage-scene {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface-faint);
}

.stage-bar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	height: 1.9rem;
	padding: 0 0.85rem;
	border-bottom: 1px solid var(--line);
}

.stage-other {
	width: 0.9rem;
	height: 0.55rem;
	border-radius: 3px;
	background: var(--line);
}

/* The mark as the app draws it in the menu bar (UI/BrandMark.swift): while
 * recording it takes the signal colour and a dot stands in for the cursor. */
.stage-mark {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	color: var(--ink);
}

.stage-mark-line {
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
}

.stage-mark-cursor {
	stroke-width: 1.49;
}

.stage-mark-dot {
	fill: var(--signal);
	opacity: 0;
}

.stage-sheet {
	display: grid;
	min-height: 6.7rem;
	margin: 1rem;
	padding: 0.95rem 1.1rem;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--paper);
	line-height: 1.5;
}

.said {
	grid-area: 1 / 1;
	margin: 0;
	opacity: 0;
}

.said-1 {
	opacity: 1;
}

.stage-hand {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0 1rem 1rem;
}

.keycap {
	display: inline-flex;
	flex: none;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	width: 3.1rem;
	height: 3.1rem;
	padding: 0.32rem 0.42rem;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--paper);
	box-shadow: 0 2px 0 var(--line);
	line-height: 1;
}

.keycap-sign {
	font-size: 1.05rem;
}

.keycap-name {
	color: var(--ink-soft);
	font-size: 0.625rem;
}

.voice {
	display: none;
	flex: none;
	align-items: center;
	gap: 3px;
	height: 1.5rem;
}

.voice i {
	width: 3px;
	height: 100%;
	border-radius: 2px;
	background: var(--ink);
	transform: scaleY(0.25);
}

.stage-hints {
	display: grid;
	color: var(--ink-soft);
	font-size: 0.9375rem;
	line-height: 1.35;
}

.stage-hint {
	grid-area: 1 / 1;
}

.hint-hold {
	opacity: 0;
}

.stage figcaption {
	margin-top: 0.7rem;
	color: var(--ink-soft);
	font-size: 0.875rem;
}

/* One turn is six seconds: half a second of waiting, two and a half of
 * holding the key and speaking, 0.7 s until the text is there — about what
 * the level «Оптимально» measured — and two seconds to read it. */
@media (prefers-reduced-motion: no-preference) {
	.voice {
		display: inline-flex;
		opacity: 0;
		animation: stage-held 6s infinite;
	}

	.voice i {
		animation: stage-voice 0.62s ease-in-out infinite alternate;
	}

	.voice i:nth-child(2) { animation-duration: 0.47s; animation-delay: -0.2s; }
	.voice i:nth-child(3) { animation-duration: 0.71s; animation-delay: -0.5s; }
	.voice i:nth-child(4) { animation-duration: 0.39s; animation-delay: -0.1s; }
	.voice i:nth-child(5) { animation-duration: 0.58s; animation-delay: -0.4s; }
	.voice i:nth-child(6) { animation-duration: 0.44s; animation-delay: -0.3s; }
	.voice i:nth-child(7) { animation-duration: 0.66s; animation-delay: -0.6s; }

	.keycap {
		animation: stage-key 6s infinite;
	}

	.stage-mark {
		animation: stage-mark 6s infinite;
	}

	.stage-mark-dot {
		animation: stage-held 6s infinite;
	}

	.stage-mark-cursor {
		animation: stage-released 6s infinite;
	}

	.hint-hold {
		animation: stage-hint-hold 6s infinite;
	}

	.hint-done {
		animation: stage-hint-done 6s infinite;
	}

	.said-wait {
		animation: stage-wait 6s infinite;
	}

	.said-1,
	.said-2,
	.said-3 {
		opacity: 0;
		animation: stage-said 18s infinite;
	}

	.said-2 {
		animation-delay: 6s;
	}

	.said-3 {
		animation-delay: 12s;
	}
}

@keyframes stage-held {
	0%, 7.9% { opacity: 0; }
	8%, 50% { opacity: 1; }
	50.1%, 100% { opacity: 0; }
}

@keyframes stage-released {
	0%, 7.9% { opacity: 1; }
	8%, 50% { opacity: 0; }
	50.1%, 100% { opacity: 1; }
}

@keyframes stage-mark {
	0%, 7.9% { color: var(--ink); }
	8%, 50% { color: var(--signal); }
	50.1%, 100% { color: var(--ink); }
}

@keyframes stage-key {
	0%, 7.9% { transform: none; box-shadow: 0 2px 0 var(--line); background: var(--paper); }
	8%, 50% { transform: translateY(2px); box-shadow: 0 0 0 var(--line); background: var(--surface-hover); }
	50.1%, 100% { transform: none; box-shadow: 0 2px 0 var(--line); background: var(--paper); }
}

@keyframes stage-voice {
	from { transform: scaleY(0.2); }
	to { transform: scaleY(1); }
}

@keyframes stage-hint-hold {
	0%, 50% { opacity: 1; }
	50.1%, 100% { opacity: 0; }
}

@keyframes stage-hint-done {
	0%, 61.6% { opacity: 0; }
	61.7%, 96% { opacity: 1; }
	100% { opacity: 0; }
}

/* The empty field with the cursor in it, until the text arrives. */
@keyframes stage-wait {
	0%, 61.6% { opacity: 1; }
	61.7%, 96% { opacity: 0; }
	100% { opacity: 1; }
}

/* A phrase is there for the last part of its own six seconds out of eighteen. */
@keyframes stage-said {
	0%, 20.5% { opacity: 0; }
	20.6%, 32% { opacity: 1; }
	33.3%, 100% { opacity: 0; }
}

/* Where the spoken words land: the cursor of the mark, standing after the
 * last word. Taller than the letters and thin, as in the mark. */
.caret {
	display: inline-block;
	width: 0.05em;
	height: 1.02em;
	margin-left: 0.09em;
	background: currentColor;
	border-radius: 1px;
	vertical-align: -0.14em;
	animation: caret 1.1s steps(1, end) infinite;
}

@keyframes caret {
	50% {
		opacity: 0;
	}
}

.lede {
	max-width: 36rem;
	margin: 1.5rem 0 0;
	font-size: 1.1875rem;
	line-height: 1.5;
}

.lede-second {
	max-width: 36rem;
	margin: 0.9rem 0 0;
	color: var(--ink-soft);
}

/* ---- the mark in the text -------------------------------------------- */

/* The mark is a letter and a cursor in the signal colour. On the page the
 * same two things mark what matters: a few words take the colour, and the
 * cursor stands where the eye should stop.
 *
 * The colour is for large type only — 24 px and up. On white its contrast is
 * 3.1 : 1: enough for a heading, too little for a line of small text. */
.hl {
	color: var(--signal);
}

/* The cursor of the mark, standing after the last word: thin and taller
 * than the letters. It does not blink — the one in the example does. */
.cursor {
	display: inline-block;
	width: 0.05em;
	min-width: 2px;
	height: 1.04em;
	margin-left: 0.1em;
	border-radius: 1px;
	background: var(--signal);
	vertical-align: -0.15em;
}

/* One sentence that says what the section is about, set as large as a
 * heading: for the one who only looks through. */
.statement {
	max-width: 26em;
	margin: 0 0 1rem;
	font-family: var(--serif);
	font-size: clamp(1.5rem, 3vw, 1.75rem);
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* ---- what sets it apart ---------------------------------------------- */

.points {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2.3rem 2.6rem;
	max-width: var(--wide);
	margin: 1.7rem 0 0;
	padding: 0;
	list-style: none;
}

.point {
	position: relative;
	margin: 0;
	padding-left: 1.05rem;
}

.point::before {
	content: "";
	position: absolute;
	top: 0.05rem;
	left: 0;
	width: 2px;
	height: 1.8rem;
	border-radius: 1px;
	background: var(--signal);
}

.point h3 {
	margin: 0 0 0.5rem;
	font-family: var(--serif);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.point p {
	margin: 0;
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

@media (max-width: 56rem) {
	.points {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 36rem) {
	.points {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.7rem;
	}
}

/* ---- translation and editing: two blocks of their own ---------------- */

.features {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.2rem;
	max-width: var(--wide);
	margin: 2.8rem 0 0;
}

.feature {
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--surface-faint);
}

.feature h3 {
	margin: 0 0 0.6rem;
	font-family: var(--serif);
	font-size: clamp(1.5rem, 2.6vw, 1.75rem);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.feature > p {
	margin: 0 0 1.1rem;
}

.feature > p:last-child {
	margin: 0.9rem 0 0;
}

/* What goes in and what comes out; the result stands on paper, like the
 * text in the example of the opening. The two examples end on one line. */
.demo {
	display: grid;
	gap: 0.7rem;
	margin-top: auto;
}

.demo-row {
	margin: 0;
}

.demo-label {
	display: block;
	margin-bottom: 0.15rem;
	color: var(--ink-soft);
	font-size: 0.8125rem;
}

.demo-out {
	padding: 0.8rem 1rem;
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--paper);
}

@media (max-width: 48rem) {
	.features {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- sections -------------------------------------------------------- */

.section {
	padding-top: clamp(2.5rem, 6vw, 4rem);
	padding-bottom: clamp(2.5rem, 6vw, 4rem);
	border-top: 1px solid var(--line);
}

.section > :last-child,
.column > :last-child {
	margin-bottom: 0;
}

/* ---- heard and inserted ---------------------------------------------- */

.takes {
	max-width: var(--wide);
	margin: 1.6rem 0 0;
	padding: 0;
	list-style: none;
}

.take {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.3rem 2rem;
	margin: 0;
	padding: 0.95rem 0;
	border-top: 1px solid var(--line);
}

.take:last-child {
	border-bottom: 1px solid var(--line);
}

.take-heads {
	padding: 0 0 0.5rem;
	border-top: 0;
	color: var(--ink-soft);
	font-size: 0.875rem;
}

.take p {
	margin: 0;
}

.heard {
	color: var(--ink-soft);
}

.take-label {
	display: none;
	color: var(--ink-soft);
	font-size: 0.8125rem;
}

/* What changed between the two, shown the way selected text looks. */
mark {
	padding: 0.05em 0.18em;
	border-radius: 4px;
	background: var(--surface-hover);
	color: inherit;
}

.heard mark {
	background: var(--surface);
}

.note {
	grid-column: 1 / -1;
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

@media (max-width: 40rem) {
	.take {
		grid-template-columns: 1fr;
	}

	.take-heads {
		display: none;
	}

	.take-label {
		display: block;
	}
}

/* ---- what the keys do ------------------------------------------------ */

.keys {
	display: grid;
	grid-template-columns: minmax(9rem, 13rem) 1fr;
	gap: 0;
	max-width: var(--wide);
	margin: 1.4rem 0 0;
}

.keys dt,
.keys dd {
	margin: 0;
	padding: 0.95rem 0;
	border-top: 1px solid var(--line);
}

.keys dt {
	padding-right: 1.5rem;
	font-weight: 650;
}

.keys dd > :last-child {
	margin-bottom: 0;
}

@media (max-width: 40rem) {
	.keys {
		grid-template-columns: 1fr;
	}

	.keys dd {
		padding-top: 0;
		border-top: 0;
	}

	.keys dt {
		padding-bottom: 0.3rem;
	}
}

/* ---- windows of the app ---------------------------------------------- */

/* Two windows drawn by the app itself, side by side at one scale: the
 * columns are as wide as the windows are (560 and 500 points). */
.windows {
	display: grid;
	grid-template-columns: 56fr 50fr;
	gap: 1.6rem 2rem;
	align-items: start;
	max-width: var(--wide);
	margin: 2.4rem 0 0;
}

.win {
	margin: 0;
}

.win img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: 10px;
}

.win figcaption {
	margin-top: 0.6rem;
	color: var(--ink-soft);
	font-size: 0.875rem;
}

@media (max-width: 40rem) {
	.windows {
		grid-template-columns: minmax(0, 1fr);
	}

	.win {
		max-width: 26rem;
	}
}

/* ---- what stays on the Mac, what goes out ---------------------------- */

/* The solid frame is the Mac; what is outside it is the network. */
.flow {
	display: grid;
	gap: 1rem;
	max-width: var(--wide);
	margin: 1.6rem 0 1.4rem;
}

.flow-mac,
.flow-net {
	padding: 1.2rem 1.3rem;
	border-radius: 12px;
}

.flow-mac {
	border: 1.5px solid var(--ink);
}

.flow-net {
	border: 1px dashed var(--line);
}

.flow h3 {
	margin: 0 0 0.9rem;
}

.flow > div > :last-child {
	margin-bottom: 0;
}

.flow p {
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

.flow-chain {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.flow-chain li {
	display: flex;
	align-items: center;
	margin: 0;
}

/* The arrow stands after a step, so a line never begins with one. */
.flow-chain li:not(:last-child)::after {
	content: "→";
	margin: 0 0.5rem;
	color: var(--ink-soft);
}

.flow-chain span {
	padding: 0.4rem 0.7rem;
	border-radius: var(--radius);
	background: var(--surface);
	font-weight: 600;
	white-space: nowrap;
}

.flow-net ul {
	columns: 2;
	column-gap: 2.5rem;
}

.flow-net li {
	break-inside: avoid;
}

@media (max-width: 48rem) {
	.flow-net ul {
		columns: 1;
	}
}

/* ---- tables ---------------------------------------------------------- */

/* The first and the last cell are padded, so a tinted row has air on both
 * sides; the table is pulled out by the same amount, and its text stays on
 * the line of the paragraphs around it. */
.table-wrap {
	--inset: 0.6rem;
	max-width: calc(var(--wide) + 2 * var(--inset));
	margin: 1.4rem calc(-1 * var(--inset)) 1rem;
	overflow-x: auto;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}

caption {
	padding: 0 var(--inset) 0.7rem;
	color: var(--ink-soft);
	font-size: 0.9375rem;
	text-align: left;
	caption-side: top;
}

th,
td {
	padding: 0.62rem 0.9rem 0.62rem 0;
	border-top: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}

th:first-child,
td:first-child {
	padding-left: var(--inset);
}

th:last-child,
td:last-child {
	padding-right: var(--inset);
}

thead th {
	border-top: 0;
	color: var(--ink-soft);
	font-weight: 400;
	font-size: 0.875rem;
	vertical-align: bottom;
}

tbody th {
	font-weight: 650;
}

tbody tr:last-child th,
tbody tr:last-child td {
	border-bottom: 1px solid var(--line);
}

.num {
	text-align: right;
	white-space: nowrap;
}

thead .num {
	white-space: normal;
}

tr.chosen th,
tr.chosen td {
	background: var(--surface-faint);
}

/* A bar under a number: how large it is next to the others in its column.
 * The line is stretched to the cell; its thickness and round end are kept. */
.bar {
	display: block;
	width: 100%;
	height: 4px;
	margin-top: 0.4rem;
}

.bar line {
	stroke: var(--ink-soft);
	stroke-width: 4px;
	stroke-linecap: round;
	vector-effect: non-scaling-stroke;
}

tr.chosen .bar line {
	stroke: var(--ink);
}

@media (max-width: 34rem) {
	table {
		font-size: 0.875rem;
	}

	th,
	td {
		padding-right: 0.3rem;
	}

	thead th {
		font-size: 0.8125rem;
	}

	.table-wrap {
		--inset: 0.35rem;
	}
}

/* The chosen row carries the cursor of the mark on its left edge. */
tr.chosen th {
	box-shadow: inset 2px 0 0 var(--signal);
}

/* ---- prices ---------------------------------------------------------- */

/* Two cards side by side, the way prices are usually shown: the name, the
 * sum in large type, what is in it, and the button. */
.plans {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.2rem;
	max-width: 52rem;
	margin: 1.7rem 0 1.1rem;
}

.plan {
	display: flex;
	flex-direction: column;
	padding: 1.5rem 1.5rem 1.45rem;
	border: 1px solid var(--line);
	border-radius: 12px;
}

.plan-chosen {
	border: 1.5px solid var(--ink);
}

.plan h3 {
	margin: 0;
}

.plan-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.65rem;
	margin: 0.75rem 0 0;
	font-family: var(--serif);
	letter-spacing: -0.01em;
}

.plan-sum {
	font-size: clamp(2.5rem, 7vw, 3.2rem);
	line-height: 1.05;
	white-space: nowrap;
}

.plan-term {
	font-size: 1.5rem;
	line-height: 1.2;
}

.plan-note {
	margin: 0.55rem 0 0;
	color: var(--ink-soft);
	font-size: 0.875rem;
}

.plan-list {
	flex: 1;
	margin: 1.25rem 0 1.4rem;
	padding: 0;
	list-style: none;
}

.plan-list li {
	position: relative;
	margin: 0;
	padding: 0.5rem 0 0.5rem 1.65rem;
	border-top: 1px solid var(--line);
}

/* A tick drawn with two sides of a small box. */
.plan-list li::before {
	content: "";
	position: absolute;
	top: 0.78rem;
	left: 0.3rem;
	width: 0.36rem;
	height: 0.68rem;
	border: solid var(--ink);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.plan .button {
	align-self: flex-start;
}

.plan .slot {
	margin: 0;
	font-size: 0.9375rem;
}

.plans-more {
	max-width: var(--column);
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

@media (max-width: 40rem) {
	.plans {
		grid-template-columns: minmax(0, 1fr);
	}
}

.price {
	white-space: nowrap;
	font-weight: 650;
}

.slot {
	max-width: var(--column);
	margin: 1.4rem 0 0;
	padding: 1rem 1.1rem;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
}

.slot > :last-child {
	margin-bottom: 0;
}

/* ---- the foot -------------------------------------------------------- */

.foot {
	padding-top: 2.2rem;
	padding-bottom: 3rem;
	border-top: 1px solid var(--line);
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

.foot p {
	margin: 0 0 0.5rem;
}

.foot-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1.3rem;
	margin: 0 0 1.2rem;
	padding: 0;
	list-style: none;
	color: var(--ink);
}

.foot-links li {
	margin: 0;
}

/* ---- the question asked of a visitor who is leaving ------------------ */

/* Shown and hidden by leave.js; without the script none of this is seen.
   The window has no padding of its own: a click on it, and not on the box
   inside, is a click on the dimmed page around it and closes the window. */
.leave {
	width: min(27rem, calc(100vw - 2rem));
	padding: 0;
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) * 2);
	background: var(--paper);
	color: var(--ink);
}

.leave::backdrop {
	background: rgb(0 0 0 / 0.45);
}

.leave-box {
	padding: 1.5rem 1.5rem 1.1rem;
}

.leave h2 {
	margin: 0 0 0.4rem;
	padding: 0;
	border: 0;
	font-size: 1.375rem;
}

.leave-note {
	margin: 0 0 1.1rem;
	color: var(--ink-soft);
	font-size: 0.9375rem;
}

.leave button {
	border: 0;
	font: inherit;
	cursor: pointer;
}

.leave-reasons {
	display: grid;
	gap: 0.5rem;
}

.leave-reasons .button {
	width: 100%;
	font-weight: 500;
	text-align: left;
}

.leave-other {
	display: grid;
	gap: 0.6rem;
	margin-top: 1rem;
	font-size: 0.9375rem;
}

.leave-other textarea {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: transparent;
	color: inherit;
	font: inherit;
	resize: vertical;
}

.leave-other .button {
	justify-self: start;
	font-weight: 600;
}

.leave-thanks {
	margin: 0.3rem 0 0;
}

.leave .leave-close {
	display: block;
	margin: 1rem 0 0 auto;
	padding: 0.2rem 0;
	background: none;
	color: var(--ink-soft);
	font-size: 0.9375rem;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.leave [hidden],
.leave-open[hidden] {
	display: none;
}

.leave-open {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
	cursor: pointer;
}

/* ---- pages of text: measurements, installing, the legal texts -------- */

.page {
	padding-top: clamp(1.5rem, 5vw, 3.5rem);
	padding-bottom: clamp(3rem, 7vw, 5rem);
}

.page h1 {
	max-width: 20em;
	font-size: clamp(1.9rem, 5vw, 2.9rem);
	line-height: 1.12;
}

.page h1 + p {
	margin-top: 1.2rem;
}

.page h2 {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--line);
	font-size: clamp(1.4rem, 3vw, 1.75rem);
}

.page .column > p,
.page .column > ul,
.page .column > ol {
	max-width: var(--column);
}

.steps {
	max-width: var(--column);
	padding-left: 1.5rem;
}

.steps > li {
	padding-left: 0.3rem;
}

.steps > li + li {
	margin-top: 0.9rem;
}

/* The whole of it in five lines, for the one who reads no further. The
 * numbers are large enough to take the colour of the mark. */
.quick {
	max-width: var(--column);
	margin: 1.7rem 0 0.9rem;
	padding: 0;
	list-style: none;
	counter-reset: quick;
}

.quick li {
	display: grid;
	grid-template-columns: 2.3rem minmax(0, 1fr);
	align-items: baseline;
	margin: 0;
	padding: 0.7rem 0;
	border-top: 1px solid var(--line);
	counter-increment: quick;
}

.quick li:last-child {
	border-bottom: 1px solid var(--line);
}

.quick li::before {
	content: counter(quick);
	color: var(--signal);
	font-family: var(--serif);
	font-size: 1.5rem;
	line-height: 1;
}

/* A plain list of a few lines, each beginning with what it is about. */
.plain-list {
	max-width: var(--column);
	margin: 1.2rem 0 1.2rem;
	padding: 0;
	list-style: none;
}

.plain-list li {
	margin: 0;
	padding: 0.7rem 0;
	border-top: 1px solid var(--line);
}

.plain-list li:last-child {
	border-bottom: 1px solid var(--line);
}

.takes-more {
	margin-top: 1rem;
}

/* The versions, newest first: the number and the date, then what changed. */
.versions-log {
	max-width: var(--column);
	margin: 1.2rem 0 0;
}

.versions-log dt {
	margin: 0;
	padding-top: 0.9rem;
	border-top: 1px solid var(--line);
	font-weight: 650;
}

.versions-log dt .soft {
	margin-left: 0.5rem;
	font-weight: 400;
	font-size: 0.9375rem;
}

.versions-log dd {
	margin: 0.25rem 0 0;
	padding-bottom: 0.9rem;
}

/* A screenshot, or the place kept for one. */
.shot {
	max-width: var(--column);
	margin: 1.3rem 0 1.8rem;
}

.shot img {
	display: block;
	max-width: 100%;
	height: auto;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.shot-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 9rem;
	padding: 1.2rem;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	background: var(--surface-faint);
	color: var(--ink-soft);
	font-size: 0.9375rem;
	text-align: center;
}

.shot figcaption {
	margin-top: 0.5rem;
	color: var(--ink-soft);
	font-size: 0.875rem;
}

.versions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 1.2rem 0 0;
	padding: 0;
	list-style: none;
}

.versions li {
	margin: 0;
}

.versions a {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border-radius: var(--radius);
	background: var(--surface);
	text-decoration: none;
}

.versions a:hover {
	background: var(--surface-hover);
}

.draft-note {
	max-width: var(--column);
	margin: 1.5rem 0;
	padding: 0.9rem 1.1rem;
	border: 1px dashed var(--line);
	border-radius: var(--radius);
	background: var(--surface-faint);
}

.legal h2 {
	font-family: var(--sans);
	font-size: 1.1875rem;
	font-weight: 650;
	letter-spacing: 0;
}

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

	.caret {
		animation: none;
	}
}

@media print {
	.top .nav,
	.actions,
	.leave-open {
		display: none;
	}

	.caret {
		display: none;
	}
}
