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

html,
body,
#root {
	height: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-ui);
	font-size: 14px;
	line-height: 1.45;
	font-feature-settings: 'cv11', 'ss01';
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p {
	margin: 0;
}

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

button {
	font: inherit;
	color: inherit;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
}

button:disabled {
	cursor: default;
	opacity: 0.45;
}

input,
select,
textarea {
	font: inherit;
	color: var(--ink);
}

input[type='range'] {
	accent-color: var(--accent);
}

::selection {
	background: var(--accent-dim);
}

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

svg {
	display: inline-block;
	vertical-align: middle;
	flex: none;
}

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

/* ---------- typography ---------- */

.num {
	font-variant-numeric: tabular-nums;
}

.mono {
	font-family: var(--font-mono);
	font-size: 12px;
}

.hash {
	font-family: var(--font-mono);
	font-size: 11.5px;
	color: var(--ink-2);
	overflow-wrap: anywhere;
	word-break: break-all;
}

/* A hash that copies itself on tap; looks like text until hovered. */
button.hash.copy {
	background: none;
	border: 0;
	padding: 0;
	text-align: inherit;
	cursor: copy;
	border-bottom: 1px dotted transparent;
}

button.hash.copy:hover {
	color: var(--ink-2);
	border-bottom-color: var(--ink-3);
}

/* Section and card titles: sentence case, ink, semibold. Hierarchy comes from size, not shouting. */
.caps {
	font-size: 13px;
	letter-spacing: -0.005em;
	color: var(--ink);
	font-weight: 600;
}

.muted {
	color: var(--ink-2);
}

.faint {
	color: var(--ink-3);
}

.display {
	font-family: var(--font-num);
	font-weight: 650;
	letter-spacing: -0.035em;
	line-height: 1;
	color: var(--display);
}
:root[data-numbers='serif'] .display {
	font-weight: 500;
	letter-spacing: -0.01em;
	font-variation-settings: 'opsz' 96;
}
:root[data-numbers='tight'] .display {
	letter-spacing: -0.04em;
}

.display .dec {
	color: var(--ink-2);
}

.note {
	font-size: 12.5px;
	color: var(--ink-2);
	line-height: 1.5;
}

/* ---------- money states ---------- */

.st-settled {
	color: var(--coll);
}
.st-inflight {
	color: var(--hold);
}
.st-pending {
	color: var(--debt);
}
.st-neutral {
	color: var(--ink-2);
}
.st-dispute {
	color: var(--dispute);
}

.state {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	font-weight: 500;
	white-space: nowrap;
}

.state::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex: none;
}

@keyframes pulse {
	50% {
		opacity: 0.35;
	}
}

.state.st-inflight::before {
	animation: pulse 1.4s ease-in-out infinite;
}

@keyframes fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}

.fade-in {
	animation: fade-in var(--dur-slow) var(--ease);
}

/* Native disclosure keeps detail keyboard-accessible without hidden UI state. */
.disclosure {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.disclosure > summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 5px 0;
}
.disclosure[open] > summary {
  margin-bottom: 10px;
  color: var(--ink);
}
.disclosure .kv {
  gap: 16px;
  align-items: start;
}
.disclosure .kv .hash {
  min-width: 0;
  text-align: right;
}
.disclosure > .note {
  margin: 10px 0;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 12px;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
