Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

23.9 KB
Raw Blame
<!doctype html>
<html lang="en">
	<head>
		<script>
			/* three.ws theme boot: no-flash; runtime in /theme-switcher.js */ (function () {
				document.documentElement.classList.add('js');
				try {
					var m = localStorage.getItem('twx_theme');
					var l =
						m === 'auto'
							? window.matchMedia &&
								window.matchMedia('(prefers-color-scheme: light)').matches
							: m === 'light';
					document.documentElement.setAttribute('data-theme', l ? 'light' : 'dark');
				} catch (e) {
					document.documentElement.setAttribute('data-theme', 'dark');
				}
			})();
		</script>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
		<title data-i18n="credits.meta_title">Credits · three.ws</title>
		<meta
			name="description"
			content="Top up your three.ws balance with SOL or $THREE and spend credits on 3D generation, agents, and compute. Hold $THREE for a discount on every spend."
			data-i18n-attr="content:credits.meta_description"
		/>
		<meta
			property="og:title"
			content="Credits · three.ws"
			data-i18n-attr="content:credits.meta_og_title"
		/>
		<meta
			property="og:description"
			content="Deposit SOL or $THREE for credits. Spend on Forge, agents, and compute. Hold $THREE for up to 30% off."
			data-i18n-attr="content:credits.meta_og_description"
		/>
		<meta property="og:url" content="https://three.ws/credits" />
		<meta
			property="og:image"
			content="https://three.ws/api/page-og?s=account&amp;t=Credits&amp;d=Top+up+with+SOL+or+%24THREE+and+spend+credits+on+3D+generation%2C+agents%2C+and+compute.+Hold+%24THREE+for+up+to+30%25+off+every+spend.&amp;p=%2Fcredits"
		/>
		<meta name="twitter:card" content="summary_large_image" />
		<link rel="canonical" href="https://three.ws/credits" />
		<link rel="icon" href="/favicon.ico" sizes="any" />
		<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
		<link rel="manifest" href="/manifest.webmanifest" />
		<link rel="stylesheet" href="/style.css" />
		<link rel="stylesheet" href="/nav.css" />
		<link rel="stylesheet" href="/footer.css" />
		<link rel="stylesheet" href="/fonts/fonts.css" />
		<link rel="stylesheet" href="/mobile.css" />
		<style>
			/* <body> is a column flexbox site-wide, so <main> is a flex item and
			   inherits min-width:auto. That floors it at its min-content width and
			   made the whole page 417px wide inside a 320px viewport, clipped
			   (not scrolled) by the global overflow-x:clip. min-width:0 lets it
			   shrink; the amount input below supplies the min-content that forced
			   it. Same reason for the grid/card rules that follow. */
			.credits-wrap {
				max-width: 1040px;
				width: 100%;
				min-width: 0;
				margin: 0 auto;
				padding: clamp(1.25rem, 4vw, 3rem) 1.25rem 4rem;
			}
			.credits-head {
				display: flex;
				flex-wrap: wrap;
				align-items: flex-end;
				justify-content: space-between;
				gap: 1rem;
				margin-bottom: 1.75rem;
			}
			.credits-head h1 {
				font-size: clamp(1.7rem, 4vw, 2.5rem);
				margin: 0 0 0.35rem;
				letter-spacing: -0.02em;
			}
			.credits-head p {
				margin: 0;
				color: var(--ink-dim, #9aa3b2);
				max-width: 52ch;
				line-height: 1.5;
			}
			.credits-grid {
				display: grid;
				grid-template-columns: 1.1fr 0.9fr;
				gap: 1.1rem;
				align-items: start;
				min-width: 0;
			}
			.credits-grid > * {
				min-width: 0;
			}
			@media (max-width: 820px) {
				.credits-grid {
					grid-template-columns: 1fr;
				}
			}
			.card {
				background: var(--surface-1, #14161c);
				border: 1px solid var(--stroke, #262a33);
				border-radius: 16px;
				padding: 1.25rem 1.35rem;
				min-width: 0;
			}
			.card h2 {
				font-size: 0.82rem;
				text-transform: uppercase;
				letter-spacing: 0.08em;
				color: var(--ink-dim, #9aa3b2);
				margin: 0 0 0.9rem;
				font-weight: 600;
			}
			.balance-amount {
				font-size: clamp(2.4rem, 7vw, 3.4rem);
				font-weight: 700;
				letter-spacing: -0.03em;
				line-height: 1;
				font-variant-numeric: tabular-nums;
			}
			.balance-sub {
				display: flex;
				gap: 1.5rem;
				margin-top: 1rem;
				flex-wrap: wrap;
			}
			.balance-sub div {
				display: flex;
				flex-direction: column;
				gap: 0.15rem;
			}
			.balance-sub .k {
				font-size: 0.72rem;
				color: var(--ink-dim, #9aa3b2);
				text-transform: uppercase;
				letter-spacing: 0.06em;
			}
			.balance-sub .v {
				font-size: 1.05rem;
				font-weight: 600;
				font-variant-numeric: tabular-nums;
			}
			.tier-pill {
				display: inline-flex;
				align-items: center;
				gap: 0.4rem;
				margin-top: 0.9rem;
				padding: 0.3rem 0.7rem;
				border-radius: 999px;
				background: color-mix(in srgb, var(--accent, #6c8cff) 14%, transparent);
				border: 1px solid color-mix(in srgb, var(--accent, #6c8cff) 35%, transparent);
				font-size: 0.8rem;
				font-weight: 600;
			}
			.seg {
				display: inline-flex;
				background: var(--surface-2, #1c1f27);
				border: 1px solid var(--stroke, #262a33);
				border-radius: 10px;
				padding: 3px;
				gap: 3px;
			}
			.seg button {
				appearance: none;
				border: 0;
				background: transparent;
				color: var(--ink-dim, #9aa3b2);
				font: inherit;
				font-weight: 600;
				padding: 0.45rem 1rem;
				border-radius: 8px;
				cursor: pointer;
				transition:
					background var(--duration-fast),
					color var(--duration-fast);
			}
			.seg button[aria-pressed='true'] {
				background: var(--btn-primary-bg, var(--accent, #6c8cff));
				color: var(--btn-primary-fg, #0a0a0a);
			}
			.field {
				margin-top: 1rem;
			}
			.field label {
				display: block;
				font-size: 0.78rem;
				color: var(--ink-dim, #9aa3b2);
				margin-bottom: 0.4rem;
			}
			.amt-row {
				display: flex;
				gap: 0.5rem;
				align-items: stretch;
			}
			.amt-row input {
				flex: 1;
				min-width: 0;
				background: var(--surface-2, #1c1f27);
				border: 1px solid var(--stroke, #262a33);
				border-radius: 10px;
				color: var(--ink, #e8ebf2);
				font: inherit;
				font-size: 1.1rem;
				padding: 0.6rem 0.8rem;
				font-variant-numeric: tabular-nums;
			}
			.amt-row .unit {
				display: flex;
				align-items: center;
				padding: 0 0.9rem;
				background: var(--surface-2, #1c1f27);
				border: 1px solid var(--stroke, #262a33);
				border-radius: 10px;
				font-weight: 700;
			}
			.quick {
				display: flex;
				gap: 0.4rem;
				margin-top: 0.55rem;
				flex-wrap: wrap;
			}
			.quick button {
				appearance: none;
				border: 1px solid var(--stroke, #262a33);
				background: var(--surface-2, #1c1f27);
				color: var(--ink-dim, #9aa3b2);
				border-radius: 999px;
				padding: 0.3rem 0.7rem;
				font: inherit;
				font-size: 0.82rem;
				cursor: pointer;
			}
			.quick button:hover {
				color: var(--ink, #e8ebf2);
				border-color: var(--accent, #6c8cff);
			}
			.rates {
				list-style: none;
				margin: 0.75rem 0 0;
				padding: 0;
				display: flex;
				flex-wrap: wrap;
				gap: 0.35rem 1rem;
				font-size: 0.78rem;
				color: var(--ink-dim, #9aa3b2);
			}
			.rates li {
				display: inline-flex;
				gap: 0.35rem;
				align-items: baseline;
				transition: color var(--duration-fast);
			}
			.rates li.is-active {
				color: var(--ink, #e8ebf2);
			}
			.rates b {
				font-weight: 600;
			}
			.rates .bonus {
				color: var(--ok, #58d68d);
				font-weight: 600;
			}
			.est {
				margin-top: 0.6rem;
				font-size: 0.85rem;
				color: var(--ink-dim, #9aa3b2);
				min-height: 1.2em;
			}
			.est b {
				color: var(--ink, #e8ebf2);
				font-variant-numeric: tabular-nums;
			}
			.btn {
				appearance: none;
				border: 0;
				cursor: pointer;
				font: inherit;
				font-weight: 600;
				border-radius: 10px;
				padding: 0.7rem 1.1rem;
				width: 100%;
				margin-top: 1rem;
				background: var(--btn-primary-bg, var(--accent, #6c8cff));
				color: var(--btn-primary-fg, #0a0a0a);
				transition:
					background var(--duration-fast),
					opacity var(--duration-fast);
			}
			.btn:not(.secondary):hover:not(:disabled) {
				background: var(--btn-primary-bg-hover, rgba(255, 255, 255, 0.88));
			}
			.btn:not(.secondary):active:not(:disabled) {
				background: var(--btn-primary-bg-active, rgba(255, 255, 255, 0.76));
			}
			.btn:disabled {
				opacity: var(--disabled-opacity, 0.4);
				cursor: var(--disabled-cursor, not-allowed);
			}
			.btn.secondary {
				background: var(--btn-secondary-bg, var(--surface-2, #1c1f27));
				border: 1px solid var(--btn-secondary-border, var(--stroke, #262a33));
				color: var(--btn-secondary-fg, var(--ink, #e8ebf2));
			}
			.btn.secondary:hover:not(:disabled) {
				background: var(--btn-secondary-bg-hover, rgba(255, 255, 255, 0.12));
			}
			.btn.secondary:active:not(:disabled) {
				background: var(--btn-secondary-bg-active, rgba(255, 255, 255, 0.16));
			}
			.status {
				margin-top: 0.85rem;
				font-size: 0.88rem;
				line-height: 1.45;
				min-height: 1.2em;
			}
			.status.err {
				color: var(--danger, #ff8a8a);
			}
			.status.ok {
				color: var(--success, #6ee7a8);
			}
			.status.work {
				color: var(--ink-dim, #9aa3b2);
			}
			.manual {
				margin-top: 1.1rem;
				border-top: 1px solid var(--stroke, #262a33);
				padding-top: 0.9rem;
			}
			.manual summary {
				cursor: pointer;
				font-size: 0.85rem;
				color: var(--ink-dim, #9aa3b2);
			}
			.addr {
				font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
				font-size: 0.8rem;
				word-break: break-all;
				background: var(--surface-2, #1c1f27);
				border: 1px solid var(--stroke, #262a33);
				border-radius: 8px;
				padding: 0.55rem 0.7rem;
				margin: 0.6rem 0;
			}
			.manual input {
				width: 100%;
				background: var(--surface-2, #1c1f27);
				border: 1px solid var(--stroke, #262a33);
				border-radius: 8px;
				color: var(--ink, #e8ebf2);
				font: inherit;
				font-size: 0.85rem;
				padding: 0.5rem 0.7rem;
			}
			.buys {
				display: grid;
				gap: 0.5rem;
				margin-top: 0.4rem;
			}
			.buy-row {
				display: flex;
				align-items: baseline;
				justify-content: space-between;
				gap: 1rem;
				padding: 0.5rem 0;
				border-bottom: 1px dashed var(--stroke, #262a33);
			}
			.buy-row:last-child {
				border-bottom: 0;
			}
			.buy-row .label {
				color: var(--ink, #e8ebf2);
				font-size: 0.92rem;
			}
			.buy-row .price {
				font-weight: 700;
				font-variant-numeric: tabular-nums;
				white-space: nowrap;
			}
			.ledger {
				width: 100%;
				border-collapse: collapse;
				margin-top: 0.3rem;
			}
			.ledger th,
			.ledger td {
				text-align: left;
				padding: 0.55rem 0.5rem;
				font-size: 0.86rem;
				border-bottom: 1px solid var(--stroke, #262a33);
			}
			.ledger th {
				color: var(--ink-dim, #9aa3b2);
				font-weight: 600;
				font-size: 0.74rem;
				text-transform: uppercase;
				letter-spacing: 0.05em;
			}
			.ledger td.amt {
				text-align: right;
				font-variant-numeric: tabular-nums;
				font-weight: 600;
				white-space: nowrap;
			}
			.ledger td.amt.pos {
				color: var(--success, #6ee7a8);
			}
			.ledger td.amt.neg {
				color: var(--ink, #e8ebf2);
			}
			.ledger a {
				color: var(--accent, #6c8cff);
			}
			.muted {
				color: var(--ink-dim, #9aa3b2);
			}
			.empty {
				padding: 1.4rem 0;
				color: var(--ink-dim, #9aa3b2);
				text-align: center;
				font-size: 0.9rem;
			}
			.signin {
				text-align: center;
				padding: 3rem 1rem;
			}
			.signin a {
				color: var(--accent, #6c8cff);
				font-weight: 600;
			}
			.skel {
				background: linear-gradient(
					90deg,
					var(--surface-2, #1c1f27) 25%,
					var(--surface-1, #14161c) 50%,
					var(--surface-2, #1c1f27) 75%
				);
				background-size: 200% 100%;
				animation: sk 1.2s infinite;
				border-radius: 8px;
			}
			@keyframes sk {
				from {
					background-position: 200% 0;
				}
				to {
					background-position: -200% 0;
				}
			}
			.row-2 {
				display: grid;
				grid-template-columns: 1fr 1fr;
				gap: 1.1rem;
				margin-top: 1.1rem;
			}
			@media (max-width: 820px) {
				.row-2 {
					grid-template-columns: 1fr;
				}
			}
			/* Wide content scrolls inside its own box so the page itself never
			   scrolls sideways on a phone. */
			.ledger-scroll {
				overflow-x: auto;
				-webkit-overflow-scrolling: touch;
			}
			.ledger {
				min-width: 22rem;
			}
			.addr-row {
				display: flex;
				align-items: stretch;
				gap: 0.4rem;
				margin: 0.6rem 0;
			}
			.addr-row .addr {
				flex: 1;
				min-width: 0;
				margin: 0;
			}
			.copy-addr {
				appearance: none;
				flex: 0 0 auto;
				border: 1px solid var(--stroke, #262a33);
				background: var(--surface-2, #1c1f27);
				color: var(--ink-dim, #9aa3b2);
				border-radius: 8px;
				padding: 0 0.7rem;
				font: inherit;
				font-size: 0.78rem;
				font-weight: 600;
				cursor: pointer;
				transition:
					color var(--duration-fast),
					border-color var(--duration-fast);
			}
			.copy-addr:hover:not(:disabled) {
				color: var(--ink, #e8ebf2);
				border-color: var(--accent, #6c8cff);
			}
			.copy-addr:disabled {
				opacity: var(--disabled-opacity, 0.4);
				cursor: var(--disabled-cursor, not-allowed);
			}
			/* Error state: a designed, actionable card. Before this existed a failed
			   /api/credits hid every panel and left the page blank below the h1. */
			.state-msg {
				text-align: center;
				padding: 2.25rem 1.25rem;
			}
			.state-msg h2 {
				text-transform: none;
				letter-spacing: -0.01em;
				font-size: 1.05rem;
				color: var(--ink, #e8ebf2);
				margin: 0 0 0.4rem;
			}
			.state-msg p {
				margin: 0 auto;
				max-width: 44ch;
				color: var(--ink-dim, #9aa3b2);
				font-size: 0.9rem;
				line-height: 1.5;
			}
			.state-msg .btn {
				max-width: 16rem;
				margin-left: auto;
				margin-right: auto;
			}
			.state-links {
				margin-top: 0.9rem;
				font-size: 0.85rem;
			}
			.state-links a {
				color: var(--accent, #6c8cff);
				font-weight: 600;
			}
			/* Keyboard users get the same affordance as the pointer hover states
			   above; tokens are the site-wide focus ring. */
			.seg button:focus-visible,
			.quick button:focus-visible,
			.btn:focus-visible,
			.copy-addr:focus-visible,
			.manual summary:focus-visible,
			.amt-row input:focus-visible,
			.manual input:focus-visible,
			.ledger a:focus-visible,
			.signin a:focus-visible,
			.state-links a:focus-visible {
				outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, #6c8cff);
				outline-offset: var(--focus-ring-offset, 2px);
			}
			.amt-row input:focus,
			.manual input:focus {
				border-color: var(--accent, #6c8cff);
			}
			.is-busy::after {
				content: '\2026';
			}
			@media (prefers-reduced-motion: reduce) {
				.skel {
					animation: none;
				}
			}
			:root[data-theme='light'] .status.ok,
			:root[data-theme='light'] .ledger td.amt.pos {
				color: #15803d;
			}
			:root[data-theme='light'] .status.err {
				color: #b91c1c;
			}
			[hidden] {
				display: none !important;
			}
		</style>

		<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
		<meta property="og:type" content="website" />
		<meta property="og:site_name" content="three.ws" />
		<meta property="og:locale" content="en_US" />
		<meta property="og:image:alt" content="Credits, three.ws" />
		<meta name="twitter:site" content="@trythreews" />
		<meta
			name="twitter:title"
			content="Credits · three.ws"
			data-i18n-attr="content:credits.meta_twitter_title"
		/>
		<meta
			name="twitter:description"
			content="Top up with SOL or $THREE and spend credits on 3D generation, agents, and compute. Hold $THREE for up to 30% off every spend."
			data-i18n-attr="content:credits.meta_twitter_description"
		/>
		<meta
			name="twitter:image"
			content="https://three.ws/api/page-og?s=account&amp;t=Credits&amp;d=Top+up+with+SOL+or+%24THREE+and+spend+credits+on+3D+generation%2C+agents%2C+and+compute.+Hold+%24THREE+for+up+to+30%25+off+every+spend.&amp;p=%2Fcredits"
		/>
		<script type="application/ld+json">
			{
				"@context": "https://schema.org",
				"@graph": [
					{
						"@type": "WebPage",
						"name": "Credits",
						"description": "Top up with SOL or $THREE and spend credits on 3D generation, agents, and compute. Hold $THREE for up to 30% off every spend.",
						"url": "https://three.ws/credits",
						"isPartOf": {
							"@type": "WebSite",
							"name": "three.ws",
							"url": "https://three.ws"
						},
						"primaryImageOfPage": "https://three.ws/api/page-og?s=account&t=Credits&d=Top+up+with+SOL+or+%24THREE+and+spend+credits+on+3D+generation%2C+agents%2C+and+compute.+Hold+%24THREE+for+up+to+30%25+off+every+spend.&p=%2Fcredits"
					}
				]
			}
		</script>
	</head>
	<body>
		<a href="#main-content" class="h-skip-link" data-i18n="credits.skip_to_main_content"
			>Skip to main content</a
		>
		<header><div id="nav-container"></div></header>
		<script src="/nav.js"></script>

		<main id="main-content" class="credits-wrap">
			<div class="credits-head">
				<div>
					<h1 data-i18n="credits.credits">Credits</h1>
					<p data-i18n="credits.top_up_with_sol_or_three_and">
						Top up with SOL or $THREE and spend credits on 3D generation, agents, and
						compute. Hold $THREE for up to 30% off every spend.
					</p>
				</div>
			</div>

			<!-- Load failure: designed + actionable, with a real retry -->
			<section id="error-state" class="card state-msg" hidden>
				<h2 data-i18n="credits.we_could_not_load_your_credits">
					We could not load your credits
				</h2>
				<p id="error-msg" data-i18n="credits.the_credits_service_did_not_respond">
					The credits service did not respond. Your balance and history are safe; this
					page just could not read them.
				</p>
				<button class="btn" id="retry-btn" type="button" data-i18n="credits.try_again">
					Try again
				</button>
				<p class="state-links">
					<a href="/status" data-i18n="credits.check_platform_status"
						>Check platform status</a
					>
				</p>
			</section>

			<!-- Signed-out -->
			<section id="signin-state" class="card signin" hidden>
				<p data-i18n="credits.sign_in_to_view_your_balance_and">
					Sign in to view your balance and top up.
				</p>
				<p data-i18n-html="credits.sign_in"><a href="/login?next=/credits">Sign in →</a></p>
			</section>

			<!-- Signed-in -->
			<div id="app-state" hidden>
				<div class="credits-grid">
					<!-- Balance -->
					<section class="card" aria-label="Your balance">
						<h2 data-i18n="credits.balance">Balance</h2>
						<div class="balance-amount" id="balance">$0.00</div>
						<div class="balance-sub">
							<div>
								<span class="k" data-i18n="credits.deposited">Deposited</span
								><span class="v" id="lifetime-dep">$0.00</span>
							</div>
							<div>
								<span class="k" data-i18n="credits.spent">Spent</span
								><span class="v" id="lifetime-spent">$0.00</span>
							</div>
						</div>
						<div class="tier-pill" id="tier-pill" hidden></div>
						<div class="row-2" style="margin-top: 1.2rem">
							<div>
								<h2 data-i18n="credits.what_credits_buy">What credits buy</h2>
								<div class="buys" id="buys"></div>
								<div
									class="muted"
									id="buys-empty"
									style="font-size: 0.85rem"
									hidden
									data-i18n="credits.pricing_is_unavailable_right_now"
								>
									Pricing is unavailable right now. Deposits still credit at the
									live USD value.
								</div>
							</div>
						</div>
					</section>

					<!-- Deposit -->
					<section class="card" aria-label="Add credits">
						<h2 data-i18n="credits.add_credits">Add credits</h2>
						<div class="seg" role="group" aria-label="Deposit asset" id="asset-seg">
							<button type="button" data-asset="SOL" aria-pressed="true">SOL</button>
						</div>
						<ul class="rates" id="asset-rates" aria-label="Accepted assets and rates"></ul>
						<div class="field">
							<label for="amount" id="amount-label">Amount (SOL)</label>
							<div class="amt-row">
								<input
									id="amount"
									type="number"
									min="0"
									step="0.001"
									inputmode="decimal"
									placeholder="0.0"
									aria-describedby="estimate"
								/>
								<span class="unit" id="amount-unit">SOL</span>
							</div>
							<div class="quick" id="quick"></div>
							<div class="est" id="estimate"></div>
						</div>
						<button
							class="btn"
							id="deposit-btn"
							type="button"
							data-i18n="credits.connect_wallet_deposit"
						>
							Connect wallet &amp; deposit
						</button>
						<div class="status" id="status" role="status" aria-live="polite"></div>

						<details class="manual">
							<summary
								data-i18n="credits.already_sent_it_yourself_verify_by_signature"
							>
								Already sent it yourself? Verify by signature
							</summary>
							<p
								class="muted"
								style="font-size: 0.82rem; margin: 0.6rem 0 0.3rem"
								data-i18n="credits.send_from_a_wallet_linked_to_your"
							>
								Send from a wallet linked to your account to this three.ws deposit
								address, then paste the signature:
							</p>
							<div class="addr-row">
								<div
									class="addr"
									id="deposit-addr"
									data-i18n="credits.loading_deposit_address"
								>
									Loading the deposit address
								</div>
								<button
									class="copy-addr"
									id="copy-addr"
									type="button"
									disabled
									data-i18n="credits.copy"
								>
									Copy
								</button>
							</div>
							<label for="manual-sig" data-i18n="credits.transaction_signature"
								>Transaction signature</label
							>
							<input
								id="manual-sig"
								type="text"
								autocomplete="off"
								spellcheck="false"
								placeholder="Paste transaction signature"
							/>
							<button
								class="btn secondary"
								id="verify-btn"
								type="button"
								style="margin-top: 0.6rem"
								data-i18n="credits.verify_deposit"
							>
								Verify deposit
							</button>
							<p
								class="muted"
								style="font-size: 0.76rem; margin: 0.5rem 0 0"
								data-i18n="credits.we_verify_on_chain_that_the_transaction"
							>
								We verify on-chain that the transaction was signed by your linked
								wallet, so only you can claim your deposit. Pasting someone else's
								signature won't credit your balance. Sent from a wallet that isn't
								linked yet? Sign in with it or link it first.
							</p>
						</details>
					</section>
				</div>

				<!-- Ledger -->
				<section class="card" style="margin-top: 1.1rem" aria-label="History">
					<h2 data-i18n="credits.history">History</h2>
					<div id="ledger-host">
						<div class="ledger-scroll">
							<table class="ledger" id="ledger" hidden>
								<thead>
									<tr>
										<th data-i18n="credits.when">When</th>
										<th data-i18n="credits.activity">Activity</th>
										<th style="text-align: right" data-i18n="credits.amount">
											Amount
										</th>
										<th style="text-align: right" data-i18n="credits.balance_2">
											Balance
										</th>
									</tr>
								</thead>
								<tbody id="ledger-body"></tbody>
							</table>
						</div>
						<div
							class="empty"
							id="ledger-empty"
							hidden
							data-i18n="credits.no_activity_yet_add_credits_to_get"
						>
							No activity yet. Add credits above and every deposit, spend, and refund
							shows up here.
						</div>
						<button class="btn secondary" id="ledger-more" type="button" hidden>
							<span data-i18n="credits.load_older">Load older activity</span>
						</button>
						<p
							class="empty"
							id="ledger-error"
							role="alert"
							hidden
							style="padding-top: 0.6rem"
							data-i18n="credits.older_activity_did_not_load_try_again"
						>
							Older activity did not load. Try the button again.
						</p>
					</div>
				</section>
			</div>

			<!-- Initial loading -->
			<div id="loading-state">
				<div class="credits-grid">
					<div class="card"><div class="skel" style="height: 120px"></div></div>
					<div class="card"><div class="skel" style="height: 220px"></div></div>
				</div>
			</div>
		</main>

		<script src="/brand.js" defer></script>
		<div id="footer-container"></div>
		<script src="/footer.js"></script>
		<script type="module" src="/src/credits.js"></script>
		<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
		<script type="module" src="/i18n.js"></script>
	</body>
</html>