/* aws-web-hono: the layout the skeleton's pages add on top of ../shared/theme.css. Every value
   is a token (docs/design/design-system.md): no hex, no style attributes, 44px click targets,
   fluid containers so 320, 390 and 1440 all render without a horizontal scroll. */

.page {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

/* Header (the LP Portal Athena design): the firm's mark and name from theme.css's .hdr; the AI
   button, the bell, the avatar and their panels are styled there too, the same in both trees. */
.hdr-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: block;
}
/* Sign-in: one card, centered, fluid up to 420px. */
.signin {
	display: grid;
	place-items: center;
	min-height: 60vh;
}
.signin-card {
	width: 100%;
	max-width: 420px;
	gap: var(--space-4);
	padding: var(--space-6);
}
.signin-title {
	margin: 0;
}
.notice {
	margin: 0;
	padding: var(--space-3);
	border-radius: var(--radius-md);
	background: var(--amber-soft);
	color: var(--amber);
}
.field {
	display: grid;
	gap: var(--space-2);
}
.field-label {
	font-size: var(--type-size-body);
	line-height: var(--type-lh-body);
	color: var(--text-dim);
}
.field input,
.field select {
	font: inherit;
	/* 16px keeps phone browsers from zooming the field (design-system.md, "Carried over"). */
	font-size: 16px;
	width: 100%;
	min-height: var(--touch);
	padding: 0 var(--space-3);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--surface);
	color: var(--text);
}
.signin-button {
	min-height: var(--touch);
}

/* Settings: one card, fluid up to 520px, with the way back above it. */
.settings {
	gap: var(--space-4);
	max-width: 520px;
	margin: 0 auto;
	width: 100%;
}
.settings-card {
	gap: var(--space-4);
	padding: var(--space-6);
}
.settings-title {
	margin: 0;
}
.settings-button {
	min-height: var(--touch);
}
.settings-example {
	margin: 0;
	min-height: var(--type-lh-caption);
	overflow-wrap: anywhere;
}
.back-link {
	display: inline-flex;
	align-items: center;
	min-height: var(--touch);
	color: var(--accent-text);
	font-weight: var(--type-weight-strong);
	text-decoration: none;
	justify-self: start;
}
.notice.success {
	background: var(--green-soft);
	color: var(--green);
}
.field-error {
	color: var(--red);
	font-size: var(--type-size-caption);
	line-height: var(--type-lh-caption);
}
.field select[aria-invalid='true'] {
	border-color: var(--red);
}
/* On a phone the header keeps the initials and the two actions; the signed-in line returns from 480px. */
@media (max-width: 479px) {
	.topbar-name {
		visibility: hidden;
	}
}

/* A password field with its eye button inside the right edge (password-field.tsx). */
.password {
	position: relative;
	display: block;
}
.password input {
	padding-right: calc(var(--touch) + var(--space-1));
}
.password-toggle {
	position: absolute;
	top: 0;
	right: 0;
	width: var(--touch);
	height: 100%;
	min-height: var(--touch);
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--text-dim);
	cursor: pointer;
}
.password-toggle[hidden] {
	display: none;
}
.password-toggle:hover {
	color: var(--text);
}
.password-toggle:focus-visible {
	box-shadow: inset var(--shadow-focus);
}
.password-toggle .eye-closed,
.password-toggle.showing .eye-open {
	display: none;
}
.password-toggle.showing .eye-closed {
	display: block;
}

/* Account (the design's Profile & settings): a row of tabs that scrolls sideways on a phone, then cards. */
.account-title {
	margin: 0;
}
.account-tabs {
	display: flex;
	gap: var(--space-4);
	overflow-x: auto;
	scrollbar-width: none;
	margin: 0 calc(-1 * var(--page-gutter));
	padding: 0 var(--page-gutter);
	border-bottom: 1px solid var(--border-soft);
}
.account-tab {
	flex: none;
	display: inline-flex;
	align-items: center;
	min-height: var(--touch);
	padding: 0;
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	color: var(--text-dim);
	font: inherit;
	font-weight: var(--type-weight-strong);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
.account-tab[aria-current='page'] {
	color: var(--accent-text);
	border-bottom-color: var(--accent);
}
.account-tab[aria-disabled='true'] {
	color: var(--text-mute);
	cursor: not-allowed;
}
.account-tab:focus-visible {
	box-shadow: var(--shadow-focus);
}
.account-card {
	padding: var(--space-6);
	justify-items: start;
}
.card-title {
	margin: 0;
	font-size: var(--type-size-title);
	line-height: var(--type-lh-title);
}
.avatar-lg {
	width: 72px;
	height: 72px;
	font-size: var(--type-size-title);
}
.account-who {
	display: grid;
	gap: 2px;
}
.account-name {
	font-weight: var(--type-weight-strong);
}
.account-action {
	min-height: var(--touch);
}
.account-hint {
	margin: 0;
}

/* Home */
.home {
	gap: var(--space-4);
}
.scope-title {
	margin: 0;
	font-size: var(--type-size-caption);
	line-height: var(--type-lh-caption);
	letter-spacing: var(--type-track-caps);
	text-transform: uppercase;
	color: var(--text-dim);
}
.scope-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--space-1);
}
.scope-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--space-2);
	min-height: var(--touch);
	padding: var(--space-2) var(--space-3);
	border-radius: var(--radius-md);
	color: var(--text);
}
.scope-name {
	min-width: 0;
	overflow-wrap: anywhere;
}
.scope-item.child {
	padding-left: var(--space-8);
	color: var(--text-dim);
}
.scope-item.selected {
	background: var(--accent-soft);
	color: var(--accent-text);
}
.pill.own {
	background: var(--surface-3);
	color: var(--text-dim);
}
.empty {
	margin: 0;
	color: var(--text-mute);
}
.plain p {
	margin: 0;
}

/* Tab bar: theme.css fixes it to the bottom of the phone. A section not built yet stays a real
   link, dimmed and titled, so nothing is faked and nothing is removed. */
.tab {
	min-height: var(--touch);
	padding: 0 var(--space-1);
	text-align: center;
	overflow-wrap: anywhere;
}
.tab[aria-disabled='true'] {
	color: var(--text-mute);
	pointer-events: none;
}
.tab:focus-visible {
	box-shadow: inset var(--shadow-focus);
}

/* From 1024px the tab bar is the rail on the left (shared/theme.css, "Wide screens"). */

/* Which tree this is, on every screen, for the stack comparison (src/stack.ts). Fixed above the
   bottom tab bar and over everything else; it takes no clicks. */
.stack-label {
	position: fixed;
	left: var(--space-2);
	/* Clear of the bottom tab bar with air above it, so the label never touches the bar. */
	bottom: calc(73px + env(safe-area-inset-bottom));
	z-index: 1000;
	margin: 0;
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-pill);
	background: var(--text);
	color: var(--surface);
	font-size: var(--type-size-caption);
	line-height: var(--type-lh-caption);
	font-weight: var(--type-weight-strong);
	pointer-events: none;
}
@media (min-width: 1024px) {
	.stack-label {
		bottom: var(--space-2);
	}
}

/* The request's id under an error message, to quote to support. */
.reference {
	margin: 0;
	overflow-wrap: anywhere;
	user-select: all;
}
