/*
 * Hemera's website: "First light". Black and white and the sun. Light or dark as the device is
 * set, until the switch in the header flips it (look.js). Type is the system font, as in the
 * app. Brand colours (the sun, its rim of light, the tile and the wordmark's ink) appear only
 * on the sun screens and the sun that passes between chapters.
 *
 * The front page is eight chapters. With scripts and motion on (html.live) it is one pinned
 * screen and a whole sun carries each next chapter in; otherwise the chapters simply follow one
 * another down the page. Privacy and Terms (body.legal) are set for reading in the same style.
 */

:root,
.lookc[data-look='dark'] {
	--wall: #000;
	--sheet: #0c0c0e;
	--paper: #000;
	--ink: #f2f2f3;
	--ink2: #a0a0a7;
	--line: rgba(255, 255, 255, 0.12);
	--bl: rgba(255, 255, 255, 0.24);
	--btn: #f2f2f3;
	--btn-ink: #000;
	--drop: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
	/* The brand kit: the sun, its rim of light, the tile behind it and the wordmark's ink. */
	--sun: #efa230;
	--gold: #f9cf6e;
	--tile: #000;
	--wm: #f3f4f8;
	/* The Mac window's top, so it runs on into the recording's sidebar and page. */
	--side: #000;
	--pane: #000;
	/* The iPhone app's own colours (ios/Hemera/Theme/Palettes.swift, Clear Day), for its drawing. */
	--np: #000;
	--ni: #f2f2f3;
	--ni2: #a0a0a7;
	--ni3: #6c6c72;
	--nl: rgba(255, 255, 255, 0.12);
	--nh: rgba(255, 255, 255, 0.09);
	--na: #6b8cff;
	--ng: rgba(40, 40, 44, 0.9);
	--nadd: #efa230;
	--nhi: #ff6b6f;
	--nmed: #f2b640;
	--ndone: #4cc38a;
	--gut: max(6vw, 16px, env(safe-area-inset-left, 0px));
	--out: cubic-bezier(0.19, 1, 0.22, 1);
	color-scheme: dark;
}

:root[data-look='light'],
.lookc[data-look='light'] {
	--wall: #f6f6f3;
	--sheet: #fff;
	--paper: #fff;
	--ink: #1c1c1e;
	--ink2: #6b6b70;
	--line: rgba(60, 60, 67, 0.12);
	--bl: rgba(0, 0, 0, 0.16);
	--btn: #1c1c1e;
	--btn-ink: #fff;
	--drop: 0 40px 90px -40px rgba(20, 20, 30, 0.35);
	--sun: #e8901a;
	--gold: #f6bf4a;
	--tile: #fbfaf7;
	--wm: #1b2447;
	--side: #f6f6f2;
	--pane: #fff;
	--np: #fff;
	--ni: #1c1c1e;
	--ni2: #6b6b70;
	--ni3: #a1a1a6;
	--nl: rgba(60, 60, 67, 0.12);
	--nh: rgba(60, 60, 67, 0.07);
	--na: #2f5bea;
	--ng: rgba(250, 250, 250, 0.9);
	--nadd: #d97f12;
	--nhi: #e5484d;
	--nmed: #e8a317;
	--ndone: #1b7a45;
	color-scheme: light;
}

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

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

body {
	margin: 0;
	background: var(--wall);
	color: var(--ink);
	font:
		17px/1.45 -apple-system,
		BlinkMacSystemFont,
		'SF Pro Text',
		'Segoe UI',
		Roboto,
		Helvetica,
		Arial,
		sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

img,
video {
	display: block;
	max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol {
	margin: 0;
	padding: 0;
}

ul,
ol {
	list-style: none;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
}

/* A ring that shows on any background: ink inside, the wall outside. */
:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--wall);
	border-radius: 8px;
}

/* A way past the opening, for the keyboard. */
.skip {
	position: fixed;
	z-index: 70;
	left: 12px;
	top: 12px;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--btn);
	color: var(--btn-ink);
	font-weight: 600;
	transform: translateY(-200%);
}

.skip:focus {
	transform: none;
}

/* ---------------------------------------------------------------- type and buttons */

.wm {
	display: block;
	aspect-ratio: 400 / 103;
	color: var(--wm);
}

.hx {
	font-size: clamp(38px, 6.4vw, 104px);
	line-height: 1;
	letter-spacing: -0.04em;
	font-weight: 600;
	text-wrap: balance;
}

.lead {
	font-size: clamp(16px, 1.45vw, 21px);
	color: var(--ink2);
	max-width: 30em;
	text-wrap: pretty;
}

