:root {
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
	--nav-h: 52px;
	--tab-h: 60px;
	--hit: 44px;
	--row-h: 60px;
	--gutter: var(--space-4);
	color-scheme: light;
}

:root.dark {
	color-scheme: dark;
}

:root.in-frame {
	--safe-top: 0px;
	--safe-bottom: 22px;
}

@view-transition {
	navigation: auto;
}

html,
body {
	background: var(--canvas);
	overscroll-behavior-y: none;
	-webkit-tap-highlight-color: transparent;
}

body.app {
	min-height: 100dvh;
	padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + var(--space-6));
}

body.app.no-tabs {
	padding-bottom: calc(var(--safe-bottom) + var(--space-6));
}

body.app.has-action-bar {
	padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + var(--space-6));
}

button {
	-webkit-user-select: none;
	user-select: none;
}

:root[dir="rtl"] .rtl-flip {
	scale: -1 1;
}

.icon-md {
	width: 20px;
	height: 20px;
}

.icon-xl {
	width: 24px;
	height: 24px;
}

.status-strip {
	position: fixed;
	inset-block-start: 0;
	inset-inline: 0;
	z-index: 40;
	height: var(--safe-top);
	background: var(--canvas);
}

.navbar {
	position: sticky;
	inset-block-start: 0;
	z-index: 30;
	display: grid;
	grid-template-columns: minmax(var(--hit), 1fr) auto minmax(var(--hit), 1fr);
	align-items: center;
	gap: var(--space-2);
	height: calc(var(--nav-h) + var(--safe-top));
	padding: var(--safe-top) var(--space-2) 0;
	background: var(--canvas);
	border-bottom: 1px solid transparent;
	transition: border-color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
	view-transition-name: navbar;
}

.navbar.on-card,
body.surface-card .navbar {
	background: var(--card);
}

.navbar[data-scrolled] {
	border-bottom-color: var(--border);
}

.nav-lead,
.nav-trail {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	min-width: 0;
}

.nav-trail {
	justify-content: flex-end;
}

.nav-title {
	overflow: hidden;
	max-width: 60vw;
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
	opacity: 0;
	translate: 0 var(--space-1);
	transition: opacity var(--duration-fast) var(--ease-out), translate var(--duration) var(--ease-out);
}

.navbar[data-scrolled] .nav-title,
.navbar[data-static] .nav-title {
	opacity: 1;
	translate: 0 0;
}

.tap {
	display: inline-grid;
	place-items: center;
	position: relative;
	width: var(--hit);
	height: var(--hit);
	padding: 0;
	border: 0;
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--foreground);
	cursor: pointer;
	transition: background-color var(--duration-fast) var(--ease-out), scale var(--duration-fast) var(--ease-out);
}

.tap:active {
	background: var(--selected);
	scale: 0.94;
}

.tap .badge-dot {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 10px;
	width: 8px;
	height: 8px;
	border: 2px solid var(--canvas);
	border-radius: var(--radius-full);
	background: var(--accent-brand);
	box-sizing: content-box;
}

.back {
	display: inline-flex;
	align-items: center;
	gap: var(--space-0-5);
	height: var(--hit);
	padding-inline: var(--space-1) var(--space-2);
	border: 0;
	border-radius: var(--radius-md);
	background: transparent;
	color: var(--primary-text);
	font-size: var(--text-base);
	cursor: pointer;
}

.back:active {
	opacity: 0.6;
}

.back .icon {
	width: 24px;
	height: 24px;
}

.large-title {
	display: grid;
	gap: var(--space-1);
	padding: var(--space-1) var(--gutter) var(--space-4);
}

