/* RenderBadger site.

   One stylesheet for the landing page, docs, login and dashboard. The site
   layer is dialog's: zinc ramp, system face at weight 500, pill buttons,
   sticky blurred nav; here on zinc-50 instead of zinc-950. The figures on
   the landing page are the product's own output: a terminal, the rendered
   sheet, a browser viewport. */

:root {
	--zinc-50: #fafafa;
	--zinc-100: #f4f4f5;
	--zinc-200: #e4e4e7;
	--zinc-300: #d4d4d8;
	--zinc-400: #a1a1aa;
	--zinc-500: #71717a;
	--zinc-600: #52525b;
	--zinc-700: #3f3f46;
	--zinc-800: #27272a;
	--zinc-900: #18181b;
	--zinc-950: #09090b;
	--accent: #f472b6;
	--ok: #15803d;
	--bad: #b91c1c;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--gutter: clamp(1.25rem, 4vw, 3rem);
	color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	overflow-x: clip;
	background: var(--zinc-50);
	color: var(--zinc-700);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-weight: 500; margin: 0; letter-spacing: 0; color: var(--zinc-900); }
p { margin: 0; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: 0.9em; background: var(--zinc-100); border-radius: 0.25rem; padding: 0.1em 0.35em; color: var(--zinc-800); }
pre { margin: 0; overflow: auto; }
pre code { background: none; padding: 0; font-size: inherit; }

/* Nav */

.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem var(--gutter);
	background: color-mix(in srgb, var(--zinc-50) 82%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--zinc-200);
}
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 500; font-size: 1.25rem; line-height: 1; color: var(--zinc-900); }
.logo { width: 1.75rem; height: 1.75rem; border-radius: 22%; display: block; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.95rem; color: var(--zinc-500); }
.nav-links a:hover { color: var(--zinc-900); }
.nav-links form { display: inline; }

/* Buttons */