.small {
	font-size: 13px;
	color: var(--ink2);
	font-variant-numeric: tabular-nums;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 26px;
	border: 0;
	border-radius: 999px;
	background: var(--btn);
	color: var(--btn-ink);
	font-size: 17px;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 0.6s var(--out);
}

/* Headlines are split into words (site.js) that rise out of a mask; other things fade up.
   Both wait for "on": the chapter, or the section, has come on screen. */
.w {
	display: inline-block;
	overflow: hidden;
	vertical-align: top;
	padding: 0.08em 0 0.2em;
	margin: -0.08em 0 -0.2em;
}

.w > i {
	display: inline-block;
	font-style: normal;
}

.js .w > i {
	transform: translateY(118%);
	transition: transform 1s var(--out);
	transition-delay: calc(var(--i) * 55ms + var(--d, 0s));
}

.js .fx {
	opacity: 0;
	transform: translateY(22px);
	transition:
		opacity 0.7s ease,
		transform 1s var(--out);
	transition-delay: var(--d, 0s);
}

.js .on .w > i,
.js .on.fx,
.js .on .fx {
	transform: none;
	opacity: 1;
}

.calm .w > i,
.calm .fx {
	transition: none !important;
}

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

.top {
	position: absolute;
	z-index: 50;
	left: 0;
	right: 0;
	top: env(safe-area-inset-top, 0px);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px var(--gut);
	pointer-events: none;
}

.live .top,
.legal .top {
	position: fixed;
}

.top > * {
	pointer-events: auto;
}

.top .wm {
	height: 22px;
	transition: opacity 0.4s;
}

.top nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.top .btn {
	min-height: 36px;
	padding: 0 16px;
	font-size: 14px;
}

.look {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: transparent;
	color: var(--ink);
	display: grid;
	place-items: center;
	cursor: pointer;
}

.look i {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.6px solid currentColor;
	background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

/* The switch's disc: the next look's surface, spreading from the button (look.js). It carries
   the next look's tokens itself, so its colour holds when the page changes under it. */
.lookc {
	position: fixed;
	z-index: 100;
	border-radius: 50%;
	background: var(--wall);
	pointer-events: none;
	will-change: transform, opacity;
}

.lookc.sheet {
	background: var(--sheet);
}

.lookc.paper {
	background: var(--paper);
}

.lookc.tile {
	background: var(--tile);
}

/* On the opening and closing screens the big wordmark is the only one. */
.atb .top .wm {
	opacity: 0;
}

/* ---------------------------------------------------------------- windows and recordings */

.mac {
	border-radius: 12px;
	overflow: hidden;
	background: var(--pane);
	box-shadow:
		0 0 0 1px var(--line),
		var(--drop);
}

.mac .lights {
	height: 20px;
	display: flex;
	align-items: center;
	gap: 6px;
	padding-left: 10px;
	background: linear-gradient(90deg, var(--side) 16.39%, var(--pane) 16.39%);
}

.mac .lights b {
	width: 8.5px;
	height: 8.5px;
	border-radius: 50%;
	background: #ff5f57;
}

.mac .lights b:nth-child(2) {
	background: #febc2e;
}

.mac .lights b:nth-child(3) {
	background: #28c840;
}

/* A recording: a still for each look underneath, and a looping clip for each look on top once
   it can play (site.js fills it in). */
.vid {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--pane);
}

.vid > * {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.vid img,
.vid video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.vid .k-light,
:root[data-look='light'] .vid .k-dark {
	display: none;
}

:root[data-look='light'] .vid .k-light {
	display: block;
}

.vid video {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s;
}

.vid video.ok {
	opacity: 1;
	visibility: visible;
}

/* ---------------------------------------------------------------- the sun screens */

.brand {
	position: relative;
	overflow: hidden;
	container-type: size;
	background: var(--tile);
}

/* The brand kit's opening screen: a disc 156.25% of the width, a quarter of the width showing. */
.brand .sun {
	position: absolute;
	left: 50%;
	top: calc(100% - min(25cqw, 40cqh));
	width: 156.25cqw;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--sun);
	transform: translateX(-50%);
}

.brand .mid {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: min(25cqw, 40cqh);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 72px 16px 8px;
	text-align: center;
}

.brand .big {
	height: clamp(54px, 9vw, 116px);
}

.brand .date {
	font-size: clamp(16px, 1.5vw, 21px);
	color: var(--ink2);
}

.foot {
	display: flex;
	gap: 18px;
	font-size: 13px;
	color: var(--ink2);
}

.foot a:hover {
	color: var(--ink);
}

.cue {
	display: grid;
	justify-items: center;
	gap: 10px;
	margin-top: 10px;
}

.cue i {
	width: 1px;
	height: 38px;
	background: var(--ink2);
	transform-origin: top;
	animation: cue 2.2s var(--out) infinite;
}

