/* Plain, accessible defaults. The product's design tokens can replace these later. */
:root {
	color-scheme: light dark;
	--text: #1b1d21;
	--muted: #5b616b;
	--surface: #ffffff;
	--page: #f5f6f8;
	--line: #d9dce1;
	--accent: #3b5bdb;
	--accent-text: #ffffff;
	--danger: #c92a2a;
	--warning: #fff4e6;
	--notice: #e7f5ff;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
	:root {
		--text: #e9ecef;
		--muted: #adb5bd;
		--surface: #1e2126;
		--page: #15171a;
		--line: #343a40;
		--accent: #748ffc;
		--accent-text: #0b0d10;
		--danger: #ff8787;
		--warning: #3d2e14;
		--notice: #13304a;
	}
}

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
}

.skip {
	position: absolute;
	left: -999px;
}

.skip:focus {
	left: 1rem;
	top: 1rem;
	background: var(--surface);
	padding: 0.5rem;
}

.top, .foot, .sections, main {
	max-width: 44rem;
	margin: 0 auto;
	padding: 0 1rem;
}

.top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.brand {
	font-weight: 700;
	color: var(--text);
	text-decoration: none;
}

.sections {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--line);
}

.sections a[aria-current="page"] {
	font-weight: 700;
	text-decoration: none;
}

.foot {
	color: var(--muted);
	font-size: 0.875rem;
	padding-top: 2rem;
	padding-bottom: 2rem;
}

a {
	color: var(--accent);
}

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin: 1rem 0;
}

.stack {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-width: 28rem;
	margin: 1rem 0;
}

.row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	justify-content: space-between;
}

.inline {
	display: inline;
}

label {
	font-weight: 600;
}

label.check {
	font-weight: 400;
	display: flex;
	gap: 0.5rem;
	align-items: flex-start;
}

input:not([type="checkbox"]):not([type="hidden"]) {
	font: inherit;
	padding: 0.5rem 0.625rem;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--surface);
	color: var(--text);
}

button, .button {
	font: inherit;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

button.primary, .button.primary {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--accent-text);
}

button.danger, .button.danger {
	border-color: var(--danger);
	color: var(--danger);
}

button.link {
	border: none;
	background: none;
	padding: 0;
	color: var(--accent);
	text-decoration: underline;
}

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

.hint {
	color: var(--muted);
	font-size: 0.9rem;
}

.errors, .error {
	color: var(--danger);
}

.errors:empty {
	display: none;
}

.notice {
	background: var(--notice);
	padding: 0.75rem 1rem;
	border-radius: 6px;
}

.warning {
	background: var(--warning);
	padding: 0.75rem 1rem;
	border-radius: 6px;
}

ul.plain {
	list-style: none;
	padding: 0;
}

ul.plain li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--line);
}

ul.codes {
	columns: 2;
	font-family: ui-monospace, monospace;
}

.facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.25rem 1rem;
}

.facts dd {
	margin: 0;
}

.avatar {
	border-radius: 50%;
	object-fit: cover;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* The message-me link's QR code, white behind it in either theme so it always scans. */
.qr {
	margin: 0.75rem 0;
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.qr img {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 4px;
}

.qr figcaption {
	color: var(--muted);
	font-size: 0.875rem;
}

/* The full message-me link wraps rather than running off a phone's screen. */
.long-link {
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* A two-step confirm with no script, the action's button only shows once its summary is opened. */
details.confirm {
	display: inline-block;
	margin: 0.25rem 0;
}

details.confirm > summary {
	list-style: none;
}

details.confirm > summary::-webkit-details-marker {
	display: none;
}

details.confirm > summary.link {
	color: var(--accent);
	text-decoration: underline;
	cursor: pointer;
}

details.confirm[open] {
	display: block;
}

details.confirm[open] > summary.button {
	border-color: var(--line);
	color: var(--muted);
}

.confirm-body {
	margin: 0.5rem 0 0;
	padding: 0.75rem 1rem;
	border: 1px solid var(--danger);
	border-radius: 6px;
	background: var(--surface);
}

.confirm-body p {
	margin: 0 0 0.75rem;
}

.confirm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

/* /continue, the short stop between a sign-in form and the next address. */
main.continue {
	padding-top: 3rem;
}

main.continue h1 {
	margin-top: 0;
}
