@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&display=swap");
@import url("tokens.css");

/* Escala M3 (Type.kt) — tamanhos em rem (16px = 1rem, 1sp ≈ 1px) */
:root {
	--tm-font-sans: "DM Sans", system-ui, "Segoe UI", Roboto, sans-serif;
	--tm-type-display-large-size: 3.5625rem;
	--tm-type-display-large-lh: 4rem;
	--tm-type-display-large-track: -0.015625rem;
	--tm-type-display-medium-size: 2.8125rem;
	--tm-type-display-medium-lh: 3.25rem;
	--tm-type-headline-small-size: 1.5rem;
	--tm-type-headline-small-lh: 2rem;
	--tm-type-title-large-size: 1.375rem;
	--tm-type-title-large-lh: 1.75rem;
	--tm-type-title-medium-size: 1rem;
	--tm-type-title-medium-lh: 1.5rem;
	--tm-type-title-medium-track: 0.009375rem;
	--tm-type-title-small-size: 0.875rem;
	--tm-type-title-small-lh: 1.25rem;
	--tm-type-body-large-size: 1rem;
	--tm-type-body-large-lh: 1.5rem;
	--tm-type-body-medium-size: 0.875rem;
	--tm-type-body-medium-lh: 1.25rem;
	--tm-type-body-small-size: 0.75rem;
	--tm-type-body-small-lh: 1rem;
	--tm-type-label-medium-size: 0.75rem;
	--tm-type-label-medium-lh: 1rem;
	--tm-type-label-small-size: 0.6875rem;
	--tm-type-label-small-lh: 1rem;
	/* Painel de tema: páginas sem bottom nav (home, conta, Mind, …) */
	--tm-theme-panel-bottom: max(var(--tm-space-xs), env(safe-area-inset-bottom, 0px));

	font-family: var(--tm-font-sans);
	line-height: 1.5;
}

body {
	margin: 0;
	background: var(--tm-bg);
	color: var(--tm-on-surface);
	font-family: var(--tm-font-sans);
	font-size: var(--tm-type-body-large-size);
	line-height: var(--tm-type-body-large-lh);
}

.wrap {
	max-width: 40rem;
	margin: 0 auto;
	padding: var(--tm-space-xl) var(--tm-space-md);
}

h1 {
	font-size: var(--tm-type-title-large-size);
	line-height: var(--tm-type-title-large-lh);
	font-weight: 600;
	margin: 0 0 var(--tm-space-xs);
	letter-spacing: 0;
}

.lead {
	margin: 0 0 var(--tm-space-lg);
	color: var(--tm-on-surface-muted);
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
}

.card {
	background: var(--tm-surface-variant);
	border-radius: var(--tm-radius-card);
	padding: var(--tm-space-lg);
	border: 1px solid var(--tm-outline);
	box-shadow: var(--tm-elev-1);
}

.card h2 {
	margin: 0 0 var(--tm-space-sm);
	font-size: var(--tm-type-title-medium-size);
	line-height: var(--tm-type-title-medium-lh);
	font-weight: 600;
	letter-spacing: var(--tm-type-title-medium-track);
}

.btn {
	cursor: pointer;
	border: none;
	border-radius: var(--tm-radius-btn);
	padding: var(--tm-space-xs) var(--tm-space-md);
	font-size: var(--tm-type-body-large-size);
	font-weight: 600;
	font-family: inherit;
	background: var(--tm-primary);
	color: var(--tm-on-primary);
	box-shadow: var(--tm-elev-1);
}

.btn:hover {
	filter: brightness(1.08);
}

.clock {
	margin-top: var(--tm-space-md);
	min-height: 1.5rem;
}

.time {
	font-variant-numeric: tabular-nums;
	font-family: ui-monospace, monospace;
}