@keyframes cue {
	0% {
		transform: scaleY(0);
	}

	55% {
		transform: scaleY(1);
		opacity: 1;
	}

	100% {
		transform: scaleY(1);
		opacity: 0;
	}
}

/* ---------------------------------------------------------------- chapters */

.win {
	background: var(--wall);
}

.win.sheet {
	background: var(--sheet);
}

.win.paper {
	background: var(--paper);
}

.win.tile {
	background: var(--tile);
}

.pin {
	position: relative;
	min-height: min(100svh, 900px);
	display: grid;
	align-items: center;
	padding: 96px var(--gut) 72px;
	overflow: hidden;
}

.pin.brand {
	padding: 0;
	height: min(100svh, 900px);
}

.sunm {
	display: none;
}

/* Live: one screen. A scroll, swipe or key only chooses the chapter. A whole sun then passes
   through the screen with the next chapter behind it: three transforms run by the compositor,
   nothing per frame in script. The screen is as tall as the browser ever shows (a phone's
   toolbar folded away); each chapter is laid out in the height that always shows. */
.live .fl {
	position: relative;
	--L: 48svh;
	height: calc((var(--n) - 1) * var(--L) + 100lvh);
}

.live .stage {
	position: sticky;
	top: 0;
	height: 100lvh;
	overflow: hidden;
}

.live .ch {
	position: absolute;
	inset: 0;
	visibility: hidden;
}

.live .ch.cur {
	visibility: visible;
	z-index: 1;
}

.live .ch.in {
	visibility: visible;
	z-index: 2;
}

.live .win {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: calc(100% + 78.125vw);
	overflow: hidden;
}

.live .pin,
.live .pin.brand {
	height: 100svh;
	min-height: 0;
}

/* The sun screens' disc runs on below the part that always shows. */
.live .pin.brand {
	overflow: visible;
}

/* The sun that passes: the brand's disc (156.25% of the width), with a rim of yellow light.
   It is drawn 1/--s of that size and scaled back up as it moves (site.js sets --s for the
   screen), so what the browser keeps of it is a small picture, not one of some 100 MB. */
.live .sunm {
	--s: 1;
	display: block;
	visibility: hidden;
	position: absolute;
	z-index: 3;
	left: calc(50% - 78.125% / var(--s));
	top: 0;
	width: calc(156.25% / var(--s));
	aspect-ratio: 1;
	margin-top: calc(-78.125% / var(--s));
	border-radius: 50%;
	background: var(--gold);
	pointer-events: none;
}

.sunm b {
	position: absolute;
	inset: calc(clamp(12px, 2.6vw, 36px) / var(--s, 1));
	border-radius: 50%;
	background: var(--sun);
}

.live .sunm.go {
	visibility: visible;
}

/* The opening screen's own sun is the one that rises. */
.nosun .brand .sun {
	visibility: hidden;
}

/* The closing screen's own sun comes up after the big one has passed. */
.live .ch:last-of-type .brand .sun {
	transform: translate(-50%, 26%);
	transition: transform 1.5s var(--out) 0.15s;
}

.live .ch.act:last-of-type .brand .sun {
	transform: translateX(-50%);
}

/* And goes back down as that screen is left, while the big one comes from the top. */
.live .ch.set:last-of-type .brand .sun {
	transform: translate(-50%, 26%);
	transition: transform 0.5s cubic-bezier(0.45, 0, 0.8, 0.4);
}

.c-split {
	grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
	gap: 5vw;
}

.c-split .hx,
.c-ask .hx {
	font-size: clamp(36px, 5.3vw, 86px);
}

.c-split .med {
	margin-right: calc(-1 * var(--gut) - 5vw);
}

/* The same two columns the other way round: the recording on the left, bleeding off that edge. */
.c-split.rev {
	grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
}

.c-split.rev .med {
	order: -1;
	margin-right: 0;
	margin-left: calc(-1 * var(--gut) - 5vw);
}

.txt {
	display: grid;
	gap: 22px;
	justify-items: start;
}

.js .pin .med {
	transform: translate3d(0, 7vh, 0) scale(0.95);
	transform-origin: 50% 80%;
	transition: transform 1.5s var(--out) 0.05s;
}

.js .on .med,
.js .c-ask .med {
	transform: none;
}

.c-wide {
	grid-template-rows: auto 1fr;
	justify-items: center;
	text-align: center;
	gap: 4vh;
	padding-bottom: 0 !important;
}

.c-wide .txt {
	justify-items: center;
}

.c-wide .med {
	width: min(1180px, 100%);
	align-self: start;
}

