/* ------------------------------------------------------------------
   Rhapsody: the deep green of the pixel leaf icon, around the app's
   neutral dark code theme. Light and dark follow the visitor's system.

   Fonts: Pixelify Sans (wordmark), Schibsted Grotesk (headings),
   Inter (text), JetBrains Mono (code). They are used when installed
   or self-hosted under /static/fonts/; otherwise the system fallbacks
   apply. The CSP allows no third-party font hosts.
   ------------------------------------------------------------------ */
:root {
	color-scheme: light dark;
	--bg: light-dark(#ffffff, #0d1610);
	--ink: light-dark(#12221a, #e4efe2);
	--mute: light-dark(#4a5c51, #9db0a2);
	--line: light-dark(#dfe8e0, #22342a);
	--soft: light-dark(#f1f7ef, #132019);
	--deep: #17361f;
	--deeper: #10271a;
	--leaf: #6fbf6a;
	--vein: #c4e8a8;
	--stem: #8a6240;
	--accent: light-dark(#24603a, #8fd48a);
	--btn-bg: light-dark(#17361f, #c4e8a8);
	--btn-ink: light-dark(#ffffff, #17361f);
	--on-green: #cfe3c9;
	--on-green-dim: #b4cdb0;
	--code-bg: #161616;
	--code-ink: #c8c8c8;
	--warn: #c98a2e;

	--font: Inter, system-ui, 'Segoe UI', sans-serif;
	--head: 'Schibsted Grotesk', Inter, system-ui, 'Segoe UI', sans-serif;
	--mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
	--pixel: 'Pixelify Sans', var(--mono);
	--max: 1240px;
	--pad: max(5vw, 16px);
	--radius: 12px;
}

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

html {
	scroll-padding-top: 24px;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	position: relative;
	background: var(--bg);
	color: var(--ink);
	font: 16px/1.55 var(--font);
	overflow-x: clip;
}

a {
	color: inherit;
}

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

h1,
h2,
h3,
h4 {
	font-family: var(--head);
	letter-spacing: -0.02em;
	line-height: 1.05;
	text-wrap: balance;
	margin: 0;
}
h1 {
	font-size: clamp(34px, 5vw, 54px);
	font-weight: 800;
}
h2 {
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 800;
}
h3 {
	font-size: 19px;
	font-weight: 600;
	line-height: 1.25;
}
p {
	margin: 0;
}

code,
pre {
	font-family: var(--mono);
	font-size: 0.92em;
}

:focus-visible {
	outline: 3px solid var(--leaf);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- layout */
.band {
	padding-block: clamp(40px, 6vw, 88px);
	padding-inline: var(--pad);
}
.band.flush-top {
	padding-top: 0;
}
.band.soft {
	background: var(--soft);
	border-block: 1px solid var(--line);
}
.wrap {
	max-width: var(--max);
	margin: 0 auto;
}
.container {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--pad);
}
.section {
	padding: clamp(40px, 6vw, 88px) 0;
}
.section-title {
	font-size: clamp(28px, 3.4vw, 40px);
	margin: 0 0 12px;
}
.section-lead {
	color: var(--mute);
	font-size: 17px;
	max-width: 640px;
	margin: 0 0 36px;
}
.section-lead a,
.small a,
.intro p a,
.faq-split p a {
	color: var(--accent);
}
.center {
	text-align: center;
}
.center .section-lead {
	margin-inline: auto;
}
.kicker,
.eyebrow {
	display: block;
	color: var(--accent);
	font-weight: 600;
	margin-bottom: 10px;
}
.small {
	color: var(--mute);
	font-size: 14px;
}
.todo {
	outline: 1px dashed var(--warn);
	outline-offset: 2px;
}
.grid {
	display: grid;
	gap: 20px;
}
.grid-2 {
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.grid-3 {
	grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 22px;
}

/* ---------------------------------------------------------------- buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 20px;
	border-radius: 8px;
	font: 600 16px var(--font);
	text-decoration: none;
	color: var(--ink);
	background: transparent;
	border: 1px solid var(--line);
	cursor: pointer;
	transition: transform 0.15s;
}
.btn:hover {
	transform: translateY(-1px);
}
.btn-primary {
	background: var(--btn-bg);
	color: var(--btn-ink);
	border-color: transparent;
}
.btn-disabled,
.btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}
.btn-disabled:hover {
	transform: none;
}
/* On the green field. */
.hero .btn,
.green .btn {
	color: #fff;
	border-color: color-mix(in srgb, var(--vein) 45%, transparent);
}
.hero .btn-primary,
.green .btn-primary {
	background: var(--vein);
	color: var(--deep);
	border-color: transparent;
}

/* ---------------------------------------------------------------- cards */
.card {
	background: var(--soft);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.card p {
	color: var(--mute);
}
.soft .card {
	background: var(--bg);
}
.badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--leaf) 18%, transparent);
	color: var(--accent);
	border: 1px solid color-mix(in srgb, var(--leaf) 45%, transparent);
	vertical-align: middle;
}
.badge-warn {
	background: color-mix(in srgb, var(--warn) 15%, transparent);
	border-color: var(--warn);
	color: light-dark(#7a4f10, #f2c46d);
}

/* ---------------------------------------------------------------- header */
.site-header {
	background: var(--deep);
	color: #f2f8ef;
	padding-inline: var(--pad);
}
.site-header.on-hero {
	position: absolute;
	inset: 0 0 auto;
	z-index: 2;
	background: transparent;
}
.site-header-inner {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	padding-block: 18px;
	max-width: var(--max);
	margin: 0 auto;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	font: 600 22px var(--pixel);
}
.brand img {
	image-rendering: pixelated;
}
.main-nav {
	display: flex;
	gap: 22px;
	margin-left: auto;
	flex-wrap: wrap;
}
.main-nav a {
	text-decoration: none;
	color: var(--on-green);
	font-size: 15px;
}
.main-nav a:hover,
.main-nav a[aria-current='page'] {
	color: #fff;
}
.main-nav a[aria-current='page'] {
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-color: var(--leaf);
}

/* ---------------------------------------------------------------- footer */
.site-footer {
	background: var(--deeper);
	color: var(--on-green-dim);
	font-size: 14px;
	padding: 40px 0 28px;
}
.footer-cols {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 28px;
}
.footer-cols > div {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.footer-cols .brand {
	font-size: 18px;
	color: #f2f8ef;
	margin-bottom: 4px;
}
.site-footer h4 {
	color: #f2f8ef;
	font-size: 15px;
	margin-bottom: 4px;
}
.site-footer a {
	color: var(--on-green);
	text-decoration: none;
}
.site-footer a:hover {
	color: #fff;
}
.footer-bottom {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
	padding-top: 18px;
	border-top: 1px solid #2f5a3c;
}
@media (max-width: 720px) {
	.footer-cols {
		grid-template-columns: 1fr 1fr;
	}
	.footer-brand {
		grid-column: 1 / -1;
	}
}

/* ---------------------------------------------------------------- hero */
.hero {
	background: radial-gradient(120% 80% at 80% 0%, #235a35 0%, var(--deep) 55%, var(--deeper) 100%);
	color: #f2f8ef;
	padding-top: 66px; /* the header sits on top */
}
.lead {
	max-width: var(--max);
	margin: clamp(24px, 4vw, 56px) auto clamp(28px, 4vw, 44px);
}
.lead h1 {
	max-width: 14ch;
}
.lead p {
	font-size: 18px;
	color: var(--on-green);
	max-width: 56ch;
	margin-top: 18px;
}

/* ---------------------------------------------------------------- screenshots */
.shot {
	display: block;
	margin-bottom: 36px;
}
.shot img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 0 0 1px #2e2e2e;
}
.hero-shot {
	max-width: var(--max);
	margin: 0 auto;
}
.hero-shot img {
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55), 0 0 0 1px #2e2e2e;
}

/* Code colors, sampled from the app's own theme. */
.k { color: #b48ae0; }
.t { color: #56c2c2; }
.s { color: #75b877; }
.n { color: #d08a50; }
.f { color: #6fa8dc; }
.c { color: #8a8a8a; }
.use {
	color: #f0d8d6;
	background: #7d4341;
	border-radius: 2px;
}
.note {
	color: #8a8a8a;
}

/* ---------------------------------------------------------------- landing sections */
.intro {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px 48px;
	align-items: end;
	margin-bottom: 36px;
}
.intro p {
	color: var(--mute);
	font-size: 17px;
}
.modes3,
.flow,
.trio {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.trio {
	margin-top: 32px;
}
.quad {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}
.quad .card {
	border-left: 3px solid var(--leaf);
}
.trio p {
	color: var(--mute);
	margin-top: 6px;
}
.snip {
	background: var(--code-bg);
	color: var(--code-ink);
	border-radius: 8px;
	padding: 10px 0;
	font: 12.5px/20px var(--mono);
	overflow-x: auto;
	margin-bottom: 6px;
}
.snip div {
	white-space: pre;
	padding: 0 12px;
}
.snip .del {
	background: rgba(208, 84, 63, 0.18);
	color: #e7a597;
}
.snip .add {
	background: rgba(181, 201, 106, 0.16);
}
.split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: 40px;
	align-items: center;
}
.split.top {
	align-items: start;
}
.split + .split {
	margin-top: 72px;
}
.split p {
	color: var(--mute);
	margin-top: 12px;
}
.split ul {
	margin: 16px 0 0;
	padding-left: 20px;
	color: var(--mute);
}
.split li {
	margin: 4px 0;
}
.heat {
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: var(--soft);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 18px;
}
.heat .row {
	display: grid;
	grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 5.5em;
	gap: 12px;
	align-items: center;
	font-size: 14px;
}
.heat .row span:first-child {
	font-family: var(--mono);
	font-size: 13px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.heat .row.head {
	color: var(--mute);
	font-size: 13px;
}
.heat .row.head span:first-child {
	font-family: inherit;
}
.heat .bar2 {
	display: block;
	height: 12px;
	border-radius: 3px;
	background: linear-gradient(90deg, #f2c46d, #ff8c5a);
}
.heat .num {
	text-align: right;
	color: var(--mute);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.heat .cap {
	color: var(--mute);
	font-size: 13px;
	margin-top: 6px;
}
.scale {
	background: var(--soft);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 22px;
}
.scale .track {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	height: 16px;
	border-radius: 4px;
	overflow: hidden;
	margin: 18px 0 8px;
}
.scale .track i:nth-child(1) { background: var(--leaf); }
.scale .track i:nth-child(2) { background: #e0a23a; }
.scale .track i:nth-child(3) { background: #d0543f; }
.scale .ticks {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	font-size: 14px;
	color: var(--mute);
}
.scale .noteline {
	font: 14px var(--mono);
	background: var(--code-bg);
	color: var(--code-ink);
	border-radius: 8px;
	padding: 10px 12px;
	overflow-x: auto;
	white-space: nowrap;
}
.flow .step {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--deep);
	color: var(--vein);
	display: grid;
	place-items: center;
	font-weight: 600;
}
.md {
	background: var(--code-bg);
	color: var(--code-ink);
	border-radius: 8px;
	padding: 12px;
	font: 12.5px/1.6 var(--mono);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
.md .h { color: #b48ae0; }
.md .q { color: #8a8a8a; }
.pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
}
.pills span {
	border: 1px solid var(--line);
	background: var(--soft);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 15px;
}
h3.gap {
	margin-top: 26px;
}
.end {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

/* ---------------------------------------------------------------- green band */
.green {
	background: var(--deep);
	color: #f2f8ef;
}
.green .intro p,
.green p {
	color: var(--on-green);
}
.green .kicker {
	color: var(--vein);
}
.green .intro p a {
	color: var(--vein);
}

/* ---------------------------------------------------------------- pricing */
.pricing {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: 20px;
}
.tier {
	border-radius: 14px;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: #1f4429;
	border: 1px solid #2f5a3c;
	color: #f2f8ef;
}
.tier.highlighted {
	background: #f2f8ef;
	color: var(--deep);
	border-color: #f2f8ef;
}
.tier .price {
	color: inherit;
}
.price {
	margin: 0;
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
}
.amount {
	font: 800 clamp(36px, 5vw, 48px)/1 var(--head);
	white-space: nowrap;
}
.period {
	font-size: 16px;
	font-weight: 600;
}
.tier .tier-desc,
.tier li {
	color: var(--on-green);
}
.tier ul {
	margin: 0;
	padding-left: 20px;
	flex: 1;
}
.tier li {
	margin: 5px 0;
}
.tier.highlighted .tier-desc,
.tier.highlighted li,
.tier.highlighted .small {
	color: #33503d;
}
.tier .btn {
	align-self: flex-start;
}
.tier.highlighted .btn-primary {
	background: var(--deep);
	color: #fff;
}
.vat-note,
.sample {
	font-size: 13px;
	margin-top: 16px;
	color: var(--mute);
}
.green .vat-note,
.green .sample {
	color: var(--on-green-dim);
}
.green .sample {
	display: inline-block;
	margin-top: 4px;
}

/* ---------------------------------------------------------------- faq */
.faq-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
	gap: 40px;
}
.faq-split > div > p {
	color: var(--mute);
	margin-top: 12px;
}
.faq {
	text-align: left;
}
.faq details {
	border-bottom: 1px solid var(--line);
	padding: 16px 0;
}
.faq summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 17px;
	min-height: 28px;
}
.faq p {
	color: var(--mute);
	margin-top: 8px;
}

/* ---------------------------------------------------------------- download */
.platforms.grid {
	text-align: left;
	margin-bottom: 36px;
	max-width: 900px;
	margin-inline: auto;
}
.platform {
	text-decoration: none;
	transition: border-color 0.15s;
}
.platform:hover,
.platform.detected {
	border-color: var(--leaf);
}
.platform p {
	flex: 1;
	margin-bottom: 6px;
}
.platform .btn {
	align-self: flex-start;
}
.platform.detected .btn {
	background: var(--btn-bg);
	color: var(--btn-ink);
	border-color: transparent;
}

/* ---------------------------------------------------------------- prose, legal */
.prose {
	max-width: 760px;
}
.prose h2 {
	font-size: clamp(22px, 2.6vw, 28px);
	margin: 40px 0 12px;
}
.prose h3 {
	margin: 28px 0 8px;
}
.prose p,
.prose li {
	color: var(--mute);
}
.prose p {
	margin: 0 0 14px;
}
.prose a {
	color: var(--accent);
}
.prose strong {
	color: var(--ink);
}
.prose table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: 15px;
	display: block;
	overflow-x: auto;
}
.prose th,
.prose td {
	border: 1px solid var(--line);
	padding: 8px 12px;
	text-align: left;
}
.prose th {
	background: var(--soft);
	color: var(--ink);
}
.prose td {
	color: var(--mute);
}
.prose :not(pre) > code {
	background: var(--soft);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 1px 5px;
}
pre.code {
	background: var(--code-bg);
	color: var(--code-ink);
	border-radius: 8px;
	padding: 14px 16px;
	overflow-x: auto;
	font-size: 14px;
}
.draft {
	border-color: var(--warn);
	margin: 24px 0 32px;
}
.draft,
.prose .draft {
	color: var(--ink);
}

/* ---------------------------------------------------------------- docs */
.docs {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 48px;
	padding-top: 48px;
	padding-bottom: 64px;
}
.docs-nav {
	position: sticky;
	top: 24px;
	align-self: start;
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 15px;
}
.docs-nav h4 {
	margin: 20px 0 6px;
	font-size: 13px;
	color: var(--accent);
}
.docs-nav h4:first-child {
	margin-top: 0;
}
.docs-nav a {
	color: var(--mute);
	text-decoration: none;
	padding: 3px 10px;
	border-left: 2px solid var(--line);
}
.docs-nav a:hover {
	color: var(--ink);
}
.docs-nav a[aria-current='page'] {
	color: var(--ink);
	border-left-color: var(--leaf);
	background: var(--soft);
}
.docs-nav .docs-back {
	margin-top: 24px;
	border-left: 0;
	padding-left: 0;
}
.docs-body > h1 {
	font-size: clamp(30px, 4vw, 42px);
	margin: 0 0 20px;
}
.link-cards {
	margin: 24px 0;
}
.link-card {
	text-decoration: none;
	gap: 4px;
	transition: border-color 0.15s;
}
.prose .link-card {
	color: var(--ink);
}
.link-card span {
	color: var(--mute);
	font-size: 15px;
}
.link-card:hover {
	border-color: var(--leaf);
}
@media (max-width: 860px) {
	.docs {
		grid-template-columns: 1fr;
		gap: 24px;
		padding-top: 24px;
	}
	.docs-nav {
		position: static;
		border-bottom: 1px solid var(--line);
		padding-bottom: 16px;
	}
}

/* ---------------------------------------------------------------- licenses */
.license {
	margin: 24px 0;
}
.license .btn {
	align-self: flex-start;
}
.license-key,
.recover-form input {
	width: 100%;
	font-family: var(--mono);
	color: var(--ink);
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
}
.license-key {
	resize: none;
	font-size: 14px;
	line-height: 1.5;
	padding: 12px;
	word-break: break-all;
}
.notice {
	color: var(--ink);
}
.notice.error {
	border-color: var(--warn);
}
.waiting {
	color: var(--ink);
}
/* Used for "waiting" text: a soft pulsing dot. */
.cursor::before {
	content: '';
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	margin-right: 0.5em;
	border-radius: 50%;
	background: var(--leaf);
	animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
	50% {
		opacity: 0.25;
	}
}
.recover-form {
	margin: 24px 0;
}
.recover-form label {
	font-weight: 600;
}
.field-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.recover-form input {
	flex: 1 1 240px;
	font-size: 16px;
	padding: 10px 12px;
}
.recover-form .small {
	margin: 0;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 820px) {
	.intro,
	.split,
	.faq-split {
		grid-template-columns: minmax(0, 1fr);
	}
	.modes3,
	.flow,
	.trio,
	.quad {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 600px) {
	.site-header-inner {
		gap: 8px;
		padding-block: 14px 10px;
	}
	.main-nav {
		gap: 18px;
		font-size: 14px;
		margin-left: 0;
		width: 100%;
		flex-wrap: nowrap;
		overflow-x: auto;
		white-space: nowrap;
		scrollbar-width: none;
	}
	.main-nav a {
		flex-shrink: 0;
	}
	.hero {
		padding-top: 92px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