/* —— Landing / (home.templ) —— */
.home-topbar {
	display: flex;
	align-items: center;
	gap: var(--tm-space-sm);
	min-height: 3.25rem;
	padding: var(--tm-space-xs) max(var(--tm-space-md), env(safe-area-inset-right, 0px)) var(--tm-space-xs) max(var(--tm-space-md), env(safe-area-inset-left, 0px));
	box-sizing: border-box;
	border-bottom: 1px solid transparent;
	transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.home-topbar--sticky {
	position: sticky;
	top: 0;
	z-index: 50;
}

.home-topbar--scrolled {
	border-bottom-color: var(--tm-outline-variant);
	background: color-mix(in srgb, var(--tm-bg) 85%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.home-topbar__actions {
	display: flex;
	align-items: center;
	gap: var(--tm-space-sm);
	margin-left: auto;
}

.home-topbar__auth {
	display: flex;
	align-items: center;
	gap: var(--tm-space-sm);
}

.home-topbar__link {
	color: var(--tm-on-surface-muted);
	font-size: var(--tm-type-body-medium-size);
	font-weight: 500;
	text-decoration: none;
	background: none;
	border: none;
	font-family: inherit;
	cursor: pointer;
	padding: 0;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.home-topbar__link:hover {
	color: var(--tm-on-surface);
}

.home-topbar__link--logout {
	font-size: var(--tm-type-body-small-size);
}

.home-topbar__btn-pill {
	min-height: 2.125rem;
	padding: var(--tm-space-xxs) var(--tm-space-md);
	font-size: var(--tm-type-body-medium-size);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	border-radius: var(--tm-radius-pill);
}

.home-topbar__email {
	max-width: 9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: var(--tm-type-body-small-size);
	color: var(--tm-on-surface-muted);
	font-weight: 500;
}

.home-topbar__avatar {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 50%;
	background: var(--tm-primary-container);
	color: var(--tm-on-primary-container);
	font-size: var(--tm-type-label-small-size);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	text-transform: uppercase;
	line-height: 1;
}

.home-topbar__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.125rem;
	height: 2.125rem;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--tm-outline-variant);
	background: transparent;
	color: var(--tm-on-surface-muted);
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.home-topbar__icon-btn:hover {
	background: var(--tm-surface-variant);
	color: var(--tm-on-surface);
}

.home-topbar__icon-btn svg {
	width: 1.125rem;
	height: 1.125rem;
	display: block;
}

.home-topbar__burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 2.125rem;
	height: 2.125rem;
	padding: 0;
	border: none;
	border-radius: var(--tm-shape-xs);
	background: transparent;
	color: var(--tm-on-surface);
	cursor: pointer;
}

.home-topbar__burger:hover {
	background: var(--tm-surface-variant);
}

@media (max-width: 52rem) {
	.home-topbar__burger {
		display: inline-flex;
	}

	.home-topbar__actions {
		display: none;
	}

	.home-topbar--open .home-topbar__actions {
		display: flex;
	}

	.home-topbar--open {
		flex-wrap: wrap;
	}

	.home-topbar--open .home-topbar__actions {
		order: 10;
		flex-basis: 100%;
		margin-left: 0;
		padding-top: var(--tm-space-sm);
		padding-bottom: var(--tm-space-sm);
	}

	.home-topbar--open .home-menu {
		width: 100%;
	}

	.home-topbar--open .home-menu__trigger,
	.home-topbar--open .home-topbar__account-trigger {
		width: 100%;
		justify-content: space-between;
	}

	.home-topbar--open .home-menu__panel {
		position: static;
		box-shadow: none;
		border: none;
		padding: 0 0 0 var(--tm-space-sm);
		margin-top: var(--tm-space-xxs);
		min-width: 0;
	}

	.home-topbar--open .home-menu__panel[hidden] {
		display: none !important;
	}
}

/* LP auth: estado síncrono antes do JS (home-auth-bootstrap.js) */
html:not([data-home-auth]) .home-topbar__auth {
	visibility: hidden;
}

html[data-home-auth="session"] #home-nav-guest-actions,
html[data-home-auth="guest"] #home-nav-session-actions {
	display: none !important;
}

html[data-home-auth="session"] #home-nav-session-actions,
html[data-home-auth="guest"] #home-nav-guest-actions {
	display: flex !important;
	align-items: center;
}

html[data-home-auth="session"] #home-footer-account {
	display: none !important;
}

html[data-home-auth="session"] #home-hero-guest,
html[data-home-auth="guest"] #home-hero-logged {
	display: none !important;
}

html[data-home-auth="session"] #home-hero-logged,
html[data-home-auth="guest"] #home-hero-guest {
	display: block !important;
}

html[data-home-auth="session"] #home-sticky-guest {
	display: none !important;
}

.home-skip {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: 300;
	padding: var(--tm-space-sm) var(--tm-space-md);
	background: var(--tm-surface-elevated);
	color: var(--tm-on-surface);
	font-weight: 600;
	text-decoration: none;
	border-radius: var(--tm-shape-xs);
}

.home-skip:focus {
	left: var(--tm-space-sm);
	top: var(--tm-space-sm);
	width: auto;
	height: auto;
}

.home-hero-wrap {
	margin-bottom: 0;
	padding-bottom: var(--tm-space-lg);
}

.home-hero__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tm-space-xl);
	align-items: center;
}

@media (min-width: 52rem) {
	.home-hero__layout {
		grid-template-columns: 1fr minmax(14rem, 22rem);
		gap: var(--tm-space-xxl);
	}

	.home-hero__copy {
		text-align: left;
		align-items: flex-start;
	}

	.home-hero__lead {
		text-align: left;
	}

	.home-cta-row {
		justify-content: flex-start;
	}

	.home-cta-hint {
		text-align: left;
	}
}

.home-hero__copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.home-hero__visual {
	display: flex;
	justify-content: center;
}

.home-device {
	width: min(100%, 16rem);
	aspect-ratio: 9 / 18;
	border-radius: 1.75rem;
	padding: 0.65rem;
	background: linear-gradient(145deg, var(--tm-outline-variant), var(--tm-surface));
	box-shadow: var(--tm-elev-3);
	border: 2px solid color-mix(in srgb, var(--tm-primary) 25%, var(--tm-outline));
}