/* A wide chapter that shows its window whole: as wide as the height left under the words allows
   (20px is the window's strip of lights, 1.6 the recording's shape). */
.c-wide.whole {
	padding-bottom: 5vh !important;
}

.c-wide.whole .med {
	align-self: stretch;
	container-type: size;
	display: grid;
	justify-items: center;
	align-items: start;
}

.c-wide.whole .mac {
	width: min(100cqw, calc((100cqh - 20px) * 1.6));
}

.feat {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.feat li {
	padding: 7px 14px;
	border-radius: 999px;
	box-shadow: 0 0 0 1px var(--line);
	font-size: 14px;
	color: var(--ink2);
}

/* The desktop apps: quieter than Sign in, each with its system's mark in the text's colour. */
.get {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.dl {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	min-height: 44px;
	padding: 0 18px 0 15px;
	border-radius: 999px;
	box-shadow: 0 0 0 1px var(--line);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	transition: transform 0.6s var(--out);
}

.dl svg,
.apps svg {
	width: 17px;
	height: 17px;
	fill: currentColor;
	flex: none;
}

.dl svg {
	margin-top: -2px;
}

.u {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.apps a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.apps svg {
	width: 13px;
	height: 13px;
}

/* The assistants' own marks. */
.logos {
	display: flex;
	align-items: center;
	gap: 22px;
}

.logos svg {
	width: 26px;
	height: 26px;
}

/* ---------------------------------------------------------------- Ask Hemera, in the app's sky */

.c-ask {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	isolation: isolate;
}

.c-ask .med {
	margin: 0;
	display: grid;
	justify-items: center;
}

.sky {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.9s,
		visibility 0s 0.9s;
	pointer-events: none;
}

/* "in": the chapter is being carried in by the sun, its weather already going; behind the
   sun there is no one to fade in for. */
.act .sky.ready,
.in .sky.ready {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.9s;
}

.in:not(.act) .sky.ready {
	transition: none;
}

/* The header sits on clear paper: the sky fades out before it reaches the wordmark. */
.c-ask::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: clamp(120px, 19svh, 180px);
	z-index: -1;
	pointer-events: none;
	background: linear-gradient(var(--paper) 50%, color-mix(in srgb, var(--paper) 0%, transparent));
}

.c-ask .txt {
	position: relative;
}

.c-ask .txt::before {
	content: '';
	position: absolute;
	inset: -40px -56px;
	z-index: -1;
	border-radius: 48px;
	background: var(--paper);
	filter: blur(34px);
	opacity: 0.92;
}

.wx {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wx button {
	font-size: 14px;
	padding: 7px 15px;
	border-radius: 999px;
	border: 1px solid var(--bl);
	background: var(--paper);
	color: var(--ink);
	cursor: pointer;
	transition:
		background 0.3s,
		color 0.3s;
}

.wx button.on {
	background: var(--ink);
	color: var(--paper);
	border-color: var(--ink);
}

.chat {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	width: min(430px, 100%);
	font-size: 15px;
	line-height: 1.4;
}

.chat .me {
	align-self: flex-end;
	padding: 9px 14px;
	border-radius: 18px 18px 5px 18px;
	background: var(--ink);
	color: var(--paper);
}

.chat .ai {
	padding: 10px 14px;
	border-radius: 14px;
	background: var(--paper);
	border: 1px solid var(--bl);
}

.chat .card {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 10px 12px 10px 14px;
	border-radius: 14px;
	background: var(--paper);
	border: 1px solid var(--bl);
}

.chat .card b {
	display: block;
	font-weight: 600;
}

.chat .card span {
	display: block;
	font-size: 13px;
	color: var(--ink2);
}

.chat .card div {
	flex: 1;
	min-width: 0;
}

.chat .card em {
	font-style: normal;
	font-size: 13px;
	font-weight: 600;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--bl);
}

.chat .box {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-top: 8px;
	padding: 13px 12px 13px 16px;
	border-radius: 18px;
	background: var(--paper);
	border: 1px solid var(--bl);
	color: var(--ink2);
}

.chat .box i {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--ink);
	display: grid;
	place-items: center;
}

.chat .box svg {
	width: 15px;
	height: 15px;
	stroke: var(--paper);
}

/* ---------------------------------------------------------------- eighteen pages */

.c-pages {
	grid-template-columns: minmax(0, 1fr);
	text-align: center;
	align-content: center;
	justify-items: center;
	gap: 5vh;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.c-pages .hx {
	padding: 0 var(--gut);
}

.rows {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.08em;
	width: 100%;
	font-size: clamp(30px, 5.6vw, 92px);
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1.08;
	white-space: nowrap;
	color: color-mix(in srgb, var(--ink) 15%, transparent);
}

.rows p {
	display: flex;
	justify-content: center;
	gap: 0.55em;
	animation: drift 14s ease-in-out infinite alternate paused;
}

.rows p:nth-child(1) {
	--dx: -16vw;
}

.rows p:nth-child(2) {
	--dx: 16vw;
}

.rows p:nth-child(3) {
	--dx: -10vw;
}

.act .rows p {
	animation-play-state: running;
}

@keyframes drift {
	from {
		transform: translate3d(calc(var(--dx) * -0.5), 0, 0);
	}

	to {
		transform: translate3d(calc(var(--dx) * 0.5), 0, 0);
	}
}

/* ---------------------------------------------------------------- the Mac and the iPhone */

.duo {
	position: relative;
}

.duo .iph {
	position: relative;
	z-index: 1;
	width: min(34%, calc((100svh - 200px) * 0.44));
}

.duo .mac {
	position: absolute;
	left: 21%;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
}

.iph {
	container-type: inline-size;
}

.iph .body {
	position: relative;
	padding: 3.4cqw;
	border-radius: 16.5cqw;
	background: #0b0b0c;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.18),
		inset 0 0 0 1px rgba(255, 255, 255, 0.06),
		var(--drop);
}

/* The iPhone: the native app's Today, drawn in points (1pt = 1/393 of the screen's width). */
.nat {
	--pt: calc(100cqw / 393);
	container-type: inline-size;
	position: relative;
	aspect-ratio: 393 / 852;
	overflow: hidden;
	border-radius: 13cqw;
	background: var(--np);
	color: var(--ni);
	text-align: left;
	line-height: 1.25;
	letter-spacing: 0;
	font-weight: 400;
}

.nat .print {
	position: absolute;
	inset: 0 0 auto 0;
	height: calc(318 * var(--pt));
}

.nat .print img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 38%;
}

.nst {
	position: absolute;
	inset: 0 0 auto 0;
	height: calc(54 * var(--pt));
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: calc(6 * var(--pt)) calc(28 * var(--pt)) 0 calc(46 * var(--pt));
	color: #fff;
	font-size: calc(16.5 * var(--pt));
	font-weight: 600;
}

.nst svg {
	width: calc(74 * var(--pt));
	height: auto;
}

.nisl {
	position: absolute;
	left: 50%;
	top: calc(11 * var(--pt));
	width: calc(124 * var(--pt));
	height: calc(36 * var(--pt));
	border-radius: calc(18 * var(--pt));
	background: #000;
	transform: translateX(-50%);
}

.nat .page {
	position: absolute;
	inset: calc(318 * var(--pt)) 0 0 0;
	padding: 0 calc(16 * var(--pt));
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

/* The date slip: the app's paper label, the same in both looks. */
.slip {
	align-self: flex-start;
	position: relative;
	display: flex;
	align-items: center;
	gap: calc(9 * var(--pt));
	margin-top: calc(-22 * var(--pt));
	padding: calc(8 * var(--pt)) calc(16 * var(--pt));
	background: #f4ecdc;
	color: #1d1b18;
	box-shadow: inset 0 0 0 calc(1.5 * var(--pt)) #1d1b18;
	font-size: calc(20 * var(--pt));
	font-weight: 600;
}

.slip svg {
	width: calc(19 * var(--pt));
	height: calc(19 * var(--pt));
}

.dayline {
	margin-top: calc(16 * var(--pt));
}

.dayline .hrs {
	display: flex;
	justify-content: space-between;
	font-size: calc(11 * var(--pt));
	color: var(--ni3);
}

.dayline .track {
	position: relative;
	height: calc(6 * var(--pt));
	margin: calc(9 * var(--pt)) 0;
	border-radius: 99px;
	background: var(--nh);
}

.dayline .track i {
	position: absolute;
	top: 0;
	bottom: 0;
	border-radius: 99px;
	background: var(--na);
	opacity: 0.85;
}

.dayline .track i:nth-of-type(1) {
	left: 41%;
	width: 9%;
}

.dayline .track i:nth-of-type(2) {
	left: 74%;
	width: 7%;
}

.dayline .track b {
	position: absolute;
	left: 12%;
	top: calc(-6 * var(--pt));
	width: calc(2 * var(--pt));
	height: calc(18 * var(--pt));
	border-radius: 1px;
	background: var(--ni);
}

.dayline .track b::before {
	content: '';
	position: absolute;
	left: 50%;
	top: calc(-3 * var(--pt));
	width: calc(8 * var(--pt));
	height: calc(8 * var(--pt));
	border-radius: 50%;
	background: var(--ni);
	transform: translateX(-50%);
}

.dayline .free {
	font-size: calc(13 * var(--pt));
	color: var(--ni2);
}

.dayline .free b {
	font-weight: 600;
	color: var(--ni);
}

.nat .add {
	display: flex;
	align-items: center;
	gap: calc(10 * var(--pt));
	margin-top: calc(14 * var(--pt));
	padding: calc(12 * var(--pt)) 0;
	border-bottom: calc(1 * var(--pt)) solid var(--nl);
	font-size: calc(17 * var(--pt));
	color: var(--ni3);
}

.nat .add svg {
	width: calc(20 * var(--pt));
	height: calc(20 * var(--pt));
}

.tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: calc(4 * var(--pt)) calc(8 * var(--pt));
	margin-top: calc(16 * var(--pt));
	padding: calc(10 * var(--pt)) calc(8 * var(--pt));
	border-radius: calc(22 * var(--pt));
	box-shadow: inset 0 0 0 calc(1 * var(--pt)) var(--nl);
}

.tiles p {
	padding: calc(6 * var(--pt)) calc(10 * var(--pt));
	font-size: calc(13 * var(--pt));
	color: var(--ni2);
}

.tiles b {
	display: block;
	font-size: calc(22 * var(--pt));
	font-weight: 600;
	color: var(--ni);
	line-height: 1.2;
}

.tiles .n {
	display: grid;
}

.tiles .n i {
	grid-area: 1 / 1;
	font-style: normal;
}

.tiles .n i + i {
	opacity: 0;
}

.nat .nsec {
	margin-top: calc(20 * var(--pt));
	font-size: calc(20 * var(--pt));
	font-weight: 700;
}

.nrows li {
	display: flex;
	align-items: flex-start;
	gap: calc(12 * var(--pt));
	padding: calc(11 * var(--pt)) 0;
	border-bottom: calc(1 * var(--pt)) solid var(--nl);
}

.nrows .cb {
	flex: none;
	width: calc(22 * var(--pt));
	height: calc(22 * var(--pt));
	border-radius: calc(6.5 * var(--pt));
	box-shadow: inset 0 0 0 calc(1.8 * var(--pt)) var(--edge, var(--ni3));
	display: grid;
	place-items: center;
}

.nrows .p1 {
	--edge: var(--nhi);
}

.nrows .p2 {
	--edge: var(--nmed);
}

.nrows .cb svg {
	width: 72%;
	height: 72%;
	opacity: 0;
}

.nrows b {
	display: block;
	font-weight: 400;
	font-size: calc(16 * var(--pt));
}

.nrows span {
	display: block;
	margin-top: calc(3 * var(--pt));
	font-size: calc(13 * var(--pt));
	color: var(--ni2);
}

.gbar {
	position: absolute;
	left: calc(16 * var(--pt));
	right: calc(16 * var(--pt));
	bottom: calc(28 * var(--pt));
	display: flex;
	gap: calc(10 * var(--pt));
	height: calc(54 * var(--pt));
}

.gbar .mode {
	flex: 1;
	display: flex;
	padding: calc(4 * var(--pt));
	border-radius: 99px;
	background: var(--ng);
	box-shadow:
		0 0 0 calc(0.6 * var(--pt)) var(--nl),
		0 calc(8 * var(--pt)) calc(24 * var(--pt)) rgba(0, 0, 0, 0.14);
}

.gbar .mode span {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: calc(7 * var(--pt));
	border-radius: 99px;
	font-size: calc(15 * var(--pt));
	font-weight: 600;
	color: var(--ni);
}

.gbar .mode span.on {
	color: var(--na);
	background: color-mix(in srgb, var(--na) 14%, transparent);
}

.gbar svg {
	width: calc(19 * var(--pt));
	height: calc(19 * var(--pt));
}

/* The app's own + (the sun's orange, as the app draws it). */
.gbar .plus {
	flex: none;
	width: calc(54 * var(--pt));
	border-radius: 50%;
	background: var(--nadd);
	color: #1c1c1e;
	display: grid;
	place-items: center;
	box-shadow: 0 calc(8 * var(--pt)) calc(24 * var(--pt)) rgba(0, 0, 0, 0.16);
}

.gbar .plus svg {
	width: calc(24 * var(--pt));
	height: calc(24 * var(--pt));
}

/* Rows fade out under the bar (no blur: a blurred layer inside a moving one leaves seams). */
.nat .page::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(128 * var(--pt));
	background: linear-gradient(transparent, var(--np) 64%);
}