.large-title h1 {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.large-title p {
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.screen {
	display: grid;
	gap: var(--space-5);
	padding-inline: var(--gutter);
}

.screen.flush {
	padding-inline: 0;
}

.section {
	display: grid;
	gap: var(--space-2);
}

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	min-height: var(--control-h-sm);
	padding-inline: var(--space-1);
}

.section-head h2 {
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
}

.section-head .count {
	margin-inline-start: var(--space-1-5);
}

.section-head a,
.section-head button.link {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	min-height: var(--hit);
	padding: 0;
	border: 0;
	background: none;
	color: var(--primary-text);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	cursor: pointer;
}

.group-title {
	padding: var(--space-3) var(--space-1) var(--space-1);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.list {
	overflow: hidden;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
}

.cell {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	position: relative;
	min-height: var(--row-h);
	padding-inline: var(--space-4) var(--space-3);
	background: var(--card);
	color: inherit;
	text-align: start;
	cursor: pointer;
	transition: background-color var(--duration-fast) var(--ease-out);
}

button.cell {
	width: 100%;
	border: 0;
	font: inherit;
}

.cell:active {
	background: var(--hover);
}

.cell + .cell::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: calc(var(--space-4) + 40px + var(--space-3)) 0;
	border-top: 1px solid var(--border);
}

.list.plain .cell + .cell::before,
.cell.no-lead + .cell::before,
.cell + .cell.no-lead::before {
	inset-inline-start: var(--space-4);
}

.cell-body {
	display: grid;
	flex: 1;
	gap: var(--space-0-5);
	min-width: 0;
	padding-block: var(--space-3);
}

.cell-title {
	overflow: hidden;
	font-size: var(--text-base);
	font-weight: var(--weight-medium);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cell-sub {
	display: flex;
	align-items: center;
	gap: var(--space-1-5);
	overflow: hidden;
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	white-space: nowrap;
}

.cell-sub > span {
	overflow: hidden;
	text-overflow: ellipsis;
}

.cell-end {
	display: grid;
	justify-items: end;
	gap: var(--space-1);
	flex-shrink: 0;
	text-align: end;
}

.cell-value {
	font-size: var(--text-base);
	font-weight: var(--weight-semibold);
}

.cell-meta {
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
}

.chev {
	width: 20px;
	height: 20px;
	color: var(--subtle-foreground);
}

:root[dir="rtl"] .chev {
	scale: -1 1;
}

.lead-40 {
	width: 40px;
	height: 40px;
	font-size: var(--text-sm);
}

.icon-tile.lead-40 {
	border-radius: var(--radius-lg);
}

.icon-tile.lead-40 .icon {
	width: 20px;
	height: 20px;
}

.avatar.lead-40 {
	font-weight: var(--weight-semibold);
}

.dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	border-radius: var(--radius-full);
	background: var(--pill-fg, var(--muted-foreground));
}

.dot.unread {
	background: var(--accent-brand);
}

.sep-dot::before {
	content: "·";
	color: var(--subtle-foreground);
}

.overdue {
	color: var(--destructive-text);
}

.tabbar {
	position: fixed;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 30;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	height: calc(var(--tab-h) + var(--safe-bottom));
	padding-bottom: var(--safe-bottom);
	border-top: 1px solid var(--border);
	background: var(--card);
	view-transition-name: tabbar;
}

.tabbar a {
	display: grid;
	place-items: center;
	align-content: center;
	gap: var(--space-0-5);
	position: relative;
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.tabbar a .tab-icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 30px;
	border-radius: var(--radius-lg);
	transition: background-color var(--duration) var(--ease-out);
}

.tabbar a .icon {
	width: 22px;
	height: 22px;
}

.tabbar a[aria-current="page"] {
	color: var(--foreground);
	font-weight: var(--weight-semibold);
}

.tabbar a[aria-current="page"] .tab-icon {
	background: var(--primary-soft);
	color: var(--primary-text);
}

.tabbar a:active .tab-icon {
	background: var(--selected);
}

.tabbar .count {
	position: absolute;
	inset-block-start: var(--space-1);
	inset-inline-start: calc(50% + var(--space-2));
}

.chips {
	display: flex;
	gap: var(--space-2);
	overflow-x: auto;
	margin-inline: calc(var(--gutter) * -1);
	padding-inline: var(--gutter);
	scroll-padding-inline: var(--gutter);
	scrollbar-width: none;
}

.chips::-webkit-scrollbar {
	display: none;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1-5);
	flex-shrink: 0;
	height: var(--control-h);
	padding-inline: var(--space-3);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	background: var(--card);
	color: var(--foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	white-space: nowrap;
	cursor: pointer;
	transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.chip:active {
	background: var(--hover);
}

.chip[aria-pressed="true"],
.chip[aria-selected="true"] {
	border-color: var(--foreground);
	background: var(--foreground);
	color: var(--background);
}

.chip[aria-pressed="true"] .count,
.chip[aria-selected="true"] .count {
	background: color-mix(in oklch, var(--background), transparent 80%);
	color: var(--background);
}

.seg-block {
	display: grid;
	grid-auto-columns: 1fr;
	grid-auto-flow: column;
	width: 100%;
}

.seg-block button {
	justify-content: center;
	height: var(--control-h);
	font-size: var(--text-sm);
}

.search-field {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	height: var(--control-h-lg);
	padding-inline: var(--space-3);
	border-radius: var(--radius-lg);
	background: var(--muted);
	color: var(--muted-foreground);
}

.search-field input {
	flex: 1;
	min-width: 0;
	height: 100%;
	border: 0;
	background: transparent;
	color: var(--foreground);
	font-size: var(--text-base);
	outline: none;
}

.search-field input::placeholder {
	color: var(--subtle-foreground);
}

a.search-field {
	font-size: var(--text-base);
	color: var(--subtle-foreground);
}

.kpis {
	display: grid;
	grid-auto-columns: minmax(156px, 46%);
	grid-auto-flow: column;
	gap: var(--space-3);
	overflow-x: auto;
	margin-inline: calc(var(--gutter) * -1);
	padding: var(--space-0-5) var(--gutter) var(--space-1);
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	scrollbar-width: none;
}

.kpis::-webkit-scrollbar {
	display: none;
}

.kpi {
	display: grid;
	gap: var(--space-2);
	padding: var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
	scroll-snap-align: start;
}

.kpi-label {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.kpi-value {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.kpi-meta {
	display: flex;
	align-items: center;
	gap: var(--space-1-5);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
}

.kpi .spark {
	height: 32px;
}

.target {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
}

.target-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
}

.target-value {
	font-size: var(--text-2xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.meter {
	position: relative;
	height: 8px;
	overflow: hidden;
	border-radius: var(--radius-full);
	background: var(--muted);
}

.meter > span {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	border-radius: inherit;
	background: var(--primary);
}

.meter.saffron > span {
	background: var(--accent-brand);
}

.agent-box {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid color-mix(in oklch, var(--primary), transparent 70%);
	border-radius: var(--radius-xl);
	background: linear-gradient(180deg, var(--primary-soft), var(--card) 70%);
}

.agent-box-head {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
}

.agent-box-head .meta {
	margin-inline-start: auto;
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.agent-box ul {
	display: grid;
	gap: var(--space-1-5);
	margin: 0;
	padding-inline-start: var(--space-5);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.agent-box ul strong {
	color: var(--foreground);
	font-weight: var(--weight-semibold);
}

.agent-box p {
	font-size: var(--text-sm);
	color: var(--muted-foreground);
}

.agent-actions {
	display: flex;
	gap: var(--space-2);
}

.agent-actions .btn {
	height: var(--control-h-lg);
}

.agent-actions .btn-primary {
	flex: 1;
}

.btn-block {
	width: 100%;
	height: var(--control-h-lg);
	font-size: var(--text-base);
}

.btn:active {
	scale: 0.98;
}

.deal-card {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--card);
	box-shadow: var(--shadow-xs);
	color: inherit;
	transition: scale var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

.deal-card:active {
	scale: 0.99;
	background: var(--hover);
}

.deal-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--space-3);
}

.deal-card-title {
	font-size: var(--text-base);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
}

.deal-card-amount {
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	white-space: nowrap;
}

.deal-card-foot {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.deal-card-foot .spacer {
	flex: 1;
}

.entity-line {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.entity-line span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.stack-3 {
	display: grid;
	gap: var(--space-3);
}

.stack-2 {
	display: grid;
	gap: var(--space-2);
}

.pipeline-sum {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
	padding-inline: var(--space-1);
}

.pipeline-sum .num.big {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	letter-spacing: -0.02em;
}

.hero {
	display: grid;
	justify-items: center;
	gap: var(--space-2);
	padding: var(--space-2) var(--gutter) var(--space-5);
	text-align: center;
}

.hero .avatar-hero {
	width: 72px;
	height: 72px;
	border-radius: var(--radius-full);
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
}

.hero .logo-hero {
	width: 72px;
	height: 72px;
	border-radius: var(--radius-xl);
}

.hero h1 {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.hero .sub {
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.hero .amount {
	font-size: var(--text-2xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.hero .pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-1-5);
}

.quick {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-2);
}

.quick a,
.quick button {
	display: grid;
	justify-items: center;
	gap: var(--space-1-5);
	padding: var(--space-3) 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
	color: var(--foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
	cursor: pointer;
	transition: background-color var(--duration-fast) var(--ease-out), scale var(--duration-fast) var(--ease-out);
}

.quick a:active,
.quick button:active {
	background: var(--hover);
	scale: 0.97;
}

.quick .icon {
	width: 22px;
	height: 22px;
	color: var(--primary-text);
}

.stage-track {
	display: grid;
	grid-auto-columns: 1fr;
	grid-auto-flow: column;
	gap: var(--space-1);
}

.stage-track span {
	height: 6px;
	border-radius: var(--radius-full);
	background: var(--muted);
}

.stage-track span[data-done] {
	background: var(--primary);
}

.stage-track span[data-current] {
	background: var(--primary);
	box-shadow: 0 0 0 2px var(--primary-soft);
}

.stage-card {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
}

.stage-card-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	font-size: var(--text-sm);
}

.props .cell {
	min-height: 52px;
	cursor: default;
}

.props .cell-body {
	grid-template-columns: minmax(96px, 38%) 1fr;
	align-items: center;
	gap: var(--space-3);
}

.props .prop-label {
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.props .prop-value {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.props .prop-value a {
	color: var(--primary-text);
}

.timeline {
	display: grid;
	padding: var(--space-1) var(--space-4);
}

.tl-item {
	display: grid;
	grid-template-columns: 32px 1fr;
	gap: var(--space-3);
	position: relative;
	padding-block: var(--space-3);
}

.tl-item::before {
	content: "";
	position: absolute;
	inset-block: calc(var(--space-3) + 32px) 0;
	inset-inline-start: 15px;
	border-inline-start: 1px solid var(--border);
}

.tl-item:last-child::before {
	display: none;
}

.tl-item .icon-tile {
	width: 32px;
	height: 32px;
}

.tl-body {
	display: grid;
	gap: var(--space-1);
	min-width: 0;
	font-size: var(--text-sm);
}

.tl-body .when {
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
}

.tl-body .quote {
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-lg);
	background: var(--muted);
	color: var(--muted-foreground);
}

.task {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	position: relative;
	min-height: var(--row-h);
	padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
	background: var(--card);
	touch-action: pan-y;
	transition: translate var(--duration) var(--ease-out);
}

.task + .task::before,
.swipe + .swipe::before {
	content: "";
	position: absolute;
	inset-block-start: 0;
	inset-inline: calc(var(--space-4) + 24px + var(--space-3)) 0;
	z-index: 2;
	border-top: 1px solid var(--border);
}

.swipe {
	position: relative;
	overflow: hidden;
}

.swipe-under {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: var(--space-2);
	padding-inline: var(--space-5);
	background: var(--primary);
	color: var(--primary-foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
}

.swipe .task {
	z-index: 1;
}

.swipe[data-dragging] .task {
	transition: none;
}

.check {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	margin-block-start: var(--space-0-5);
	padding: 0;
	border: 1.5px solid var(--border-strong);
	border-radius: var(--radius-full);
	background: var(--background);
	color: transparent;
	cursor: pointer;
	transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), scale var(--duration-fast) var(--ease-out);
}

.check::after {
	content: "";
	position: absolute;
	width: var(--hit);
	height: var(--hit);
}

.check .icon {
	width: 14px;
	height: 14px;
	stroke-width: 3;
}

.check:active {
	scale: 0.9;
}

.check[aria-checked="true"] {
	border-color: var(--primary);
	background: var(--primary);
	color: var(--primary-foreground);
}

.task-body {
	display: grid;
	flex: 1;
	gap: var(--space-1);
	min-width: 0;
}

.task-title {
	font-size: var(--text-base);
	font-weight: var(--weight-medium);
	transition: color var(--duration-fast) var(--ease-out);
}

.task[data-done] .task-title {
	color: var(--subtle-foreground);
	text-decoration: line-through;
}

.task-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-1-5) var(--space-2);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.task-meta .icon {
	width: 14px;
	height: 14px;
}

.task-meta > span {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
}

.convo .cell-title {
	font-weight: var(--weight-medium);
}

.convo[data-unread] .cell-title {
	font-weight: var(--weight-semibold);
}

.convo[data-unread] .cell-sub {
	color: var(--foreground);
}

.channel-badge {
	position: absolute;
	inset-block-end: calc(50% - 26px);
	inset-inline-start: calc(var(--space-4) + 26px);
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	border: 2px solid var(--card);
	border-radius: var(--radius-full);
	background: var(--pill-bg);
	color: var(--pill-fg);
	box-sizing: content-box;
}

.channel-badge .icon {
	width: 11px;
	height: 11px;
}

.thread {
	display: grid;
	gap: var(--space-2);
	padding: var(--space-3) var(--gutter);
}

.day-sep {
	justify-self: center;
	margin-block: var(--space-2);
	padding: var(--space-0-5) var(--space-2-5);
	border-radius: var(--radius-md);
	background: var(--muted);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.bubble {
	display: grid;
	gap: var(--space-1);
	max-width: 80%;
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-xl);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
}

.bubble time {
	justify-self: end;
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
}

.bubble.in {
	justify-self: start;
	border: 1px solid var(--border);
	border-end-start-radius: var(--radius-sm);
	background: var(--card);
}

.bubble.out {
	justify-self: end;
	border-end-end-radius: var(--radius-sm);
	background: var(--primary-soft);
	color: var(--primary-soft-foreground);
}

.bubble.out time {
	color: var(--primary-soft-foreground);
	opacity: 0.8;
}

.bubble.agent {
	justify-self: stretch;
	max-width: none;
	border: 1px solid color-mix(in oklch, var(--primary), transparent 70%);
	background: linear-gradient(180deg, var(--primary-soft), var(--card) 70%);
	color: var(--foreground);
}

.bubble.agent ul {
	display: grid;
	gap: var(--space-1);
	margin: 0;
	padding-inline-start: var(--space-5);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.bubble .order-ref {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-2);
	border-radius: var(--radius-lg);
	background: var(--card);
	color: var(--foreground);
	font-size: var(--text-sm);
}

.composer {
	position: fixed;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 30;
	display: grid;
	gap: var(--space-2);
	padding: var(--space-2) var(--space-3) calc(var(--space-2) + var(--safe-bottom));
	border-top: 1px solid var(--border);
	background: var(--card);
	view-transition-name: composer;
}

.composer-row {
	display: flex;
	align-items: flex-end;
	gap: var(--space-2);
}

.composer textarea {
	flex: 1;
	min-height: var(--control-h-lg);
	max-height: 120px;
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--input);
	border-radius: var(--radius-xl);
	background: var(--background);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	resize: none;
	outline: none;
	field-sizing: content;
}

.composer textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px color-mix(in oklch, var(--primary), transparent 80%);
}

.send {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: var(--control-h-lg);
	height: var(--control-h-lg);
	border: 0;
	border-radius: var(--radius-full);
	background: var(--primary);
	color: var(--primary-foreground);
	box-shadow: var(--shadow-inset);
	cursor: pointer;
}

.send:active {
	scale: 0.94;
}

:root[dir="rtl"] .send .icon {
	scale: -1 1;
}

.suggest {
	display: flex;
	gap: var(--space-2);
	overflow-x: auto;
	scrollbar-width: none;
}

.suggest::-webkit-scrollbar {
	display: none;
}

.suggest .chip {
	height: var(--control-h-sm);
	border-color: color-mix(in oklch, var(--primary), transparent 60%);
	background: var(--primary-soft);
	color: var(--primary-soft-foreground);
}

.suggest .chip .icon {
	width: 14px;
	height: 14px;
}

body.has-composer {
	padding-bottom: calc(var(--safe-bottom) + 132px);
}

.action-bar {
	position: fixed;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: 30;
	display: flex;
	gap: var(--space-2);
	padding: var(--space-3) var(--gutter) calc(var(--space-3) + var(--safe-bottom));
	border-top: 1px solid var(--border);
	background: var(--card);
	view-transition-name: tabbar;
}

.action-bar .btn {
	height: var(--control-h-lg);
	font-size: var(--text-base);
}

.action-bar .btn-primary {
	flex: 1;
}

.bsheet-layer {
	position: fixed;
	inset: 0;
	z-index: 50;
}

.bsheet-scrim {
	position: absolute;
	inset: 0;
	background: var(--overlay);
	animation: fade-in var(--duration) var(--ease-out);
}

.bsheet {
	position: absolute;
	inset-block-end: 0;
	inset-inline: 0;
	display: grid;
	grid-template-rows: auto auto 1fr auto;
	max-height: calc(100dvh - var(--safe-top) - var(--space-4));
	border-start-start-radius: var(--radius-xl);
	border-start-end-radius: var(--radius-xl);
	background: var(--popover);
	box-shadow: var(--shadow-lg);
	animation: sheet-up var(--duration-enter, 240ms) var(--ease-out);
	touch-action: none;
}

.bsheet-layer[data-closing] .bsheet {
	animation: sheet-down var(--duration) var(--ease-out) forwards;
}

.bsheet-layer[data-closing] .bsheet-scrim {
	animation: fade-out var(--duration) var(--ease-out) forwards;
}

.bsheet[data-dragging] {
	animation: none;
	transition: none;
}

@keyframes sheet-up {
	from {
		translate: 0 100%;
	}
}

@keyframes sheet-down {
	to {
		translate: 0 100%;
	}
}

.grabber {
	justify-self: center;
	width: 36px;
	height: 5px;
	margin-block: var(--space-2) var(--space-1);
	border-radius: var(--radius-full);
	background: var(--border-strong);
}

.bsheet-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-1) var(--space-2) var(--space-2) var(--gutter);
}

.bsheet-head h2 {
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
}

.bsheet-body {
	display: grid;
	align-content: start;
	gap: var(--space-4);
	overflow-y: auto;
	padding: var(--space-1) var(--gutter) var(--space-4);
	touch-action: pan-y;
	overscroll-behavior: contain;
}

.bsheet-foot {
	display: flex;
	gap: var(--space-2);
	padding: var(--space-3) var(--gutter) calc(var(--space-3) + var(--safe-bottom));
	border-top: 1px solid var(--border);
}

.bsheet-foot .btn {
	height: var(--control-h-lg);
	font-size: var(--text-base);
}

.bsheet-foot .btn-primary {
	flex: 1;
}

.create-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-2);
}

.create-grid a,
.create-grid button {
	display: grid;
	justify-items: center;
	gap: var(--space-2);
	padding: var(--space-4) var(--space-1);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	color: var(--foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
	cursor: pointer;
}

.create-grid a:active,
.create-grid button:active {
	background: var(--hover);
}

.create-grid .icon-tile {
	width: 40px;
	height: 40px;
}

.create-grid .icon-tile .icon {
	width: 20px;
	height: 20px;
}

.option-list .cell {
	min-height: 52px;
}

.option-list .cell[aria-checked="true"] .opt-check {
	opacity: 1;
}

.opt-check {
	width: 20px;
	height: 20px;
	color: var(--primary-text);
	opacity: 0;
}

.field .input,
.field .textarea,
.field .select-trigger {
	height: var(--control-h-lg);
	font-size: var(--text-base);
}

.field .textarea {
	height: auto;
	min-height: 88px;
}

.input-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-3);
}

.fake-select {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	width: 100%;
	height: var(--control-h-lg);
	padding-inline: var(--space-3);
	border: 1px solid var(--input);
	border-radius: var(--radius-md);
	background: var(--background);
	box-shadow: var(--shadow-xs);
	color: var(--foreground);
	font-size: var(--text-base);
	text-align: start;
	cursor: pointer;
}

.fake-select .grow {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fake-select .icon {
	color: var(--muted-foreground);
}

.m-toast {
	position: fixed;
	inset-block-end: calc(var(--tab-h) + var(--safe-bottom) + var(--space-3));
	inset-inline: var(--gutter);
	z-index: 60;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	min-height: 52px;
	padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--popover);
	box-shadow: var(--shadow-lg);
	font-size: var(--text-sm);
	animation: rise-in var(--duration) var(--ease-out);
}

body.no-tabs .m-toast {
	inset-block-end: calc(var(--safe-bottom) + var(--space-3));
}

body.has-action-bar .m-toast,
body.has-composer .m-toast {
	inset-block-end: calc(var(--safe-bottom) + 84px);
}

.m-toast .icon-tile {
	width: 28px;
	height: 28px;
}

.m-toast span.text {
	flex: 1;
	min-width: 0;
}

.m-toast[data-closing] {
	animation: fade-out var(--duration-fast) var(--ease-out) forwards;
}

.notice {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-xl);
	background: var(--pill-bg);
	color: var(--pill-fg);
	font-size: var(--text-sm);
}