.home-device__screen {
	height: 100%;
	border-radius: 1.25rem;
	background: var(--tm-surface);
	padding: var(--tm-space-md);
	display: flex;
	flex-direction: column;
	gap: var(--tm-space-sm);
}

.home-device__chip {
	height: 2.5rem;
	border-radius: var(--tm-shape-sm);
}

.home-device__chip--quick {
	background: linear-gradient(90deg, var(--tm-primary-container), transparent);
}

.home-device__chip--list {
	background: linear-gradient(90deg, color-mix(in srgb, var(--tm-primary) 40%, transparent), transparent);
	flex: 1;
}

.home-device__chip--mind {
	background: linear-gradient(90deg, var(--tm-secondary-container, var(--tm-primary-container)), transparent);
	min-height: 3rem;
}

.home-device__chip--reminder {
	background: linear-gradient(90deg, color-mix(in srgb, var(--tm-tertiary, #f59e0b) 35%, transparent), transparent);
	flex: 1;
}

.home-trust {
	list-style: none;
	margin: 0 auto var(--tm-space-xl);
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--tm-space-md) var(--tm-space-xl);
	max-width: 44rem;
}

.home-trust__item {
	display: inline-flex;
	align-items: center;
	gap: var(--tm-space-xs);
	font-size: var(--tm-type-body-small-size);
	font-weight: 600;
	color: var(--tm-on-surface-muted);
}

.home-trust__icon {
	font-size: 1.125rem;
	line-height: 1;
}

.home-hero__shortcuts {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--tm-space-xs);
	margin-top: var(--tm-space-md);
}

.home-module-card__bullets {
	list-style: none;
	margin: var(--tm-space-md) 0 0;
	padding: 0;
	text-align: left;
	width: 100%;
}

.home-module-card__bullets li {
	position: relative;
	padding-left: 1.25rem;
	margin-bottom: var(--tm-space-xxs);
	font-size: var(--tm-type-body-small-size);
	color: var(--tm-on-surface-muted);
	line-height: 1.45;
}

.home-module-card__bullets li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 0.4rem;
	height: 0.4rem;
	border-radius: 50%;
	background: var(--tm-primary);
}

.home-final {
	padding: var(--tm-space-xxxl) 0;
}

.home-final__inner {
	max-width: 40rem;
	margin: 0 auto;
	padding: var(--tm-space-xl) var(--tm-space-lg);
	text-align: center;
}

.home-final__title {
	margin: 0 0 var(--tm-space-xs);
	font-size: var(--tm-type-headline-small-size);
	font-weight: 700;
	color: var(--tm-on-background);
}

.home-final__lead {
	margin: 0 0 var(--tm-space-lg);
	font-size: var(--tm-type-body-medium-size);
	color: var(--tm-on-surface-muted);
}

.home-sticky-cta {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100;
	padding: var(--tm-space-sm) var(--tm-space-md);
	padding-bottom: max(var(--tm-space-sm), env(safe-area-inset-bottom, 0px));
	background: color-mix(in srgb, var(--tm-bg) 92%, transparent);
	border-top: 1px solid var(--tm-outline-variant);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	gap: var(--tm-space-sm);
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
}

html[data-home-auth="guest"] .home-sticky-cta {
	display: flex;
}

html[data-home-auth="guest"] .home-shell {
	padding-bottom: calc(var(--tm-space-xxl) + 4rem);
}

@media (min-width: 40rem) {
	html[data-home-auth="guest"] .home-shell {
		padding-bottom: var(--tm-space-xxl);
	}
}

@media (min-width: 40rem) {
	.home-sticky-cta {
		display: none !important;
	}
}

body.home-body .tm-theme-panel {
	display: none !important;
}

.tm-theme-popover {
	position: fixed;
	z-index: 220;
	min-width: 14rem;
	max-width: min(20rem, calc(100vw - 2rem));
	padding: var(--tm-space-sm);
	border-radius: var(--tm-shape-sm);
	background: var(--tm-surface-elevated);
	border: 1px solid var(--tm-outline-variant);
	box-shadow: var(--tm-elev-3);
}

.tm-theme-popover[hidden] {
	display: none !important;
}

.tm-theme-popover--quick {
	z-index: 400;
	border-radius: 1rem;
	background: rgba(12, 20, 36, 0.94);
	backdrop-filter: blur(16px);
	border-color: rgba(96, 165, 250, 0.22);
	box-shadow:
		0 12px 40px rgba(0, 0, 0, 0.45),
		0 0 32px rgba(59, 130, 246, 0.12);
}

.tm-theme-popover__backdrop:has(+ .tm-theme-popover--quick),
body:has(.tm-theme-popover--quick:not([hidden])) .tm-theme-popover__backdrop {
	background: rgba(3, 5, 8, 0.35);
}

.tm-theme-popover__backdrop {
	position: fixed;
	inset: 0;
	z-index: 219;
	background: transparent;
}

.tm-theme-popover__backdrop[hidden] {
	display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
	.home-section--modules,
	.home-section--steps,
	.home-final {
		animation: home-fade-in 0.5s ease both;
	}
}