.nhome {
	position: absolute;
	left: 50%;
	bottom: calc(8 * var(--pt));
	width: calc(138 * var(--pt));
	height: calc(5 * var(--pt));
	border-radius: 99px;
	background: var(--ni);
	transform: translateX(-50%);
}

/* One task gets ticked, on a loop, while this chapter is on screen. */
.act .r1 .cb {
	animation: tick 9s infinite;
}

.act .r1 .cb svg {
	animation: tickm 9s infinite;
}

.act .r1 div {
	animation: tickd 9s infinite;
}

.act .tiles .n i {
	animation: ticko 9s infinite;
}

.act .tiles .n i + i {
	animation: tickn 9s infinite;
}

@keyframes tick {
	0%,
	30% {
		background: transparent;
		box-shadow: inset 0 0 0 calc(1.8 * var(--pt)) var(--edge, var(--ni3));
		transform: none;
	}

	33% {
		background: var(--ndone);
		box-shadow: inset 0 0 0 calc(1.8 * var(--pt)) var(--ndone);
		transform: scale(1.18);
	}

	37%,
	90% {
		background: var(--ndone);
		box-shadow: inset 0 0 0 calc(1.8 * var(--pt)) var(--ndone);
		transform: none;
	}

	96%,
	100% {
		background: transparent;
		box-shadow: inset 0 0 0 calc(1.8 * var(--pt)) var(--edge, var(--ni3));
	}
}