.notice strong {
	display: block;
	font-weight: var(--weight-semibold);
}

.notice .icon {
	margin-block-start: var(--space-0-5);
}

.empty-state {
	display: grid;
	justify-items: center;
	gap: var(--space-3);
	padding: var(--space-10) var(--space-6);
	text-align: center;
}

.empty-state .icon-tile {
	width: 44px;
	height: 44px;
}

.empty-state p {
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.profile-card {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
}

.profile-card .avatar {
	width: 56px;
	height: 56px;
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
}

.profile-card .grow {
	display: grid;
	flex: 1;
	gap: var(--space-0-5);
	min-width: 0;
}

.profile-card strong {
	font-size: var(--text-md);
	font-weight: var(--weight-semibold);
}

.brand-tile {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: var(--radius-lg);
	background: var(--primary);
	color: var(--primary-foreground);
	font-weight: var(--weight-semibold);
}

.brand-tile.lg {
	width: 56px;
	height: 56px;
	border-radius: var(--radius-xl);
	font-size: var(--text-xl);
}

.auth {
	display: grid;
	align-content: space-between;
	gap: var(--space-8);
	min-height: 100dvh;
	padding: calc(var(--safe-top) + var(--space-10)) var(--space-6) calc(var(--safe-bottom) + var(--space-6));
	background: var(--card);
}

.auth-top {
	display: grid;
	gap: var(--space-4);
}

.auth-top h1 {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.auth-top p {
	color: var(--muted-foreground);
}

.auth-form {
	display: grid;
	gap: var(--space-4);
}

.or {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
}

.or::before,
.or::after {
	content: "";
	flex: 1;
	border-top: 1px solid var(--border);
}

.btn-provider {
	width: 100%;
	height: var(--control-h-lg);
	font-size: var(--text-base);
}

.legal {
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
	text-align: center;
}

.legal a {
	color: var(--primary-text);
}

.recent-q {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.big-num {
	font-size: var(--text-2xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.summary-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-3);
}

.mini-stat {
	display: grid;
	gap: var(--space-1);
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
}

.mini-stat .label-s {
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.mini-stat .num {
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
}

.line-items .cell {
	cursor: default;
}

.totals {
	display: grid;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-4);
	border-top: 1px solid var(--border);
	font-size: var(--text-sm);
}

.totals div {
	display: flex;
	justify-content: space-between;
}

.totals .grand {
	padding-top: var(--space-2);
	border-top: 1px dashed var(--border);
	font-size: var(--text-base);
	font-weight: var(--weight-semibold);
}

.typing {
	display: inline-flex;
	gap: var(--space-1);
}

.typing i {
	width: 6px;
	height: 6px;
	border-radius: var(--radius-full);
	background: var(--primary-text);
	animation: blink 1.2s var(--ease-out) infinite;
}

.typing i:nth-child(2) {
	animation-delay: 0.2s;
}

.typing i:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes blink {
	50% {
		opacity: 0.3;
	}
}

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

::view-transition-group(navbar),
::view-transition-group(tabbar),
::view-transition-group(composer) {
	animation: none;
}

::view-transition-old(navbar),
::view-transition-new(navbar) {
	animation-duration: var(--duration-fast);
}

html:active-view-transition-type(push)::view-transition-old(root) {
	animation: vt-out-push var(--duration) var(--ease-out) both;
}

html:active-view-transition-type(push)::view-transition-new(root) {
	animation: vt-in-push 280ms var(--ease-out) both;
}

html:active-view-transition-type(back)::view-transition-old(root) {
	animation: vt-out-back var(--duration) var(--ease-out) both;
}

html:active-view-transition-type(back)::view-transition-new(root) {
	animation: vt-in-back 280ms var(--ease-out) both;
}

html:active-view-transition-type(tab)::view-transition-old(root),
html:active-view-transition-type(tab)::view-transition-new(root) {
	animation-duration: var(--duration-fast);
}

@keyframes vt-in-push {
	from {
		translate: calc(var(--vt-sign, 1) * 30%) 0;
		opacity: 0;
	}
}

@keyframes vt-out-push {
	to {
		translate: calc(var(--vt-sign, 1) * -12%) 0;
		opacity: 0;
	}
}

@keyframes vt-in-back {
	from {
		translate: calc(var(--vt-sign, 1) * -12%) 0;
		opacity: 0;
	}
}

@keyframes vt-out-back {
	to {
		translate: calc(var(--vt-sign, 1) * 30%) 0;
		opacity: 0;
	}
}

:root[dir="rtl"] {
	--vt-sign: -1;
}

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

@media (min-width: 600px) {
	body.app {
		max-width: 480px;
		margin-inline: auto;
		box-shadow: 0 0 0 1px var(--border);
	}

	.tabbar,
	.action-bar,
	.composer,
	.status-strip {
		max-width: 480px;
		margin-inline: auto;
	}

	.bsheet {
		max-width: 480px;
		margin-inline: auto;
	}
}

.logo-tile {
	display: inline-grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--muted);
	color: var(--foreground);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
}

.logo-tile.sm {
	width: 24px;
	height: 24px;
	border-radius: var(--radius-sm);
	font-size: var(--text-xs);
}

.hero .logo-tile {
	width: 72px;
	height: 72px;
	border-radius: var(--radius-xl);
	font-size: var(--text-xl);
}

body.surface-card,
body.surface-card .status-strip {
	background: var(--card);
}

.thread-title {
	display: grid;
	justify-items: center;
	gap: 0;
	line-height: var(--leading-tight);
}

.thread-title small {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-regular);
}

.thread-title small .icon {
	width: 12px;
	height: 12px;
}

.order-ref .grow {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

a.order-ref:active {
	background: var(--hover);
}

.segmented button[aria-checked="true"] {
	background: var(--background);
	color: var(--foreground);
	box-shadow: var(--shadow-sm);
}

.bsheet-foot .btn-destructive {
	flex: 1;
}

.task-meta a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	color: inherit;
}

.bsheet .hero {
	padding: 0;
}

.navbar.search-bar {
	grid-template-columns: 1fr auto;
	padding-inline: var(--gutter) var(--space-1);
}

button.profile-card {
	width: 100%;
	color: inherit;
	font: inherit;
	text-align: start;
	cursor: pointer;
}

button.profile-card:active {
	background: var(--hover);
}

.cell .segmented button {
	height: var(--control-h-sm);
}

.legal.num {
	padding-block-end: var(--space-4);
}

:root {
	--ask-h: 60px;
}

body.app[data-tab] {
	padding-bottom: calc(var(--tab-h) + var(--ask-h) + var(--safe-bottom) + var(--space-6));
}

body[data-tab] .m-toast {
	inset-block-end: calc(var(--tab-h) + var(--ask-h) + var(--safe-bottom) + var(--space-2));
}

.askbar {
	position: fixed;
	inset-block-end: calc(var(--tab-h) + var(--safe-bottom));
	inset-inline: 0;
	z-index: 29;
	display: flex;
	align-items: center;
	gap: var(--space-2);
	height: var(--ask-h);
	padding-inline: var(--gutter);
	background: var(--canvas);
	view-transition-name: askbar;
}

.ask-field {
	display: flex;
	flex: 1;
	align-items: center;
	gap: var(--space-2);
	min-width: 0;
	height: var(--hit);
	padding-inline: var(--space-2) var(--space-3);
	border: 1px solid color-mix(in oklch, var(--primary), transparent 65%);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-sm);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.ask-field .grow {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ask-field:active {
	background: var(--hover);
}

.ask-mic {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: var(--hit);
	height: var(--hit);
	border: 0;
	border-radius: var(--radius-full);
	background: var(--primary);
	color: var(--primary-foreground);
	box-shadow: var(--shadow-inset);
	cursor: pointer;
}

.ask-mic:active {
	scale: 0.94;
}

::view-transition-group(askbar) {
	animation-duration: 0s;
}

.thinking {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	padding-block: var(--space-2);
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.sheet-steps,
.sheet-steps > [data-step] {
	display: contents;
}

.sheet-steps > [data-step][hidden] {
	display: none;
}

.sheet-steps > .thinking {
	justify-content: center;
	padding: var(--space-10) var(--gutter);
}

.voice {
	display: grid;
	justify-items: center;
	gap: var(--space-3);
	padding-block: var(--space-4);
	text-align: center;
}

.voice-orb {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: var(--radius-full);
	background: var(--primary-soft);
	color: var(--primary-text);
	box-shadow: 0 0 0 8px color-mix(in oklch, var(--primary-soft), transparent 40%);
}

.voice-wave {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	height: 28px;
}

.voice-wave i {
	width: 4px;
	height: 100%;
	border-radius: var(--radius-full);
	background: var(--primary);
	transform-origin: center;
	animation: wave 1s var(--ease-out) infinite alternate;
}

.voice-wave i:nth-child(2n) {
	animation-delay: 0.15s;
}

.voice-wave i:nth-child(3n) {
	animation-delay: 0.3s;
}

.voice-wave i:nth-child(4n) {
	animation-delay: 0.45s;
}

@keyframes wave {
	from {
		scale: 1 0.25;
	}
}

.voice-state {
	color: var(--primary-text);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
}

.voice-text {
	font-size: var(--text-md);
	line-height: var(--leading-normal);
}

.hint {
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
}

.plan-list .cell {
	cursor: pointer;
}

.ask-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.ask-chips .chip {
	height: var(--control-h-sm);
	border-color: color-mix(in oklch, var(--primary), transparent 60%);
	background: var(--card);
	font-size: var(--text-xs);
}

.ask-chips .chip[aria-pressed="true"] {
	border-color: var(--primary);
	background: var(--primary-soft);
	color: var(--primary-soft-foreground);
}

.ask-answer {
	display: grid;
	gap: var(--space-2);
	padding: var(--space-3);
	border-radius: var(--radius-lg);
	background: var(--card);
	box-shadow: var(--shadow-xs);
	font-size: var(--text-sm);
}

.ask-answer ul {
	padding-inline-start: var(--space-5);
}

.ask-answer .agent-actions .btn {
	height: var(--control-h);
	font-size: var(--text-sm);
}

.ask-form {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

.ask-form input {
	flex: 1;
	min-width: 0;
	height: var(--control-h);
	padding-inline: var(--space-3);
	border: 1px solid var(--input);
	border-radius: var(--radius-md);
	background: var(--background);
	font-size: var(--text-sm);
	outline: none;
}

.ask-form input:focus {
	border-color: var(--primary);
}

.ask-form .send {
	width: var(--control-h);
	height: var(--control-h);
}

.approval {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-xs);
}

.approval-head {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.approval-head .meta {
	margin-inline-start: auto;
	color: var(--subtle-foreground);
}

.approval-title {
	font-size: var(--text-base);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
}

.approval-why {
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.approval-draft {
	padding: var(--space-3);
	border-inline-start: 3px solid var(--primary);
	border-radius: var(--radius-md);
	background: var(--muted);
	font-size: var(--text-sm);
	line-height: var(--leading-normal);
}

.approval-to {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
}

.approval-to .avatar {
	width: 24px;
	height: 24px;
	font-size: var(--text-xs);
}

.approval .agent-actions .btn {
	height: var(--control-h);
	font-size: var(--text-sm);
}

.hub-hero {
	display: grid;
	justify-items: center;
	gap: var(--space-2);
	padding: var(--space-4) var(--gutter) var(--space-2);
	text-align: center;
}

.hub-hero h1 {
	font-size: var(--text-xl);
	font-weight: var(--weight-semibold);
	line-height: var(--leading-tight);
	letter-spacing: -0.02em;
}

.hub-hero p {
	color: var(--muted-foreground);
	font-size: var(--text-sm);
}

.hub-composer {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	box-shadow: var(--shadow-sm);
}

.hub-composer textarea {
	min-height: 52px;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	resize: none;
	outline: none;
	field-sizing: content;
}

.hub-composer .composer-row {
	align-items: center;
	justify-content: space-between;
}

.hub-composer .tools {
	display: flex;
	gap: var(--space-1);
}

.hub-composer .send {
	width: var(--hit);
	height: var(--hit);
}

.suggest.wrap {
	flex-wrap: wrap;
	overflow: visible;
}

.stat-strip {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-2);
}

.status-line {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1-5);
}

.spin {
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		rotate: 1turn;
	}
}

.build-card {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
}

.build-card .list {
	border: 0;
	box-shadow: none;
}

.build-steps {
	display: grid;
	gap: var(--space-2);
}

.build-step {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
}

.build-step .grow {
	flex: 1;
}

.followup {
	display: grid;
	gap: var(--space-3);
	padding: var(--space-4);
	border: 1px solid color-mix(in oklch, var(--accent-brand), transparent 50%);
	border-radius: var(--radius-xl);
	background: var(--card);
}

.followup strong {
	font-size: var(--text-sm);
}

.stepbar {
	display: grid;
	gap: var(--space-2);
}

.stepbar span.label {
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	font-weight: var(--weight-medium);
}

.auth-steps,
.auth-steps > [data-step] {
	display: grid;
	align-content: start;
	gap: var(--space-8);
}

.auth-steps > [data-step][hidden] {
	display: none;
}

.research {
	display: grid;
	gap: var(--space-2);
}

.research-row {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--text-sm);
}

.research-row .icon {
	color: var(--primary-text);
}

.otp {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: var(--space-2);
}

.otp input {
	height: 52px;
	padding: 0;
	text-align: center;
	font-size: var(--text-lg);
}

.section-note {
	color: var(--muted-foreground);
	font-size: var(--text-xs);
	padding-inline: var(--space-1);
}

@media (min-width: 600px) {
	.askbar {
		max-width: 480px;
		margin-inline: auto;
	}
}

.approval[data-resolved] {
	display: none;
}

.hero .hero-tile {
	width: 72px;
	height: 72px;
	border-radius: var(--radius-xl);
}

.hero .hero-tile .icon {
	width: 32px;
	height: 32px;
}

.thought {
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
}

.followup .cell-sub,
.followup .cell-sub > span {
	white-space: normal;
}

.btn-danger-text {
	color: var(--destructive-text);
}

.cell-end.notify-pair {
	display: flex;
	gap: var(--space-3);
}

.notify-pair label {
	display: grid;
	justify-items: center;
	gap: var(--space-1);
	color: var(--subtle-foreground);
	font-size: var(--text-xs);
	cursor: pointer;
}

.props .cell-body .input {
	height: var(--control-h);
}

.auth-steps > .thinking {
	justify-content: center;
	padding-block: var(--space-10);
}

.auth-foot {
	display: grid;
	gap: var(--space-3);
}

.auth-top .hero-tile {
	width: 56px;
	height: 56px;
	border-radius: var(--radius-xl);
}

.auth-top .back {
	justify-self: start;
	padding-inline: 0;
}

.label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.link-sm {
	color: var(--primary-text);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.cell.ai-row {
	border: 1px solid color-mix(in oklch, var(--primary), transparent 70%);
	border-radius: var(--radius-xl);
	background: var(--primary-soft);
}

.cell.ai-row .cell-title {
	color: var(--primary-soft-foreground);
}

* {
	scrollbar-width: thin;
	scrollbar-color: var(--scrollbar) transparent;
}

::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	border-radius: var(--radius-full);
	background: var(--scrollbar);
}

::-webkit-scrollbar-thumb:hover {
	background: var(--scrollbar-hover);
}

.bsheet-layer[data-stack] {
	z-index: 55;
}

[data-swap-root]:not([data-on]) [data-when="on"],
[data-swap-root][data-on] [data-when="off"] {
	display: none;
}

.btn[aria-busy="true"] {
	position: relative;
	color: transparent;
	pointer-events: none;
}

.btn[aria-busy="true"] > * {
	visibility: hidden;
}

.btn[aria-busy="true"]::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 16px;
	height: 16px;
	margin: auto;
	border: 2px solid var(--foreground);
	border-inline-end-color: transparent;
	border-radius: var(--radius-full);
	animation: spin 0.8s linear infinite;
}

.btn-primary[aria-busy="true"]::after,
.btn-destructive[aria-busy="true"]::after {
	border-color: var(--primary-foreground);
	border-inline-end-color: transparent;
}

.done-mark {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	color: var(--primary-text);
	font-size: var(--text-sm);
	font-weight: var(--weight-medium);
}

.bulk-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-3) var(--space-4);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	background: var(--card);
	font-size: var(--text-sm);
}