@keyframes home-fade-in {
	from {
		opacity: 0;
		transform: translateY(0.75rem);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.home-hero__copy--center {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.home-hero__badge {
	display: inline-block;
	font-size: var(--tm-type-label-medium-size);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tm-primary);
	margin-bottom: var(--tm-space-md);
}

.home-hero__title--large {
	max-width: 44rem;
}

.home-hero__lead--center {
	text-align: center;
	max-width: 34rem;
	font-size: 1.125rem;
	line-height: 1.6;
}

.home-cta-row--center {
	justify-content: center;
}

.home-cta-hint--center {
	text-align: center;
}

.home-cta-hint--center a {
	color: var(--tm-link);
	font-weight: 600;
	text-decoration: none;
}

.home-cta-hint--center a:hover {
	text-decoration: underline;
}

.home-cta-primary--lg,
.home-cta-secondary--lg {
	min-height: 3rem;
	padding-left: var(--tm-space-xl);
	padding-right: var(--tm-space-xl);
	font-size: var(--tm-type-body-large-size);
	border-radius: var(--tm-radius-pill);
}

.home-section--modules,
.home-section--steps {
	text-align: center;
}

.home-section__title--center {
	text-align: center;
}

.home-section__intro--center {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.home-module-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tm-space-md);
}

@media (min-width: 40rem) {
	.home-module-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.home-module-card {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	text-align: center;
	padding: var(--tm-space-xl) var(--tm-space-lg);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.home-module-card:hover {
	border-color: color-mix(in srgb, var(--tm-primary) 40%, var(--tm-outline));
	box-shadow: var(--tm-elev-2);
	transform: translateY(-3px);
}

.home-module-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: var(--tm-radius-pill);
	background: var(--tm-primary-container);
	margin-bottom: var(--tm-space-md);
}

.home-module-card__icon svg {
	width: 1.5rem;
	height: 1.5rem;
}

.home-module-card__title {
	margin: 0 0 var(--tm-space-xs);
	font-size: var(--tm-type-title-large-size);
	font-weight: 700;
	color: var(--tm-on-background);
}

.home-module-card__text {
	margin: 0;
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
	color: var(--tm-on-surface-muted);
}

.home-topbar__brand {
	display: inline-flex;
	align-items: center;
	gap: var(--tm-space-xs);
	color: var(--tm-on-background);
	text-decoration: none;
	flex-shrink: 0;
}

.home-topbar__brand:hover {
	opacity: 0.85;
}

.home-topbar__icon {
	display: block;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: 50%;
	object-fit: cover;
}

.home-topbar__nav-row {
	display: flex;
	align-items: center;
	gap: var(--tm-space-xs);
	flex-wrap: wrap;
	justify-content: center;
}

.home-topbar__flyout-label {
	display: none;
	margin: 0;
	font-size: var(--tm-type-label-small-size);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--tm-on-surface-muted);
}

.home-menu {
	position: relative;
}

.home-menu__trigger,
.home-topbar__account-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: var(--tm-space-xxs) var(--tm-space-sm);
	border-radius: var(--tm-radius-pill);
	border: 1px solid var(--tm-outline-variant);
	background: transparent;
	color: var(--tm-on-surface-muted);
	font-family: inherit;
	font-size: var(--tm-type-body-medium-size);
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.home-menu__trigger:hover,
.home-topbar__account-trigger:hover {
	color: var(--tm-on-surface);
	background: var(--tm-surface-variant);
}

.home-menu__trigger[aria-expanded="true"],
.home-topbar__account-trigger[aria-expanded="true"] {
	color: var(--tm-on-surface);
	background: var(--tm-surface-variant);
	border-color: var(--tm-outline);
}

.home-menu__trigger:focus-visible,
.home-topbar__account-trigger:focus-visible {
	outline: 2px solid var(--tm-primary);
	outline-offset: 2px;
}

.home-menu__chevron {
	flex-shrink: 0;
	opacity: 0.75;
	transition: transform 0.15s ease;
}

.home-menu__trigger[aria-expanded="true"] .home-menu__chevron,
.home-topbar__account-trigger[aria-expanded="true"] .home-menu__chevron {
	transform: rotate(180deg);
}

.home-menu__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 80;
	min-width: 11rem;
	padding: var(--tm-space-xxs);
	border-radius: var(--tm-shape-sm);
	background: var(--tm-surface-elevated);
	border: 1px solid var(--tm-outline-variant);
	box-shadow: var(--tm-elev-3);
}

.home-menu__panel--align-end {
	left: auto;
	right: 0;
}

.home-menu__panel[hidden] {
	display: none !important;
}

.home-menu__header {
	margin: 0;
	padding: var(--tm-space-xs) var(--tm-space-sm);
	font-size: var(--tm-type-body-small-size);
	font-weight: 600;
	color: var(--tm-on-surface);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.home-menu__section {
	margin: var(--tm-space-xs) 0 0;
	padding: var(--tm-space-xs) var(--tm-space-sm) var(--tm-space-xxs);
	font-size: var(--tm-type-label-small-size);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tm-on-surface-dim);
}