@keyframes tickm {
	0%,
	31% {
		opacity: 0;
	}

	35%,
	90% {
		opacity: 1;
	}

	96%,
	100% {
		opacity: 0;
	}
}

@keyframes tickd {
	0%,
	33% {
		opacity: 1;
	}

	40%,
	90% {
		opacity: 0.38;
	}

	96%,
	100% {
		opacity: 1;
	}
}

@keyframes ticko {
	0%,
	34% {
		opacity: 1;
	}

	38%,
	90% {
		opacity: 0;
	}

	96%,
	100% {
		opacity: 1;
	}
}

@keyframes tickn {
	0%,
	34% {
		opacity: 0;
	}

	38%,
	90% {
		opacity: 1;
	}

	96%,
	100% {
		opacity: 0;
	}
}

/* ---------------------------------------------------------------- Privacy and Terms */

.lg {
	--read: 68ch;
}

.hero {
	display: grid;
	gap: 22px;
	justify-items: start;
	align-content: end;
	min-height: min(64svh, 620px);
	padding: 140px var(--gut) 56px;
}

.hero .hx {
	font-size: clamp(56px, 11vw, 168px);
}

.hero .lead {
	font-size: clamp(18px, 1.7vw, 24px);
	max-width: 34em;
}

.cols {
	display: grid;
	grid-template-columns: 230px minmax(0, var(--read));
	justify-content: space-between;
	gap: clamp(32px, 6vw, 96px);
	align-items: start;
	padding: 40px var(--gut) 120px;
	border-top: 1px solid var(--line);
}