.button {
	display: inline-block;
	background: var(--zinc-900);
	color: var(--zinc-50);
	padding: 0.8rem 1.35rem;
	border-radius: 999px;
	border: 0;
	font: inherit;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: background 120ms ease;
}
.button:hover { background: var(--zinc-950); color: #fff; }
.button:disabled { background: var(--zinc-400); cursor: default; }
.button-small { padding: 0.5rem 1rem; font-size: 0.9rem; }
.button-quiet { background: transparent; color: var(--zinc-900); border: 1px solid var(--zinc-300); }
.button-quiet:hover { background: var(--zinc-100); color: var(--zinc-900); }
.button-text { background: none; border: 0; padding: 0; font: inherit; color: var(--zinc-900); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.button-text.danger { color: var(--bad); }

@property --ring-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.button-ring {
	--ring-angle: 0deg;
	border: 2px solid transparent;
	background:
		linear-gradient(var(--zinc-900), var(--zinc-900)) padding-box,
		conic-gradient(from var(--ring-angle), #f472b6, #ffc799, #89b4fa, #c4a7e7, #f472b6) border-box;
	animation: ring-turn 3s linear infinite;
}
.button-ring:hover {
	background:
		linear-gradient(var(--zinc-950), var(--zinc-950)) padding-box,
		conic-gradient(from var(--ring-angle), #f472b6, #ffc799, #89b4fa, #c4a7e7, #f472b6) border-box;
}
@keyframes ring-turn { to { --ring-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) { .button-ring { animation: none; } }

/* Hero */

.hero { padding: clamp(4rem, 10vw, 7rem) var(--gutter) 0; text-align: center; }
.hero h1 { font-size: clamp(2.5rem, 6.5vw, 5rem); line-height: 1.06; max-width: 14ch; margin: 0 auto; text-wrap: balance; }
.lede { max-width: 34rem; margin: 1.75rem auto 0; color: var(--zinc-500); font-size: 1.15rem; text-wrap: pretty; }
.cta-row { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; margin-top: 2.25rem; }
.cta-note { color: var(--zinc-500); font-size: 0.9rem; }

/* The desktop: dialog's gradient, two windows on it. The terminal is the
   request, the sheet is the response. */

.desktop {
	position: relative;
	max-width: 76rem;
	margin: 4.5rem auto 0;
	padding: 1.5rem;
	border-radius: 0.75rem;
	overflow: hidden;
	background: linear-gradient(135deg, #1d3b7a 0%, #5b3c9e 55%, #c2557f 100%);
	display: grid;
	grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
	gap: 1.5rem;
	align-items: start;
	text-align: left;
}
@media (max-width: 720px) { .desktop { padding: 0.75rem; gap: 0.75rem; } }

.term {
	background: var(--zinc-950);
	color: var(--zinc-300);
	border-radius: 0.625rem;
	box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.55);
	padding: 1.5rem 1.75rem;
	font-family: var(--mono);
	font-size: 0.8125rem;
	line-height: 1.65;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	min-width: 0;
}
.term .prompt { color: var(--zinc-600); }
.term .flag { color: var(--zinc-500); }
.term .str { color: #ffc799; }
.term .hdr { color: var(--zinc-500); }
.term .status { color: #86efac; }
.term .caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -0.15em; animation: caret-blink 1s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
.term .response { display: block; margin-top: 1rem; }

/* The rendered sheet: a4-ish, white, paper shadow. It is a real invoice
   laid out the way a customer's print CSS would lay it out. */
.sheet {
	background: #fff;
	color: var(--zinc-800);
	border-radius: 0.25rem;
	box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.55);
	padding: 2rem 2.25rem;
	font-size: 0.75rem;
	line-height: 1.5;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	aspect-ratio: 1 / 1.3;
}
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sheet-head strong { font-size: 1.25rem; font-weight: 500; color: var(--zinc-900); }
.sheet-meta { color: var(--zinc-500); font-size: 0.7rem; line-height: 1.5; text-align: right; }
.sheet-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.75rem; color: var(--zinc-600); }
.sheet-parties b { display: block; font-weight: 500; color: var(--zinc-900); margin-bottom: 0.15rem; }
.sheet table { width: 100%; border-collapse: collapse; margin-top: 1.75rem; }
.sheet th { text-align: left; font-weight: 500; color: var(--zinc-500); font-size: 0.7rem; padding: 0 0 0.4rem; border-bottom: 1px solid var(--zinc-900); }
.sheet td { padding: 0.45rem 0; border-bottom: 1px solid var(--zinc-200); vertical-align: top; }
.sheet th.num, .sheet td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 0.75rem; }
.sheet-total { display: flex; justify-content: flex-end; gap: 2.5rem; margin-top: 0.9rem; font-weight: 500; color: var(--zinc-900); font-size: 0.85rem; }
.sheet-foot { margin-top: auto; padding-top: 1.5rem; display: flex; justify-content: space-between; color: var(--zinc-400); font-size: 0.65rem; }
.desktop .term { align-self: start; height: 19rem; overflow: hidden; }
.desktop .sheet { align-self: start; animation: card-settle 260ms cubic-bezier(0.32, 0.72, 0, 1) both; }
.desktop .sheet.pending { visibility: hidden; }
@keyframes card-settle { from { transform: translateY(8px) scale(0.985); opacity: 0; } }
@media (max-width: 720px) {
	.desktop { grid-template-columns: minmax(0, 1fr); min-height: 0; }
	.sheet { aspect-ratio: auto; }
	.desktop .sheet.pending { display: none; }
	.desktop .term { height: 26rem; }
	.sheet-foot { padding-top: 1.25rem; }
}

/* Feature rows */

.feature {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
	max-width: 70rem;
	margin: 0 auto;
	padding: clamp(4rem, 9vw, 7rem) var(--gutter) 0;
}
.feature-flip .feature-text { order: 2; }
/* A wide section stacks: the copy above, the figure the full width below. */
.feature-wide { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.feature-wide .feature-text { max-width: 36rem; }
.feature-wide figure { max-width: 60rem; }
.feature h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.12; max-width: 16ch; text-wrap: balance; }
.feature p { margin-top: 1.1rem; color: var(--zinc-500); max-width: 32rem; text-wrap: pretty; }
.feature figure { margin: 0; min-width: 0; }
.figcap { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.7rem; color: var(--zinc-400); }

/* Two pages side by side: the break, the repeated table header, the page
   numbers, and a customer's own print CSS: a brand rule, zebra rows, a
   highlighted total. */
.sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.sheets .sheet { box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 12px 30px -12px rgba(0, 0, 0, 0.35); border: 1px solid var(--zinc-200); aspect-ratio: 1 / 1.25; padding: 0 1.75rem 1.25rem; font-size: 0.68rem; line-height: 1.45; --brand: #0f766e; border-top: 4px solid var(--brand); }
.inv-running { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 0 0.7rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--zinc-200); color: var(--zinc-400); font-size: 0.58rem; }
.inv-running b { font-weight: 500; color: var(--brand); font-size: 0.78rem; }
.inv-title { font-size: 1.4rem; font-weight: 500; color: var(--zinc-900); line-height: 1.1; }
.inv-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.75rem; color: var(--zinc-800); }
.inv-meta span, .inv-parties span, .inv-pay span { display: block; color: var(--zinc-400); font-size: 0.55rem; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 0.9rem 0 1rem; color: var(--zinc-600); }
.inv-parties b { display: block; font-weight: 500; color: var(--zinc-900); }
.sheets .sheet table { margin-top: 0; }
.sheets .sheet th { color: var(--zinc-500); border-bottom: 1px solid var(--zinc-800); font-size: 0.55rem; padding-bottom: 0.3rem; }
.sheets .sheet td { padding-top: 0.32rem; padding-bottom: 0.32rem; border-bottom: 0; }
.sheets .sheet tbody tr:nth-child(even) td { background: var(--zinc-50); }
.sheets .sheet td:first-child { padding-left: 0.3rem; }
.sheets .sheet td:last-child { padding-right: 0.3rem; }
.inv-totals { margin: 1rem 0 0 auto; width: 55%; }
.inv-totals > div { display: flex; justify-content: space-between; padding: 0.25rem 0.3rem; color: var(--zinc-600); font-variant-numeric: tabular-nums; }
.inv-totals .inv-due { margin-top: 0.4rem; background: var(--brand); color: #fff; font-weight: 500; font-size: 0.8rem; border-radius: 0.2rem; padding: 0.45rem 0.6rem; }
.inv-pay { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--zinc-200); display: grid; gap: 0.5rem; color: var(--zinc-700); font-variant-numeric: tabular-nums; }
.sheets .sheet-foot { font-size: 0.55rem; }
@media (max-width: 760px) { .sheets { grid-template-columns: 1fr; gap: 1.25rem; } .sheets .sheet { aspect-ratio: auto; } }

/* A browser viewport with a page rendered in it. */
.viewport {
	background: #fff;
	border: 1px solid var(--zinc-200);
	border-radius: 0.5rem;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 12px 30px -12px rgba(0, 0, 0, 0.3);
	aspect-ratio: 16 / 10;
	overflow: hidden;
	padding: 2rem 2.25rem;
	font-size: 0.8rem;
	color: var(--zinc-600);
}
.viewport .vp-title { font-size: 1.35rem; font-weight: 500; color: var(--zinc-900); }
.viewport .vp-sub { color: var(--zinc-500); margin-top: 0.25rem; }
.viewport .vp-entry { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; margin-top: 1.4rem; }
.viewport .vp-entry time { color: var(--zinc-400); font-size: 0.75rem; padding-top: 0.15rem; }
.viewport .vp-entry b { display: block; font-weight: 500; color: var(--zinc-900); }
.viewport .vp-entry p { margin-top: 0.15rem; color: var(--zinc-500); }
.viewport .tag { display: inline-block; font-size: 0.65rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: var(--zinc-100); color: var(--zinc-600); margin-left: 0.4rem; vertical-align: 0.1em; }

/* The async timeline is a terminal again, standing on its own. */
.term-shot { box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 20px 50px -20px rgba(0, 0, 0, 0.5); }
.term .t { color: var(--zinc-600); display: inline-block; width: 6.5ch; white-space: nowrap; }

/* Pricing closes the page, the way dialog's cohort section does. */

.pricing {
	margin-top: clamp(5rem, 12vw, 9rem);
	padding: clamp(4rem, 9vw, 7rem) var(--gutter);
	border-top: 1px solid var(--zinc-200);
}
.pricing-inner { max-width: 46rem; margin: 0 auto; }
.pricing h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.08; text-wrap: balance; }
.pricing > .pricing-inner > p { margin-top: 1.25rem; color: var(--zinc-500); text-wrap: pretty; max-width: 36rem; }
.plans-table { width: 100%; border-collapse: collapse; margin-top: 2.5rem; font-size: 0.95rem; }
.plans-table th { text-align: left; font-weight: 500; color: var(--zinc-500); font-size: 0.85rem; padding: 0 0.75rem 0.6rem 0; border-bottom: 1px solid var(--zinc-900); }
.plans-table td { padding: 0.9rem 0.75rem 0.9rem 0; border-bottom: 1px solid var(--zinc-200); vertical-align: top; }
.plans-table td:first-child { color: var(--zinc-900); font-weight: 500; }
.plans-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plans-table .inc { color: var(--zinc-500); }
.pricing-note { margin-top: 1rem; color: var(--zinc-400); font-size: 0.9rem; }
.pricing .cta-row { align-items: flex-start; margin-top: 2.25rem; }
@media (max-width: 640px) { .plans-table .inc { display: none; } }

/* Footer */

.footer {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding: 2rem var(--gutter) 3rem;
	color: var(--zinc-500);
	font-size: 0.9rem;
	border-top: 1px solid var(--zinc-200);
}
.footer a { text-decoration: underline; text-underline-offset: 0.2em; }

@media (max-width: 800px) {
	.feature { grid-template-columns: minmax(0, 1fr); }
	.feature-flip .feature-text { order: 0; }
	.nav-links { gap: 1rem; }
	.nav-links a:not(.button) { display: none; }
}

/* ------------------------------------------------------------------ */
/* App pages: login, dashboard, docs. The same ramp, left aligned. */

.wrap { max-width: 64rem; margin: 0 auto; padding: 2.5rem var(--gutter) 5rem; }
.wrap h1 { font-size: 2rem; line-height: 1.15; margin-bottom: 0.5rem; }
.wrap h2 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.wrap p + p { margin-top: 0.6rem; }
.muted { color: var(--zinc-500); }
.small { font-size: 0.9rem; }
.ok { color: var(--ok); }
.warn { color: #b45309; }
.lead { color: var(--zinc-500); font-size: 1.15rem; max-width: 40rem; text-wrap: pretty; }

.card { background: #fff; border: 1px solid var(--zinc-200); border-radius: 0.5rem; padding: 1.5rem; margin: 0 0 1.25rem; }
.narrow { max-width: 26rem; margin: 3rem auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; margin: 0 0 1rem; font-size: 0.9rem; color: var(--zinc-500); }
input { display: block; width: 100%; margin-top: 0.4rem; font: inherit; color: var(--zinc-900); background: #fff; border: 1px solid var(--zinc-300); border-radius: 0.375rem; padding: 0.7rem 0.85rem; }
input:focus { border-color: var(--zinc-500); outline: none; }
.row { display: flex; gap: 0.75rem; align-items: center; margin-top: 1rem; }
.row input { margin: 0; }
.row .button { flex-shrink: 0; }
.or { text-align: center; color: var(--zinc-400); margin: 0.75rem 0; font-size: 0.9rem; }
.inline { display: inline; }

.big { font-size: 2rem; font-weight: 500; color: var(--zinc-900); margin: 0 0 0.5rem; line-height: 1.2; }
.bar { height: 6px; background: var(--zinc-200); border-radius: 3px; overflow: hidden; margin: 0 0 0.75rem; }
.bar span { display: block; height: 100%; background: var(--zinc-900); }

.wrap table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 0.75rem; }
.wrap th, .wrap td { text-align: left; padding: 0.55rem 0.6rem 0.55rem 0; border-bottom: 1px solid var(--zinc-200); vertical-align: top; }
.wrap th { color: var(--zinc-500); font-weight: 500; font-size: 0.8rem; }
.wrap table.small { font-size: 0.85rem; }
tr.revoked td { color: var(--zinc-400); }
.st-done { color: var(--ok); }
.st-failed { color: var(--bad); }
.wrap pre { background: var(--zinc-950); color: var(--zinc-200); border-radius: 0.5rem; padding: 0.9rem 1rem; font-size: 0.85rem; line-height: 1.55; }
pre.key { user-select: all; color: #ffc799; }

.plans { list-style: none; padding: 0; margin: 0; }
.plans li { padding: 0.65rem 0; border-bottom: 1px solid var(--zinc-200); display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.plans li.current { color: var(--zinc-900); }
.plans li strong { font-weight: 500; color: var(--zinc-900); }
.plans em { margin-left: auto; color: var(--zinc-400); font-style: normal; font-size: 0.85rem; }
.plans form { margin-left: auto; }

/* Docs */

.docs { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 3rem; max-width: 70rem; }
@media (max-width: 760px) { .docs { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } }
.toc { position: sticky; top: 5rem; align-self: start; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
.toc a { color: var(--zinc-500); }
.toc a:hover { color: var(--zinc-900); }
.docs h2 { font-size: 1.5rem; margin: 3rem 0 0.75rem; padding-top: 1.5rem; border-top: 1px solid var(--zinc-200); }
.docs h2:first-of-type { border-top: 0; padding-top: 0; }
.docs p { margin-top: 0.6rem; max-width: 44rem; }
.docs ol { padding-left: 1.25rem; }
.docs pre { margin: 1rem 0; }
.docs table { margin: 1rem 0; }
.param td:first-child { font-family: var(--mono); font-size: 0.85em; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { .desktop .sheet { animation: none; } }