.home-menu__sep {
	margin: var(--tm-space-xxs) 0;
	border: none;
	border-top: 1px solid var(--tm-outline-variant);
}

.home-menu__item {
	display: flex;
	align-items: center;
	gap: var(--tm-space-xs);
	width: 100%;
	padding: var(--tm-space-xs) var(--tm-space-sm);
	border: none;
	border-radius: var(--tm-shape-xs);
	background: transparent;
	color: var(--tm-on-surface);
	font-family: inherit;
	font-size: var(--tm-type-body-medium-size);
	font-weight: 500;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.home-menu__item:hover {
	background: var(--tm-surface-variant);
	color: var(--tm-on-surface);
}

.home-menu__item:focus-visible {
	outline: 2px solid var(--tm-primary);
	outline-offset: -2px;
}

.home-menu__item--danger {
	color: var(--tm-error, #b42318);
}

.home-menu__item--danger:hover {
	background: color-mix(in srgb, var(--tm-error, #b42318) 12%, transparent);
	color: var(--tm-error, #b42318);
}

.home-topbar__account-trigger .home-topbar__avatar {
	width: 1.5rem;
	height: 1.5rem;
}

.home-topbar__btn-pill--md {
	display: none;
}

@media (min-width: 48rem) {
	.home-topbar__btn-pill--md {
		display: inline-flex;
	}
}

.home-device__app-icon {
	display: block;
	width: 3rem;
	height: 3rem;
	margin: auto;
	border-radius: 22%;
	object-fit: cover;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.home-trust__icon-svg {
	display: block;
	width: 1.25rem;
	height: 1.25rem;
	color: var(--tm-primary);
}

.home-footer-legal summary {
	cursor: pointer;
	color: var(--tm-on-surface-muted);
	font-weight: 500;
}

.home-footer-legal__links {
	display: flex;
	flex-direction: column;
	gap: var(--tm-space-xxs);
	margin: var(--tm-space-xs) 0 0;
	padding: 0;
	list-style: none;
}

.home-footer-legal__links a {
	color: var(--tm-on-surface-muted);
	font-size: var(--tm-type-body-small-size);
	text-decoration: none;
}

.home-footer-legal__links a:hover {
	color: var(--tm-on-surface);
	text-decoration: underline;
}

.home-topbar__wordmark {
	font-weight: 700;
	font-size: var(--tm-type-title-large-size);
	letter-spacing: -0.02em;
}

.home-topbar__nav {
	display: flex;
	align-items: center;
	gap: var(--tm-space-lg);
}

.home-topbar__nav a {
	color: var(--tm-on-surface-muted);
	font-weight: 500;
	font-size: var(--tm-type-body-medium-size);
	text-decoration: none;
	transition: color 0.15s ease;
}

.home-topbar__nav a:hover {
	color: var(--tm-on-surface);
}

.home-topbar__nav--modules {
	gap: var(--tm-space-xs);
}

.home-topbar__module-link {
	display: inline-flex;
	align-items: center;
	padding: var(--tm-space-xxs) var(--tm-space-sm);
	border-radius: var(--tm-radius-pill);
	background: var(--tm-surface-variant);
	color: var(--tm-on-surface);
	font-weight: 600;
	font-size: var(--tm-type-body-small-size);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.home-topbar__module-link:hover {
	background: var(--tm-primary-container);
	color: var(--tm-on-primary-container);
}

.home-body {
	min-height: 100vh;
	margin: 0;
	background: linear-gradient(
		165deg,
		var(--tm-bg-gradient-top) 0%,
		var(--tm-bg-gradient-mid) 42%,
		var(--tm-bg) 100%
	);
}

.home-shell {
	max-width: 72rem;
	margin: 0 auto;
	padding: var(--tm-space-xl) var(--tm-space-md) var(--tm-space-xxl);
	box-sizing: border-box;
}

.home-hero {
	margin-bottom: 0;
	padding: var(--tm-space-xxxl) 0;
}

.home-beta-callout {
	margin-bottom: var(--tm-space-lg);
	border-color: color-mix(in srgb, var(--tm-primary) 40%, var(--tm-outline));
}

.home-beta-callout__title {
	margin: 0 0 var(--tm-space-xs);
	font-size: var(--tm-type-title-medium-size);
	line-height: var(--tm-type-title-medium-lh);
	font-weight: 600;
}

.home-beta-callout__text {
	margin: 0 0 var(--tm-space-md);
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
	color: var(--tm-on-surface-muted);
}

.home-alert {
	margin-bottom: var(--tm-space-lg);
	border-color: color-mix(in srgb, var(--tm-error) 35%, var(--tm-outline));
}

.home-alert__title {
	margin: 0 0 var(--tm-space-xs);
	font-size: var(--tm-type-title-medium-size);
	line-height: var(--tm-type-title-medium-lh);
	font-weight: 600;
}

.home-alert__text {
	margin: 0;
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
	color: var(--tm-on-surface-muted);
}

.home-hero__title {
	margin: 0 0 var(--tm-space-sm);
	font-size: var(--tm-type-display-medium-size);
	line-height: var(--tm-type-display-medium-lh);
	font-weight: 700;
	letter-spacing: var(--tm-type-display-large-track, -0.02em);
	color: var(--tm-on-background);
}

.home-hero__lead {
	margin: 0;
	max-width: 36rem;
	font-size: var(--tm-type-body-large-size);
	line-height: var(--tm-type-body-large-lh);
	color: var(--tm-on-surface-muted);
}

.home-cta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tm-space-sm);
	margin-top: var(--tm-space-lg);
}

.home-cta-primary {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding-left: var(--tm-space-lg);
	padding-right: var(--tm-space-lg);
}

.home-cta-secondary {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding-left: var(--tm-space-lg);
	padding-right: var(--tm-space-lg);
}

.home-cta-muted {
	font-size: var(--tm-type-body-medium-size);
	color: var(--tm-on-surface-muted);
	font-weight: 600;
}

.home-section {
	margin-bottom: 0;
	padding: var(--tm-space-xxxl) 0;
}

.home-section__title {
	margin: 0 0 var(--tm-space-xs);
	font-size: var(--tm-type-headline-small-size);
	line-height: var(--tm-type-headline-small-lh);
	font-weight: 700;
	color: var(--tm-on-background);
}

.home-section__intro {
	margin: 0 0 var(--tm-space-lg);
	max-width: 40rem;
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
	color: var(--tm-on-surface-muted);
}

.home-code {
	font-size: 0.9em;
	padding: 0.1em 0.35em;
	border-radius: var(--tm-shape-xs);
	background: var(--tm-surface);
	border: 1px solid var(--tm-outline-variant);
}

.home-steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tm-space-xl);
	counter-reset: step;
}

@media (min-width: 52rem) {
	.home-steps {
		grid-template-columns: repeat(3, 1fr);
	}
}

.home-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin: 0;
	position: relative;
}

.home-step__n {
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--tm-radius-pill);
	background: var(--tm-primary);
	color: var(--tm-on-primary);
	font-size: var(--tm-type-title-small-size);
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	margin-bottom: var(--tm-space-md);
}

.home-step__title {
	margin: 0 0 var(--tm-space-xxs);
	font-size: var(--tm-type-title-medium-size);
	line-height: var(--tm-type-title-medium-lh);
	font-weight: 600;
}

.home-step__text {
	margin: 0;
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
	color: var(--tm-on-surface-muted);
}

.home-cta-hint {
	margin: var(--tm-space-sm) 0 0;
	font-size: var(--tm-type-body-small-size);
	color: var(--tm-on-surface-dim);
	max-width: 36rem;
}

.home-cta-play,
.home-cta-try {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
}

.home-faq {
	max-width: 40rem;
	margin: 0 auto;
}

.home-faq__item {
	border-bottom: 1px solid var(--tm-outline-variant);
}

.home-faq__item:last-child {
	border-bottom: none;
}

.home-faq__item summary {
	cursor: pointer;
	font-weight: 600;
	padding: var(--tm-space-md) 0;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.home-faq__item summary::-webkit-details-marker {
	display: none;
}

.home-faq__item summary::after {
	content: "+";
	font-size: 1.25rem;
	font-weight: 400;
	color: var(--tm-on-surface-muted);
	flex-shrink: 0;
	margin-left: var(--tm-space-md);
	transition: transform 0.15s ease;
}

.home-faq__item[open] summary::after {
	content: "\2212";
}

.home-faq__item p {
	margin: 0 0 var(--tm-space-md);
	color: var(--tm-on-surface-muted);
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
}

.home-footer {
	margin-top: var(--tm-space-xxxl);
	padding: var(--tm-space-xl) 0 var(--tm-space-lg);
	border-top: 1px solid var(--tm-outline-variant);
}

.home-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--tm-space-xl);
	max-width: var(--tm-content-max);
	margin: 0 auto;
	padding: 0 var(--tm-space-md);
}