.idx {
	position: sticky;
	top: 96px;
	font-size: 14px;
}

.idx ol {
	display: grid;
	gap: 2px;
	counter-reset: n;
}

.idx a {
	display: flex;
	gap: 12px;
	padding: 7px 0;
	color: var(--ink2);
	transition: color 0.3s;
}

.idx a::before {
	counter-increment: n;
	content: counter(n, decimal-leading-zero);
	font-variant-numeric: tabular-nums;
	opacity: 0.55;
}

.idx a:hover,
.idx a.cur {
	color: var(--ink);
}

.idx a.cur::before {
	opacity: 1;
}

.doc {
	font-size: 17px;
	line-height: 1.62;
	min-width: 0;
}

.sec {
	padding: 0 0 64px;
	scroll-margin-top: 92px;
}

.sec + .sec {
	padding-top: 64px;
	border-top: 1px solid var(--line);
}

.sec h2 {
	font-size: clamp(26px, 2.6vw, 38px);
	line-height: 1.1;
	letter-spacing: -0.03em;
	font-weight: 600;
	margin-bottom: 22px;
	text-wrap: balance;
}

.sec p {
	margin-top: 16px;
	text-wrap: pretty;
}

.sec h2 + p {
	margin-top: 0;
}

.sec ul {
	margin-top: 18px;
}

.sec li {
	padding: 15px 0;
	border-top: 1px solid var(--line);
}

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

.sec li ul {
	margin-top: 10px;
}

.sec li li {
	padding: 8px 0 8px 18px;
	border: 0 !important;
	position: relative;
}

.sec li li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 1.1em;
	width: 6px;
	height: 1px;
	background: var(--ink2);
}

.sec strong {
	font-weight: 600;
}

.sec a {
	text-decoration: underline;
	text-decoration-color: var(--bl);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.3s;
}

.sec a:hover {
	text-decoration-color: currentColor;
}