@media (min-width: 40rem) {
	.home-footer__grid {
		grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	}
}

.home-footer__brand {
	display: flex;
	flex-direction: column;
	gap: var(--tm-space-sm);
}

.home-footer__icon {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: var(--tm-radius-md);
}

.home-footer__tagline {
	margin: 0;
	font-size: var(--tm-type-body-small-size);
	line-height: var(--tm-type-body-small-lh);
	color: var(--tm-on-surface-muted);
	max-width: 18rem;
}

.home-footer__copy {
	margin: 0;
	font-size: var(--tm-type-body-small-size);
	color: var(--tm-on-surface-dim);
}

.home-footer__heading {
	margin: 0 0 var(--tm-space-sm);
	font-size: var(--tm-type-label-small-size);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tm-on-surface-dim);
}

.home-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--tm-space-xs);
}

.home-footer__list a,
.home-footer__account-link {
	color: var(--tm-on-surface-muted);
	font-size: var(--tm-type-body-small-size);
	font-weight: 500;
	text-decoration: none;
}

.home-footer__list a:hover,
.home-footer__account-link:hover {
	color: var(--tm-on-surface);
	text-decoration: underline;
}

.home-footer__col--cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--tm-space-sm);
}

.home-footer__play {
	width: 100%;
	max-width: 14rem;
	justify-content: center;
}