.sec .callout {
	margin-top: 22px;
	padding: 18px 20px;
	border-radius: 16px;
	box-shadow: 0 0 0 1px var(--line);
	background: var(--sheet);
}

/* The text scrolls under the header: the wall's colour fades in behind it. */
.legal .top::before {
	content: '';
	position: absolute;
	z-index: -1;
	left: 0;
	right: 0;
	top: calc(-1 * env(safe-area-inset-top, 0px));
	bottom: -22px;
	background: linear-gradient(var(--wall) 62%, color-mix(in srgb, var(--wall) 0%, transparent));
	pointer-events: none;
}

.top .tab {
	font-size: 14px;
	padding: 8px 10px;
	color: var(--ink2);
	border-radius: 999px;
	transition: color 0.3s;
}

.top .tab[aria-current] {
	color: var(--ink);
}

.end {
	height: min(78svh, 640px);
}

.end .mid {
	padding-top: 40px;
}

.end .big {
	height: clamp(44px, 6vw, 84px);
}

.end .btn {
	margin-top: 6px;
}

/* The sun that passes as a page opens: a disc big enough to cover the whole screen at its
   middle, which then goes on up and out. Leaving for the other page, it first rises to cover
   this one (site.js), so the two pages are one pass of the sun. */
.legal .sunm {
	--sr: max(78.125vw, 85vmax);
	--s: 4;
	display: block;
	position: fixed;
	z-index: 60;
	left: calc(50% - var(--sr) / var(--s));
	top: calc(50% - var(--sr) / var(--s));
	width: calc(2 * var(--sr) / var(--s));
	height: calc(2 * var(--sr) / var(--s));
	border-radius: 50%;
	background: var(--gold);
	pointer-events: none;
	animation: sunout 1s cubic-bezier(0.5, 0, 0.2, 1) 0.2s both;
}

@keyframes sunout {
	from {
		transform: translate3d(0, 0, 0) scale(var(--s));
	}

	to {
		transform: translate3d(0, calc(-50vh - var(--sr)), 0) scale(var(--s));
		visibility: hidden;
	}
}

/* ---------------------------------------------------------------- narrower screens */

@media (max-width: 1020px) {
	.hero {
		padding: 112px var(--gut) 40px;
		min-height: 0;
	}

	.cols {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
		padding: 28px var(--gut) 80px;
	}

	.idx {
		position: static;
	}

	.sec {
		padding-bottom: 44px;
	}

	.sec + .sec {
		padding-top: 44px;
	}

	.top .tab {
		padding: 8px 6px;
	}

	.top nav {
		gap: 2px;
	}
}

@media (max-width: 820px) {
	.pin {
		padding: 76px var(--gut) 40px;
	}

	.c-split,
	.c-ask {
		grid-template-columns: minmax(0, 1fr);
		align-content: center;
		gap: 24px;
	}

	.c-split .med,
	.c-split.rev .med {
		order: 0;
		margin: 0;
	}

	.c-split.rev {
		grid-template-columns: minmax(0, 1fr);
	}

	.feat,
	.c-ask .lead,
	.chat .box {
		display: none;
	}

	.c-wide {
		grid-template-rows: auto auto;
		align-content: center;
		padding-bottom: 40px !important;
	}

	.c-wide.whole .med {
		container-type: normal;
		display: block;
		justify-items: normal;
	}

	.c-wide.whole .mac {
		width: auto;
	}

	.chat {
		font-size: 14px;
		gap: 8px;
	}

	.chat .card {
		padding: 8px 10px 8px 12px;
	}

	.txt {
		gap: 16px;
	}

	.duo .iph {
		width: min(52%, calc((100svh - 300px) * 0.44));
	}

	.duo .mac {
		left: 30%;
		right: calc(-1 * var(--gut) - 12%);
	}
}

/* A phone: Download, Privacy, Terms, the switch and Sign in still share one row with the
   wordmark, each a little smaller. */
@media (max-width: 480px) {
	.top .wm {
		height: 18px;
	}

	.top nav {
		gap: 0;
	}

	.top .tab {
		font-size: 12px;
		padding: 10px 4px;
	}

	.top .look {
		width: 32px;
	}

	.top .btn {
		min-height: 32px;
		padding: 0 11px;
		font-size: 13px;
		margin-left: 2px;
	}
}

@media (max-width: 380px) {
	.top {
		padding-left: 16px;
		padding-right: 16px;
	}

	.top .tab {
		padding: 10px 3px;
	}
}

@media (max-width: 349px) {
	.top .wm {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cue,
	.legal .sunm {
		display: none;
	}

	.rows p,
	.act .r1 .cb,
	.act .r1 .cb svg,
	.act .r1 div,
	.act .tiles .n i {
		animation: none;
	}
}