.home-footer__account-link {
	margin-top: var(--tm-space-xxs);
}

.home-dev {
	font-size: var(--tm-type-body-small-size);
	color: var(--tm-on-surface-muted);
}

.home-dev__summary {
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	color: var(--tm-on-surface-dim);
	padding: var(--tm-space-xs) 0;
}

.home-dev__summary::-webkit-details-marker {
	display: none;
}

.home-dev__body {
	margin-top: var(--tm-space-sm);
}

.home-dev__lead {
	margin: 0 0 var(--tm-space-md);
	font-size: var(--tm-type-body-medium-size);
	color: var(--tm-on-surface-muted);
}

.home-dev__clock {
	margin-top: var(--tm-space-md);
}

/* Painel tema (tapmind-theme.js) — alinhado à coluna 28rem como o FAB Quick */
.tm-theme-panel {
	position: fixed;
	left: max(0px, calc((100vw - min(28rem, 100vw)) / 2));
	right: auto;
	width: min(28rem, 100vw);
	box-sizing: border-box;
	padding-left: max(var(--tm-space-sm), env(safe-area-inset-left, 0px));
	padding-right: max(var(--tm-space-sm), env(safe-area-inset-right, 0px));
	bottom: var(--tm-theme-panel-bottom);
	z-index: 210;
	font-size: var(--tm-type-label-medium-size);
	line-height: var(--tm-type-label-medium-lh);
	display: flex;
	justify-content: flex-end;
	align-items: flex-end;
	pointer-events: none;
}

.tm-theme-panel > * {
	pointer-events: auto;
}

.tm-theme-panel__summary {
	cursor: pointer;
	list-style: none;
	padding: var(--tm-space-xs) var(--tm-space-sm);
	border-radius: var(--tm-radius-pill);
	background: var(--tm-surface-elevated);
	color: var(--tm-on-surface);
	border: 1px solid var(--tm-outline-variant);
	font-weight: 600;
	box-shadow: var(--tm-elev-2);
}

.tm-theme-panel__summary-inner {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.tm-theme-panel__summary-icon {
	display: block;
	width: 1.125rem;
	height: 1.125rem;
	flex-shrink: 0;
	color: var(--tm-primary);
}

.tm-theme-panel__summary::-webkit-details-marker {
	display: none;
}

.tm-theme-panel__body {
	margin-top: var(--tm-space-xs);
	padding: var(--tm-space-sm);
	border-radius: var(--tm-shape-sm);
	background: var(--tm-surface-elevated);
	border: 1px solid var(--tm-outline-variant);
	min-width: 12rem;
	box-shadow: var(--tm-elev-3);
}

.tm-theme-panel__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--tm-space-sm);
	margin-bottom: var(--tm-space-sm);
}

.tm-theme-panel__row:last-child {
	margin-bottom: 0;
}

.tm-theme-panel__label {
	color: var(--tm-on-surface-muted);
	flex-shrink: 0;
}

.tm-theme-panel__select {
	font: inherit;
	font-size: var(--tm-type-body-small-size);
	padding: var(--tm-space-xxs) var(--tm-space-xs);
	border-radius: var(--tm-shape-xs);
	border: 1px solid var(--tm-outline);
	background: var(--tm-surface);
	color: var(--tm-on-surface);
	max-width: 11rem;
}

/* —— Página /account (registo / sessão / OTP) —— */
.account-body {
	min-height: 100vh;
}

.account-wrap {
	max-width: 28rem;
}

.account-back {
	margin: 0 0 var(--tm-space-md);
}

.account-back-link {
	color: var(--tm-primary);
	text-decoration: none;
	font-weight: 600;
	font-size: var(--tm-type-body-medium-size);
}

.account-back-link:hover {
	text-decoration: underline;
}

.account-h1 {
	font-size: var(--tm-type-headline-small-size);
	line-height: var(--tm-type-headline-small-lh);
	font-weight: 700;
	margin: 0 0 var(--tm-space-sm);
}

.account-h2 {
	font-size: var(--tm-type-title-medium-size);
	margin: 0 0 var(--tm-space-xs);
	font-weight: 600;
}

.account-h3 {
	font-size: var(--tm-type-title-small-size);
	margin: 0 0 var(--tm-space-xs);
	font-weight: 600;
}

.account-lead {
	margin-bottom: var(--tm-space-lg);
}

.account-card--alert {
	border-color: color-mix(in srgb, var(--tm-error) 35%, var(--tm-outline));
}

.account-toast {
	margin-bottom: var(--tm-space-md);
	padding: var(--tm-space-sm) var(--tm-space-md);
	border-radius: var(--tm-radius-btn);
	background: var(--tm-surface-elevated);
	border: 1px solid var(--tm-outline);
	color: var(--tm-on-surface);
	font-size: var(--tm-type-body-medium-size);
}

.account-toast--error {
	border-color: color-mix(in srgb, var(--tm-error) 45%, var(--tm-outline));
	background: color-mix(in srgb, var(--tm-error) 10%, var(--tm-surface-elevated));
}

.account-form-error {
	margin-bottom: var(--tm-space-md);
	padding: var(--tm-space-sm) var(--tm-space-md);
	border-radius: var(--tm-radius-btn);
	border: 1px solid color-mix(in srgb, var(--tm-error) 40%, var(--tm-outline));
	background: color-mix(in srgb, var(--tm-error) 8%, var(--tm-surface));
	color: var(--tm-on-surface);
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
}

.account-settings-section {
	margin-bottom: var(--tm-space-md);
}

.account-settings-section .account-submit {
	margin-top: var(--tm-space-sm);
}

.account-input--readonly {
	opacity: 0.85;
	cursor: default;
}

.account-legal-links {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: var(--tm-space-xs);
}

.account-legal-links a {
	color: var(--tm-primary);
	font-weight: 500;
	text-decoration: none;
}

.account-legal-links a:hover {
	text-decoration: underline;
}

.account-forgot-wrap {
	margin: 0 0 var(--tm-space-xs);
}

.account-link-btn {
	display: inline;
	padding: 0;
	margin: 0;
	font: inherit;
	font-size: var(--tm-type-body-medium-size);
	font-weight: 600;
	color: var(--tm-primary);
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.account-link-btn:hover {
	color: var(--tm-on-surface);
}

.account-link-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.account-forgot {
	margin-top: var(--tm-space-xs);
}

.account-forgot .account-h3 {
	margin-top: 0;
}

.account-forgot-step .account-muted:last-of-type {
	margin-bottom: var(--tm-space-sm);
}

.account-row-btns--stack {
	margin-top: var(--tm-space-md);
}

.account-seg {
	display: flex;
	gap: var(--tm-space-xs);
	margin-bottom: var(--tm-space-lg);
}

.account-seg__btn {
	flex: 1;
	box-shadow: none;
}

.account-seg__btn--ghost {
	background: transparent;
	color: var(--tm-on-surface-muted);
	border: 1px solid var(--tm-outline);
	box-shadow: none;
}

.account-seg__btn--ghost:hover {
	filter: none;
	background: var(--tm-surface-elevated);
	color: var(--tm-on-surface);
}

.account-fields {
	display: flex;
	flex-direction: column;
	gap: var(--tm-space-sm);
}

.account-label {
	font-size: var(--tm-type-label-medium-size);
	font-weight: 600;
	color: var(--tm-on-surface-muted);
}

.account-input {
	font: inherit;
	font-size: var(--tm-type-body-large-size);
	padding: var(--tm-space-sm) var(--tm-space-md);
	border-radius: var(--tm-radius-btn);
	border: 1px solid var(--tm-outline);
	background: var(--tm-surface);
	color: var(--tm-on-surface);
	width: 100%;
	box-sizing: border-box;
}

.account-input:focus {
	outline: 2px solid var(--tm-primary);
	outline-offset: 1px;
}

.account-hint {
	margin: calc(-1 * var(--tm-space-xs)) 0 var(--tm-space-sm);
	font-size: var(--tm-type-body-small-size);
	color: var(--tm-on-surface-muted);
}

.account-submit {
	margin-top: var(--tm-space-sm);
	width: 100%;
	min-height: 2.75rem;
}

.account-muted {
	margin: 0 0 var(--tm-space-md);
	color: var(--tm-on-surface-muted);
	font-size: var(--tm-type-body-medium-size);
	line-height: var(--tm-type-body-medium-lh);
}

.account-hr {
	border: none;
	border-top: 1px solid var(--tm-outline-variant);
	margin: var(--tm-space-lg) 0;
}

.account-otp-block {
	margin-top: var(--tm-space-sm);
}

.account-row-btns {
	display: flex;
	flex-direction: column;
	gap: var(--tm-space-sm);
	margin-top: var(--tm-space-sm);
}

.account-row-btns--split {
	flex-direction: row;
	flex-wrap: wrap;
}

.account-row-btns--split .btn {
	flex: 1 1 8rem;
}

.btn-secondary {
	background: transparent;
	color: var(--tm-primary);
	border: 1px solid var(--tm-primary);
	box-shadow: none;
}

.btn-secondary:hover {
	filter: brightness(1.06);
	background: color-mix(in srgb, var(--tm-primary) 12%, transparent);
}

.account-success {
	margin: var(--tm-space-md) 0 0;
	padding: var(--tm-space-sm);
	border-radius: var(--tm-radius-btn);
	background: color-mix(in srgb, var(--tm-primary) 14%, var(--tm-surface));
	color: var(--tm-on-surface);
	font-size: var(--tm-type-body-medium-size);
}
