/*
 * TWE Portal - base styles for the dashboard blocks.
 *
 * Deliberately light: fonts are inherited from the theme so the blocks match
 * whatever you design in Elementor. Since 1.4.3-rc.3 the text colors are the
 * portal's own (see the end of this file), so a theme's or Elementor's global
 * text color can't make them unreadable. Change the look site-wide by
 * overriding the custom properties below (for example in Elementor > Custom CSS).
 * The accent colors come from TWE Portal > Settings > Brand colors, printed as an
 * inline style after this file; the values here are the defaults.
 */

.twe-portal {
	--twe-accent: #d4af37;
	--twe-accent-text: #000;
	--twe-border: rgba(0, 0, 0, 0.12);
	--twe-muted: rgba(0, 0, 0, 0.6);
	--twe-surface: #fff;
	--twe-radius: 8px;
	--twe-gap: 20px;
}

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

/*
 * 1.3.3: text must never overlap, whatever the theme does.
 *
 * Some themes and Elementor kits set line-height on p, dd, headings etc. with
 * selectors like ".entry-content p" or ".elementor-kit-5 h3", or in em/px
 * units that are inherited as a fixed size (too small for larger text, which
 * makes wrapped lines draw over each other). Every portal element gets an
 * explicit unitless line-height instead. The doubled class gives these rules
 * a specificity (0,2,0) that beats those theme selectors without !important.
 */
.twe-portal.twe-portal,
.twe-portal.twe-portal * {
	line-height: 1.5;
}

.twe-portal.twe-portal :is(h1, h2, h3, h4, h5, h6),
.twe-portal.twe-portal :is(h1, h2, h3, h4, h5, h6) *,
.twe-portal.twe-portal .twe-card__title,
.twe-portal.twe-portal .twe-dashboard__title {
	line-height: 1.2;
}

.twe-portal.twe-portal .twe-button {
	line-height: 1.4;
}


/* Text blocks keep their natural height: no theme-imposed fixed heights on them. */
.twe-portal.twe-portal :is(p, li, dt, dd, td, th, label, summary, .twe-empty, .twe-notice) {
	height: auto;
	max-height: none;
}

.twe-dashboard {
	display: grid;
	gap: var(--twe-gap);
}

.twe-dashboard__header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
}

.twe-dashboard__label {
	margin: 0 0 4px;
	font-size: 0.8em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--twe-muted);
}

.twe-dashboard__title {
	margin: 0;
}

.twe-card {
	padding: var(--twe-gap);
	border: 1px solid var(--twe-border);
	border-radius: var(--twe-radius);
	background: var(--twe-surface);
}

.twe-portal > .twe-card + .twe-card {
	margin-top: var(--twe-gap);
}

.twe-dashboard > .twe-card + .twe-card {
	margin-top: 0;
}

.twe-card__title {
	margin: 0 0 16px;
}

.twe-empty {
	margin: 0 0 16px;
	color: var(--twe-muted);
}

/* 1.6.0-dev.51: a tax preparer's logo bar on top of a portal page, in their main color. */
.twe-portal.twe-brand-bar {
	margin: 0 0 12px;
	padding: 10px 16px;
	background: var(--twe-accent, #000);
	color: var(--twe-accent-text, #fff);
}

.twe-brand-bar .twe-logo-bar {
	background: transparent;
	padding: 0;
}

.twe-brand-bar .twe-logo-bar__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: inherit;
	text-decoration: none;
}

.twe-brand-bar .twe-logo-bar__img {
	display: block;
	max-height: 52px;
	width: auto;
	max-width: 100%;
}

.twe-brand-bar .twe-logo-bar__name {
	font-size: 22px;
	font-weight: 700;
}

.twe-prep-brand__logo {
	max-height: 64px;
	width: auto;
}

/* 1.6.0-dev.50: a locked group on the consultant dashboard: one greyed line, no panel. */
.twe-locked-line {
	margin: 0 0 8px;
	padding: 6px 10px;
	border-left: 3px solid var(--twe-border, #ccc);
	color: var(--twe-muted);
	font-size: 0.9em;
}

/* 1.6.0-dev.53: the PTIN renewal reminder (from November 1), one line. */
.twe-ptin-renew {
	margin: 0 0 8px;
	padding: 6px 10px;
	border-left: 3px solid var(--twe-accent, #b8860b);
	font-size: 0.9em;
}

/* 1.6.0-dev.53: "Close this client" (folded, with its confirm box). */
.twe-practice-taxclose {
	margin: 12px 0;
}

.twe-practice-taxclose > summary {
	cursor: pointer;
	font-weight: 600;
}

.twe-notice {
	margin: 0;
	padding: 12px 16px;
	border-left: 4px solid var(--twe-accent);
	border-radius: 4px;
	background: rgba(31, 95, 191, 0.08);
}

.twe-notice--success {
	border-left-color: #1a7f45;
	background: rgba(26, 127, 69, 0.08);
}

.twe-notice--error {
	border-left-color: #b3261e;
	background: rgba(179, 38, 30, 0.08);
}

.twe-button {
	display: inline-block;
	padding: 8px 16px;
	border: 0;
	border-radius: 6px;
	background: var(--twe-accent);
	color: var(--twe-accent-text);
	font: inherit;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
}

.twe-button:hover,
.twe-button:focus {
	color: var(--twe-accent-text);
	filter: brightness(0.92);
}

.twe-button--small {
	padding: 4px 12px;
	font-size: 0.9em;
}

.twe-dashboard-links,
.twe-members__list,
.twe-versions {
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-dashboard-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.twe-members__item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	padding: 10px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-members__item:first-child {
	border-top: 0;
}

.twe-members__item.is-selected .twe-members__name {
	font-weight: 700;
}

.twe-members__name {
	flex: 1 1 160px;
}

.twe-members__email {
	flex: 2 1 200px;
	overflow-wrap: anywhere;
}

.twe-document {
	padding: 16px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-document:first-of-type {
	padding-top: 0;
	border-top: 0;
}

.twe-document__main {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.twe-document__info {
	flex: 1 1 260px;
	min-width: 0;
}

.twe-document__title {
	margin: 0 0 4px;
}

.twe-document__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 14px;
	margin: 0;
	font-size: 0.9em;
	color: var(--twe-muted);
	overflow-wrap: anywhere;
}

.twe-portal details {
	margin-top: 12px;
}

.twe-portal summary {
	cursor: pointer;
}

.twe-versions__item {
	padding: 10px 0;
	border-top: 1px dashed var(--twe-border);
}

.twe-versions__note {
	margin: 4px 0;
}

.twe-documents__upload {
	padding-top: 16px;
	border-top: 1px solid var(--twe-border);
}

.twe-upload-form {
	display: grid;
	gap: 12px;
	max-width: 520px;
	margin-top: 12px;
}

.twe-field {
	display: grid;
	gap: 4px;
	margin: 0;
}

.twe-field input[type="text"],
.twe-field textarea {
	width: 100%;
}

.twe-field__hint {
	font-size: 0.85em;
	color: var(--twe-muted);
}

/* ------------------------------------------------------------------
 * Phase 2
 * ------------------------------------------------------------------ */

.twe-portal {
	--twe-success: #1a7f45;
	--twe-danger: #b3261e;
	--twe-warning: #9a6700;
	--twe-soft: rgba(0, 0, 0, 0.04);
	--twe-track: rgba(0, 0, 0, 0.08);
	--twe-track-edge: rgba(0, 0, 0, 0.2);
}

/*
 * Muted text and the empty progress track follow the text color the theme gives the block, so
 * they stay readable on light and dark page backgrounds (dark text on light, light on dark).
 * Browsers without color-mix() keep the dark values above.
 */
@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.twe-portal {
		--twe-muted: color-mix(in srgb, currentColor 70%, transparent);
		--twe-track: color-mix(in srgb, currentColor 14%, transparent);
		--twe-track-edge: color-mix(in srgb, currentColor 35%, transparent);
	}
}

/*
 * Links in the brand accent. Buttons, tabs, sub-tabs, calendar entries and the notification and
 * message lists keep their own styling. Underlined, so links stand out even where the accent is
 * light (for example gold on a white card).
 */
.twe-portal.twe-portal :where(a:not(.twe-button, .twe-tabs__tab, .twe-event, .twe-month__date, .twe-subtabs a, .twe-bell a, .twe-messages__people a)) {
	color: var(--twe-ink, #111);
	text-decoration: underline;
	text-decoration-color: var(--twe-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 2px;
}

/* 1.5.0-dev.19: text that inherits its color (paragraphs, labels, legends) keeps the portal's, even with a class
   of its own, so a kit's ".elementor-kit-5 p" or "label" color (0,1,1) never reaches it; later portal rules of
   the same weight (notices, hints) still set their own. */
.twe-portal.twe-portal :where(p, label, legend) {
	color: inherit;
}

.twe-portal .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.twe-dashboard__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.twe-dashboard__top > .twe-dashboard__header {
	flex: 1 1 280px;
}

.twe-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--twe-gap);
}

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

.twe-tab-panel {
	display: grid;
	gap: var(--twe-gap);
}

.twe-block > .twe-card + .twe-card {
	margin-top: var(--twe-gap);
}

/* Tabs scroll sideways on small screens instead of wrapping into a tall block. */
.twe-tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	border-bottom: 1px solid var(--twe-border);
	scrollbar-width: thin;
}

.twe-tabs__tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-bottom: 3px solid transparent;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.twe-tabs__tab:hover,
.twe-tabs__tab:focus {
	background: var(--twe-soft);
}

.twe-tabs__tab.is-active {
	border-bottom-color: var(--twe-accent);
	font-weight: 700;
}

/*
 * 1.4.1: every tab stays, in its order. Desktop: one compact row (the consultant's ten tabs fit a
 * 1140px content area). Where the row is still too wide, it scrolls sideways and fades at the cut
 * edge as a visible hint (twe-portal.js sets is-overflowing / is-at-end and scrolls the active tab
 * into view). Phones: the tabs wrap into rows of pill buttons, so none is cut off. The active tab is
 * the brand accent (gold) with the accent text color (black). Doubled class: theme link colors.
 */
.twe-portal.twe-portal .twe-tabs {
	position: relative;
	flex-wrap: nowrap;
	gap: 2px;
	margin: 0;
	padding: 0;
	-webkit-overflow-scrolling: touch;
}

.twe-portal.twe-portal .twe-tabs__tab {
	flex: 0 0 auto;
	gap: 5px;
	padding: 10px 10px 9px;
	color: inherit;
	font-size: 0.95em;
	text-decoration: none;
}

.twe-portal.twe-portal .twe-tabs__tab:hover,
.twe-portal.twe-portal .twe-tabs__tab:focus-visible {
	border-bottom-color: var(--twe-accent);
	background: var(--twe-soft);
	color: inherit;
}

.twe-portal.twe-portal .twe-tabs__tab.is-active {
	border-bottom-color: var(--twe-accent);
	color: inherit;
	font-weight: 700;
}

.twe-portal.twe-portal .twe-tabs.is-overflowing:not(.is-at-end) {
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
}

@media (max-width: 600px) {
	.twe-portal.twe-portal .twe-tabs {
		flex-wrap: wrap;
		gap: 6px;
		padding-bottom: 10px;
		overflow: visible;
		-webkit-mask-image: none;
		mask-image: none;
	}

	.twe-portal.twe-portal .twe-tabs__tab {
		padding: 6px 12px;
		border: 1px solid var(--twe-border);
		border-radius: 999px;
		font-size: 0.9em;
	}

	.twe-portal.twe-portal .twe-tabs__tab:hover,
	.twe-portal.twe-portal .twe-tabs__tab:focus-visible {
		border-color: var(--twe-accent);
	}

	.twe-portal.twe-portal .twe-tabs__tab.is-active {
		border-color: var(--twe-accent);
		background: var(--twe-accent);
		color: var(--twe-accent-text);
	}

	/* The count stays readable on the gold pill (the badge's own rule is the 1.3.4 one). */
	.twe-portal.twe-portal .twe-tabs__tab.is-active [class~="twe-badge"] {
		background: var(--twe-accent-text);
		color: var(--twe-accent);
	}
}

/*
 * 1.5.0-dev.7: the Money tab's state. Live: green label with a check in a circle; attention (an account
 * needs reconnecting): amber with "!". The mark is the cue as well as the color. The tooltip sits below
 * the tab row (outside the scrolling row, so it isn't cut off); twe-portal.js shows it on hover, focus
 * and a tap. Test mode: a small grey note in the tab.
 */
.twe-portal.twe-portal .twe-tabs-wrap {
	position: relative;
}

.twe-portal.twe-portal .twe-tabs__tab--live {
	color: var(--twe-success);
}

.twe-portal.twe-portal .twe-tabs__tab--attention {
	color: var(--twe-warning);
}

.twe-portal.twe-portal .twe-tabs__state {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.15em;
	height: 1.15em;
	border-radius: 50%;
	background: var(--twe-success);
	color: #fff;
	font-size: 0.8em;
	font-weight: 700;
	line-height: 1;
}

.twe-portal.twe-portal .twe-tabs__tab--attention .twe-tabs__state {
	background: var(--twe-warning);
}

.twe-portal.twe-portal .twe-tabs__note {
	color: var(--twe-muted);
	font-size: 0.78em;
	font-weight: 400;
}

.twe-portal.twe-portal .twe-tabs__tip {
	position: absolute;
	z-index: 50;
	top: 100%;
	left: 0;
	max-width: min(280px, calc(100vw - 32px));
	margin-top: 4px;
	padding: 6px 10px;
	border-radius: 6px;
	background: #1d2327;
	color: #fff;
	font-size: 0.85em;
	line-height: 1.4;
	white-space: normal;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.twe-portal.twe-portal .twe-tabs__tip[hidden] {
	display: none;
}

@media (max-width: 600px) {
	.twe-portal.twe-portal .twe-tabs__tab--live {
		border-color: var(--twe-success);
	}

	.twe-portal.twe-portal .twe-tabs__tab--attention {
		border-color: var(--twe-warning);
	}

	.twe-portal.twe-portal .twe-tabs__tab--live.is-active,
	.twe-portal.twe-portal .twe-tabs__tab--attention.is-active {
		color: var(--twe-accent-text);
	}
}

.twe-subtabs {
	display: flex;
	gap: 16px;
	margin-bottom: 12px;
}

.twe-subtabs a,
.twe-portal.twe-portal .twe-subtabs a {
	color: inherit; /* 1.5.0-dev.19: doubled, so a kit's link color doesn't win. */
}

.twe-subtabs a.is-active {
	font-weight: 700;
	text-decoration: none;
	border-bottom: 2px solid var(--twe-accent);
}

/* 1.3.4: a small fixed circle (20px) that never stretches with its row; 2+ digits widen it into a short pill. */
.twe-portal.twe-portal .twe-badge {
	display: inline-flex;
	flex: none;
	align-self: center;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: auto;
	min-width: 20px;
	height: 20px;
	max-height: 20px;
	margin: 0;
	padding: 0 5px;
	border-radius: 10px;
	background: var(--twe-accent);
	color: var(--twe-accent-text);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	vertical-align: middle;
	white-space: nowrap;
}

.twe-status {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--twe-soft);
	font-size: 0.8em;
}

.twe-status--done {
	background: rgba(154, 103, 0, 0.12);
}

.twe-status--confirmed {
	background: rgba(26, 127, 69, 0.12);
}

/* 1.4.3-rc.2: "Workshop attendee, not a member yet" in the lender views. */
.twe-status--attendee {
	background: rgba(154, 103, 0, 0.12);
	white-space: normal;
}

.twe-due {
	font-size: 0.85em;
	color: var(--twe-muted);
}

.twe-due.is-overdue {
	color: var(--twe-danger);
	font-weight: 700;
}

.twe-button--ghost {
	background: transparent;
	color: var(--twe-ink, #111); /* 1.5.0-dev.19: never gold text on white; the gold stays as the outline. */
	box-shadow: inset 0 0 0 1px var(--twe-accent);
}

.twe-button--ghost:hover,
.twe-button--ghost:focus {
	color: var(--twe-ink, #111);
}

.twe-button--danger {
	background: var(--twe-danger);
}

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

.twe-button--link:hover,
.twe-button--link:focus {
	color: var(--twe-danger);
}

.twe-button.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.twe-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.twe-form--inline {
	display: inline;
	margin: 0;
}

.twe-form--row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.twe-field input[type="date"],
.twe-field input[type="number"],
.twe-field input[type="file"],
.twe-field select,
.twe-form--row select {
	max-width: 100%;
}

.twe-inline-form {
	margin-top: 12px;
}

.twe-inline-form form {
	display: grid;
	gap: 10px;
	max-width: 520px;
	margin-top: 10px;
}

/* Progress */
.twe-progress__label {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
}

.twe-progress__track {
	height: 12px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--twe-track);
	box-shadow: inset 0 0 0 1px var(--twe-track-edge);
}

.twe-progress__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--twe-accent);
	transition: width 0.3s ease;
}

.twe-progress__hint {
	margin: 6px 0 0;
	font-size: 0.85em;
	color: var(--twe-muted);
}

.twe-mini-progress {
	display: inline-block;
	width: 60px;
	height: 6px;
	margin-right: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--twe-track);
	box-shadow: inset 0 0 0 1px var(--twe-track-edge);
	vertical-align: middle;
}

.twe-mini-progress span {
	display: block;
	height: 100%;
	background: var(--twe-accent);
}

/* Lists */
.twe-task-list,
.twe-session-list,
.twe-resource-list,
.twe-milestones,
.twe-simple-list,
.twe-bell__list,
.twe-colleague__list,
.twe-thread__list,
.twe-messages__people {
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-task,
.twe-session-item,
.twe-resource,
.twe-goal,
.twe-note,
.twe-announcement,
.twe-colleague__note {
	padding: 14px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-task:first-child,
.twe-session-item:first-child,
.twe-resource:first-child,
.twe-colleague__note:first-child {
	border-top: 0;
	padding-top: 0;
}

.twe-task__head,
.twe-goal__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}

.twe-task__title,
.twe-goal__title,
.twe-resource__title,
.twe-note__title,
.twe-announcement__title {
	margin: 0;
}

.twe-task--confirmed .twe-task__title {
	text-decoration: line-through;
	color: var(--twe-muted);
}

.twe-simple-list li {
	padding: 4px 0;
}

.twe-milestone {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
}

.twe-milestone.is-done .twe-milestone__title {
	text-decoration: line-through;
	color: var(--twe-muted);
}

.twe-session-item,
.twe-resource {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
}

.twe-session-item__info,
.twe-resource__info {
	display: flex;
	flex: 1 1 240px;
	flex-direction: column;
	min-width: 0;
}

.twe-session-item .twe-actions,
.twe-resource .twe-actions {
	margin-top: 0;
}

.twe-card__title--spaced {
	margin-top: 24px;
}

.twe-announcement__date {
	margin: 2px 0 8px;
	font-size: 0.85em;
	color: var(--twe-muted);
}

/* Booking slots */
.twe-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 12px 0;
}

.twe-pager__label {
	font-weight: 700;
}

.twe-slots__day {
	margin: 0 0 12px;
	padding: 0;
	border: 0;
}

.twe-slots__day legend {
	margin-bottom: 6px;
	font-weight: 700;
}

.twe-slots__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 8px;
}

.twe-slot {
	position: relative;
	display: block;
	cursor: pointer;
}

.twe-slot input {
	position: absolute;
	opacity: 0;
}

.twe-slot span {
	display: block;
	padding: 8px;
	border: 1px solid var(--twe-border);
	border-radius: 6px;
	text-align: center;
}

.twe-slot input:checked + span {
	border-color: var(--twe-accent);
	background: var(--twe-accent);
	color: var(--twe-accent-text);
}

.twe-slot input:focus-visible + span {
	outline: 2px solid var(--twe-accent);
	outline-offset: 2px;
}

/*
 * 1.4.1: the picked time must show whatever the theme does to radios and labels (Astra styles both).
 * The radio is taken out of the layout; the doubled class beats theme selectors; twe-portal.js also
 * sets .is-selected on the label, so the highlight shows even where :checked + span is overridden.
 */
.twe-portal.twe-portal .twe-slot input[type="radio"] {
	position: absolute;
	margin: 0;
	opacity: 0;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.twe-portal.twe-portal .twe-slot span {
	border: 2px solid var(--twe-border);
	background: transparent;
	color: inherit;
	font-weight: 400;
}

.twe-portal.twe-portal .twe-slot:hover span {
	border-color: var(--twe-accent);
}

.twe-portal.twe-portal .twe-slot input:checked + span,
.twe-portal.twe-portal .twe-slot.is-selected span {
	border-color: var(--twe-accent);
	background: var(--twe-accent);
	color: var(--twe-accent-text);
	font-weight: 700;
}

.twe-slots__submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

.twe-slots__selected {
	font-weight: 700;
}

.twe-slots__selected.is-empty {
	font-weight: 400;
	color: var(--twe-muted);
}

.twe-portal.twe-portal .twe-button:disabled,
.twe-portal.twe-portal .twe-button[aria-disabled="true"] {
	opacity: 0.45;
	cursor: not-allowed;
	filter: none;
}

.twe-session-item__info .twe-status {
	align-self: flex-start;
}

.twe-session-item.is-new {
	padding-right: 10px;
	padding-left: 10px;
	border-left: 4px solid var(--twe-accent);
	border-radius: 4px;
	background: var(--twe-soft);
}

/* Notifications bell */
.twe-bell {
	position: relative;
	margin: 0;
}

.twe-bell__summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--twe-border);
	border-radius: 999px;
	list-style: none;
}

.twe-bell__summary::-webkit-details-marker {
	display: none;
}

.twe-bell__panel {
	position: absolute;
	right: 0;
	z-index: 20;
	width: min(360px, calc(100vw - 32px));
	max-height: 420px;
	margin-top: 8px;
	padding: 12px;
	overflow-y: auto;
	border: 1px solid var(--twe-border);
	border-radius: var(--twe-radius);
	background: var(--twe-surface);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.twe-bell__item {
	display: grid;
	gap: 2px;
	padding: 8px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-bell__item:first-child {
	border-top: 0;
}

.twe-bell__item.is-unread a {
	font-weight: 700;
}

.twe-bell__time {
	font-size: 0.8em;
	color: var(--twe-muted);
}

/*
 * 1.4.1: the bell sits at the bottom of the header row, so its panel opens below the Security and
 * Log out links instead of over them (twe-portal.js closes it on a click outside or Escape). Its
 * links use the text color with a gold underline on hover and a gold mark for unread ones, not the
 * theme's link blue. Doubled class: theme link colors.
 */
.twe-portal.twe-portal .twe-dashboard__top {
	align-items: flex-end;
}

.twe-portal.twe-portal .twe-bell__summary {
	cursor: pointer;
}

.twe-portal.twe-portal .twe-bell[open] > .twe-bell__summary,
.twe-portal.twe-portal .twe-bell__summary:hover {
	border-color: var(--twe-accent);
}

.twe-portal.twe-portal .twe-bell__panel {
	top: 100%;
	color: #000;
	background: #fff;
}

.twe-portal.twe-portal .twe-bell__item a,
.twe-portal.twe-portal .twe-bell__item a:visited {
	color: #000;
	text-decoration: none;
}

.twe-portal.twe-portal .twe-bell__item a:hover,
.twe-portal.twe-portal .twe-bell__item a:focus-visible {
	color: #000;
	text-decoration: underline;
	text-decoration-color: var(--twe-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.twe-portal.twe-portal .twe-bell__item.is-unread {
	padding-left: 10px;
	border-left: 3px solid var(--twe-accent);
}

.twe-portal.twe-portal .twe-bell__panel .twe-bell__time {
	color: rgba(0, 0, 0, 0.6);
}

/* Messages */
.twe-thread__list {
	display: grid;
	gap: 10px;
	max-height: 480px;
	margin-bottom: 12px;
	overflow-y: auto;
}

.twe-thread__message {
	max-width: 85%;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--twe-soft);
}

.twe-thread__message.is-mine {
	justify-self: end;
	background: rgba(31, 95, 191, 0.1);
}

.twe-thread__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	margin: 0 0 4px;
	font-size: 0.85em;
	color: var(--twe-muted);
}

.twe-thread__body p {
	margin: 0 0 6px;
}

.twe-thread__form {
	display: grid;
	gap: 8px;
}

.twe-messages__layout {
	display: grid;
	grid-template-columns: minmax(160px, 220px) 1fr;
	gap: var(--twe-gap);
}

.twe-messages__people li a {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 8px;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
}

.twe-messages__people li.is-active a,
.twe-messages__people li a:hover {
	background: var(--twe-soft);
}

/* Roster table: stacks into cards on phones. */
.twe-table-wrap {
	overflow-x: auto;
}

.twe-table {
	width: 100%;
	border-collapse: collapse;
}

.twe-table th,
.twe-table td {
	padding: 10px 8px;
	border-bottom: 1px solid var(--twe-border);
	text-align: left;
	vertical-align: middle;
}

.twe-member-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 16px;
}

.twe-member-head h3 {
	margin: 0;
}

.twe-checklist {
	margin: 0;
	padding: 0;
	border: 0;
}

.twe-checklist label {
	display: block;
	padding: 2px 0;
}

.twe-hours {
	display: grid;
	gap: 8px;
	margin: 12px 0;
}

.twe-hours__row {
	grid-template-columns: 110px 1fr;
	align-items: center;
}

/* Calendar */
.twe-calendar__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
}

.twe-calendar__bar .twe-card__title {
	margin: 0;
}

.twe-calendar__views {
	display: inline-flex;
	gap: 10px;
	margin-left: auto;
}

.twe-calendar__views a.is-active {
	font-weight: 700;
}

.twe-month__head,
.twe-month__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.twe-month__head span {
	padding: 4px;
	font-size: 0.8em;
	color: var(--twe-muted);
	text-align: center;
}

/*
 * 1.4.1: the weekday headings and the days are ONE 7-column grid (the header row and the day group
 * take no box of their own), so the seven headings always sit on one row, each over its column,
 * whatever the theme does to the inner divs. Headings never wrap. Doubled class: theme rules.
 */
.twe-portal.twe-portal .twe-month {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.twe-portal.twe-portal .twe-month > .twe-month__head,
.twe-portal.twe-portal .twe-month > .twe-month__grid {
	display: contents;
}

.twe-portal.twe-portal .twe-month__head > span {
	display: block;
	min-width: 0;
	padding: 4px 0;
	overflow: hidden;
	font-size: 0.8em;
	font-weight: 700;
	text-align: center;
	text-overflow: clip;
	white-space: nowrap;
	color: var(--twe-muted);
}

.twe-portal.twe-portal .twe-month__cell {
	min-width: 0;
	margin: 0;
}

.twe-month__cell {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-height: 84px;
	padding: 4px;
	overflow: hidden;
	border: 1px solid var(--twe-border);
	border-radius: 4px;
	font-size: 0.8em;
}

.twe-month__cell.is-empty {
	border: 0;
}

.twe-month__date {
	font-weight: 700;
	color: inherit;
	text-decoration: none;
}

.twe-week {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 8px;
}

.twe-week__day h4 {
	margin: 0 0 6px;
	font-size: 0.9em;
}

.twe-event {
	display: block;
	margin-bottom: 3px;
	padding: 2px 6px;
	overflow: hidden;
	border-radius: 4px;
	font-size: 0.85em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.twe-event--booked {
	background: var(--twe-accent);
	color: var(--twe-accent-text);
	text-decoration: none;
}

.twe-event--open {
	background: rgba(26, 127, 69, 0.12);
}

/* Session room */
.twe-session__header {
	margin-bottom: 12px;
}

.twe-session__title {
	margin: 0;
}

.twe-session__when {
	margin: 4px 0 0;
	color: var(--twe-muted);
}

.twe-session__room {
	width: 100%;
	height: min(78vh, 720px);
	min-height: 420px;
	overflow: hidden;
	border-radius: var(--twe-radius);
	background: #000;
}

.twe-account__section {
	padding: 10px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-account__section:first-of-type {
	border-top: 0;
}

.twe-account__section summary {
	font-weight: 700;
}

.twe-account__body {
	margin-top: 10px;
}

/* ------------------------------------------------------------------
 * Phase 3: affiliates and marketing team
 * ------------------------------------------------------------------ */

.twe-copy {
	display: flex;
	gap: 8px;
	align-items: stretch;
	margin: 8px 0;
}

.twe-copy__input {
	flex: 1 1 auto;
	min-width: 0;
	font-family: inherit;
}

/* 1.5.0-dev.39: "Copy" (and "Copied!") on one line, never squeezed by a long link or a theme's word breaking;
   the button keeps the small buttons' text size and stretches to the field's height. */
.twe-portal.twe-portal .twe-copy > .twe-button {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 6.5em;
	padding: 4px 16px;
	white-space: nowrap;
	overflow-wrap: normal;
	word-break: normal;
}

/* 1.5.0-dev.41: "Services you can share": one compact card, a row per service (its name, then the link and "Copy
   link"); the name above the link on phones. Gold buttons, never underlined, whatever the theme does to links. */
.twe-portal.twe-portal .twe-aff-services__hub {
	margin: 0 0 12px;
}

.twe-portal.twe-portal .twe-aff-services a.twe-button,
.twe-portal.twe-portal .twe-aff-services a.twe-button:hover,
.twe-portal.twe-portal .twe-aff-services a.twe-button:focus {
	text-decoration: none;
}

.twe-portal.twe-portal .twe-aff-services__list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 1.5.0-dev.76: the service's name on its own line, then its link box across the whole card (the whole link shown,
   wrapping inside the box), "Copy link" beside it on wide screens and under it on phones. A theme's narrow
   input or textarea widths can't shrink it. */
.twe-portal.twe-portal .twe-aff-services__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 4px;
	margin: 0;
	padding: 0;
}

.twe-portal.twe-portal .twe-aff-services__name {
	display: block;
	margin: 0;
	font-weight: 600;
}

.twe-portal.twe-portal .twe-aff-services .twe-copy {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
	align-items: start;
	width: 100%;
	margin: 0;
	min-width: 0;
}

.twe-portal.twe-portal .twe-aff-services .twe-aff-services__link {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-width: 0;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 6px 8px;
	overflow: auto;
	resize: none;
	field-sizing: content; /* As tall as the link needs; rows="2" where a browser doesn't support it (it scrolls inside). */
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-all;
}

@media (max-width: 600px) {
	.twe-portal.twe-portal .twe-aff-services .twe-copy {
		grid-template-columns: minmax(0, 1fr);
	}

	.twe-portal.twe-portal .twe-aff-services .twe-copy > .twe-button {
		justify-self: start;
	}
}

.twe-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin: 0 0 20px;
}

/* Tiles: label above value as a flex column with a gap, never overlapping. */
.twe-portal.twe-portal .twe-stats__tile {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 6px;
	min-width: 0;
	margin: 0;
	padding: 12px 14px;
	border-radius: var(--twe-radius);
	background: var(--twe-soft);
}

.twe-portal.twe-portal .twe-stats__tile dt,
.twe-portal.twe-portal .twe-stats__tile dd {
	display: block;
	float: none;
	position: static;
	margin: 0;
	padding: 0;
	overflow-wrap: anywhere;
}

.twe-portal.twe-portal .twe-stats__tile dt {
	font-size: 0.8em;
	font-weight: 400;
	line-height: 1.4;
	color: var(--twe-muted);
}

.twe-portal.twe-portal .twe-stats__tile dd {
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.2;
}

/* 1.5.0-dev.39: the Earnings overview's seven labels on one line each, so every tile is the same height and
   the values line up; on narrow screens the tiles wrap to more rows, the labels still don't. */
.twe-portal.twe-portal .twe-aff-earnings .twe-stats {
	grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
}

.twe-portal.twe-portal .twe-aff-earnings .twe-stats__tile {
	padding: 12px;
}

.twe-portal.twe-portal .twe-aff-earnings .twe-stats__tile dt {
	font-size: 0.75em;
	white-space: nowrap;
	overflow-wrap: normal;
}

.twe-chart__title {
	margin: 0 0 8px;
}

/*
 * Chart (1.3.4): ONE 12-column grid shared by the bar row and the label row.
 * Row 1 = bars (the only fixed height; it holds no text), row 2 = month labels,
 * each placed in its column in the markup, so a label always sits directly
 * under its bar on one line. The baseline is drawn across row 1.
 */
.twe-portal.twe-portal .twe-chart {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	grid-template-rows: 160px auto;
	column-gap: 6px;
	row-gap: 4px;
	margin: 0;
	padding: 0;
}

.twe-portal.twe-portal .twe-chart::before {
	content: "";
	grid-column: 1 / -1;
	grid-row: 1;
	align-self: end;
	border-bottom: 1px solid var(--twe-border);
}

.twe-portal.twe-portal .twe-chart__col {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0;
}

.twe-chart__bar {
	display: block;
	width: 100%;
	max-width: 36px;
	border-radius: 4px 4px 0 0;
	background: var(--twe-accent);
}

.twe-portal.twe-portal .twe-chart__label {
	display: block;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	font-size: 0.75em;
	line-height: 1.2;
	text-align: center;
	text-overflow: clip;
	white-space: nowrap;
	color: var(--twe-muted);
}

.twe-subtabs--wrap {
	flex-wrap: wrap;
	gap: 8px 16px;
}

.twe-pre {
	max-height: 260px;
	margin: 6px 0 12px;
	padding: 10px;
	overflow: auto;
	border-radius: 6px;
	background: var(--twe-soft);
	font-family: inherit;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

.twe-template-preview + .twe-template-preview {
	padding-top: 10px;
	border-top: 1px solid var(--twe-border);
}

.twe-status--pending {
	background: rgba(154, 103, 0, 0.12);
}

.twe-status--approved {
	background: rgba(31, 95, 191, 0.12);
}

.twe-status--paid {
	background: rgba(26, 127, 69, 0.12);
}

.twe-status--reversed,
.twe-status--rejected {
	background: rgba(179, 38, 30, 0.12);
}

.twe-checkitem.is-done .twe-task__title {
	color: var(--twe-muted);
}

.twe-promo__code {
	padding: 2px 6px;
	border-radius: 4px;
	background: var(--twe-soft);
}

/* ------------------------------------------------------------------
 * Phase 4: funding and lenders
 * ------------------------------------------------------------------ */

.twe-form-grid,
.twe-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	align-items: end;
}

.twe-filters {
	margin-bottom: 12px;
}

.twe-filters__actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

.twe-field input[type="email"],
.twe-field input[type="url"],
.twe-form-grid input,
.twe-form-grid select,
.twe-filters input,
.twe-filters select {
	width: 100%;
}

.twe-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 10px 16px;
	margin: 0 0 12px;
}

.twe-facts dt {
	font-size: 0.8em;
	color: var(--twe-muted);
}

.twe-facts dd {
	margin: 2px 0 0;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.twe-subhead {
	margin: 16px 0 6px;
}

.twe-prose p {
	margin: 0 0 8px;
}

.twe-consent {
	margin: 0;
	padding: 10px 12px;
	border-left: 3px solid var(--twe-accent);
	background: var(--twe-soft);
	font-size: 0.92em;
}

.twe-fund-optin.is-on {
	border-color: var(--twe-success);
}

/* 1.4.3 dev.29: a refused "Share my profile" shows next to the button. The page jumps to it after the
   redirect; the margin keeps it below a sticky site header, in the middle of the screen. */
.twe-fund-optin__error {
	margin-top: 8px;
	scroll-margin-top: 40vh;
}

.twe-fund-optin__share .twe-field__hint {
	display: block;
	margin-top: 6px;
}

.twe-account-manager {
	margin: 0 0 12px;
}

.twe-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: var(--twe-gap);
}

.twe-market-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.twe-market-card .twe-actions {
	margin-top: auto;
}

.twe-market-card__title {
	margin: 0;
}

.twe-market-card__amount {
	margin: 0;
	font-size: 1.25em;
	font-weight: 700;
}

.twe-market-card__amount span {
	font-size: 0.7em;
	font-weight: 400;
	color: var(--twe-muted);
}

.twe-status--interested,
.twe-status--in_review {
	background: rgba(31, 95, 191, 0.12);
}

.twe-status--offer_made {
	background: rgba(154, 103, 0, 0.12);
}

.twe-status--funded {
	background: rgba(26, 127, 69, 0.12);
}

.twe-status--declined {
	background: rgba(179, 38, 30, 0.12);
}

.twe-bank-link {
	opacity: 0.85;
}

@media (max-width: 782px) {
	/* Narrow screens: smaller labels and gaps, still one row of 12 (never wrapped). */
	.twe-portal.twe-portal .twe-chart {
		grid-template-rows: 120px auto;
		column-gap: 3px;
	}

	.twe-portal.twe-portal .twe-chart__label {
		font-size: 0.65em;
	}
}

@media (max-width: 480px) {
	.twe-portal.twe-portal .twe-chart {
		column-gap: 2px;
	}

	.twe-portal.twe-portal .twe-chart__label {
		font-size: 0.55em;
		letter-spacing: -0.02em;
	}
}

@media (max-width: 782px) {
	.twe-messages__layout {
		grid-template-columns: 1fr;
	}

	.twe-week {
		grid-template-columns: 1fr;
	}

	.twe-month__cell {
		min-height: 56px;
	}

	.twe-month__cell .twe-event--booked {
		white-space: normal;
	}

	.twe-hours__row {
		grid-template-columns: 1fr;
	}

	.twe-table thead {
		display: none;
	}

	.twe-table tr {
		display: block;
		padding: 8px 0;
		border-bottom: 1px solid var(--twe-border);
	}

	.twe-table td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		padding: 4px 0;
		border: 0;
	}

	.twe-table td::before {
		content: attr(data-label);
		font-weight: 700;
	}

	.twe-bell__panel {
		right: auto;
		left: 0;
	}

	.twe-thread__message {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.twe-progress__fill {
		transition: none;
	}
}

/* ------------------------------------------------------------------
 * 1.3.2: affiliate recent activity, credit line
 * ------------------------------------------------------------------ */

.twe-activity__type {
	font-weight: 600;
}

.twe-activity--conversion .twe-activity__type {
	color: var(--twe-success);
}

.twe-activity--signup .twe-activity__type {
	color: var(--twe-ink, #111);
}

.twe-activity__page {
	font-size: 0.85em;
	overflow-wrap: anywhere;
}

.twe-portal.twe-credit {
	display: block;
	margin: 12px 0 0;
	font-size: 0.8em;
	text-align: center;
	color: var(--twe-muted);
}

/* ------------------------------------------------------------------
 * Money tab (development build, staging only): linked accounts, budget, report.
 * ------------------------------------------------------------------ */

.twe-money__test {
	margin-bottom: 12px;
}

.twe-money__nav {
	margin: 0 0 var(--twe-gap);
}

.twe-money-accounts__list,
.twe-money-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-money-account {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-money-account:first-child {
	border-top: 0;
}

.twe-money-account__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.twe-money-account__meta,
.twe-money-account__book,
.twe-money-tiles__plan,
.twe-money-kind {
	font-size: 0.85em;
	color: var(--twe-muted);
}

.twe-money-account--disconnected {
	opacity: 0.7;
}

.twe-money-consent {
	padding: 10px 12px;
	border-left: 3px solid var(--twe-accent);
	background: var(--twe-soft);
	font-size: 0.92em;
}

.twe-money-consent p {
	margin: 0 0 8px;
}

/* 1.5.0-dev.10: the "i" next to "Link a bank account" (hover, focus or a tap; a bottom sheet on phones). */
.twe-info {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	font-size: 1rem;
	font-weight: normal;
}

.twe-info-pair {
	display: inline-flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 4px;
}

.twe-info__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: 0 4px;
	padding: 0;
	border: 1px solid var(--twe-muted);
	border-radius: 50%;
	background: var(--twe-surface);
	color: inherit;
	font: italic 700 14px/1 Georgia, serif;
	cursor: pointer;
}

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

.twe-info__tip {
	display: none;
	position: absolute;
	z-index: 50;
	top: calc(100% + 6px);
	left: -8px;
	width: 20rem;
	max-width: calc(100vw - 48px);
	padding: 10px 12px;
	border: 1px solid var(--twe-border);
	border-radius: var(--twe-radius);
	background: var(--twe-surface);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	color: inherit;
	font-size: 0.88rem;
	line-height: 1.45;
	text-align: left;
	white-space: normal;
}

.twe-info__tip a {
	display: inline-block;
	margin-top: 6px;
}

.twe-info:hover .twe-info__tip,
.twe-info:focus-within .twe-info__tip,
.twe-info.is-open .twe-info__tip {
	display: block;
}

.twe-info.is-dismissed .twe-info__tip {
	display: none;
}

@media (max-width: 600px) {
	.twe-info__tip {
		position: fixed;
		top: auto;
		right: 16px;
		bottom: 16px;
		left: 16px;
		width: auto;
		max-width: none;
	}
}

/* 1.5.0-dev.10: "Who can see my accounts". */
.twe-money-access__pref {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin-bottom: 12px;
}

.twe-money-access__account h4 {
	margin: 16px 0 4px;
	overflow-wrap: anywhere;
}

.twe-money-access__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-money-access__person {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px 12px;
	padding: 10px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-money-access__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.twe-money-access__removed,
.twe-money-access__back {
	margin: 8px 0 0;
}

.twe-money-access__request + .twe-money-access__request {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--twe-border);
}

.twe-money-disconnect summary {
	list-style: none;
	cursor: pointer;
}

.twe-money-disconnect[open] form {
	margin-top: 8px;
}

.twe-money-period {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: var(--twe-gap);
}

.twe-money-period__month {
	display: flex;
	align-items: center;
	gap: 12px;
}

.twe-money-period__month a {
	padding: 2px 8px;
	text-decoration: none;
}

.twe-money-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin: 0 0 var(--twe-gap);
}

.twe-money-tiles > div {
	padding: 12px;
	border-radius: var(--twe-radius);
	background: var(--twe-soft);
}

.twe-money-tiles dt {
	font-size: 0.85em;
	color: var(--twe-muted);
}

.twe-money-tiles dd {
	margin: 2px 0 0;
	font-size: 1.3em;
	font-weight: 700;
}

.twe-money-tiles dd.twe-money-tiles__plan {
	font-size: 0.85em;
	font-weight: 400;
}

.twe-money-table td.is-negative,
.twe-money-tiles dd.is-negative {
	color: var(--twe-danger);
}

.twe-money-table td.is-in {
	color: var(--twe-success);
}

.twe-money-table tr.is-transfer td {
	color: var(--twe-muted);
}

.twe-money-table input[type="text"] {
	width: 7em;
}

.twe-money-recat select {
	max-width: 11em;
}

.twe-money-always {
	font-size: 0.85em;
}

/* 1.5.0-dev.111: the bars take a client brand's series colors (--twe-chart-out: spending and actual, primary;
   --twe-chart-in: income, secondary 1; --twe-chart-plan: the planned mark, secondary 2 or 1). Without a client
   brand: the accent, the success green and near-black. */
.twe-money-bar {
	display: block;
	position: relative;
	height: 6px;
	margin-top: 4px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--twe-track);
	box-shadow: inset 0 0 0 1px var(--twe-track-edge);
}

.twe-money-bar span {
	display: block;
	height: 100%;
	background: var(--twe-chart-out, var(--twe-accent));
}

.twe-money-bar--in span {
	background: var(--twe-chart-in, var(--twe-success));
}

.twe-money-bar i {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 3px;
	transform: translateX(-50%);
	background: var(--twe-chart-plan, var(--twe-ink, #111));
}

.twe-money-list li {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: baseline;
	padding: 6px 0;
	border-top: 1px solid var(--twe-border);
}

.twe-money-list li:first-child {
	border-top: 0;
}

.twe-money-report__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	align-items: baseline;
}

.twe-money-report h4 {
	margin: var(--twe-gap) 0 8px;
}

/* The report prints on its own: no dashboard chrome, buttons or navigation. */
@media print {
	body * {
		visibility: hidden;
	}

	.twe-money-report,
	.twe-money-report * {
		visibility: visible;
	}

	.twe-money-report {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		border: 0;
		box-shadow: none;
	}

	.twe-money-report [data-twe-print] {
		display: none;
	}

	.twe-money-bar {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* Two-step verification (1.4.0, step 7). */
/* 1.6.0-dev.55: two-step screens on a phone: buttons big enough to tap, and code boxes in 16px text (smaller makes a
   phone zoom in when the box is tapped). tests/browser/check-sign-in-keyboards.html checks both at 375 px. */
.twe-mfa .twe-button:not(.twe-button--link),
.twe-mfa-sessions .twe-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	box-sizing: border-box;
}

.twe-mfa input[type="text"],
input[name="twe_code"],
input[name="twe_reauth_code"],
input[name="twe_practice_code"] {
	font-size: 16px;
	min-width: 10em;
	max-width: 100%;
	box-sizing: border-box;
}

/* 1.6.0-dev.55: the app's key on a phone: "Open in authenticator app" and "Copy key". */
.twe-mfa__phone {
	margin: 12px 0;
}

.twe-mfa__copy {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.twe-mfa__key {
	flex: 1 1 14em;
	min-width: 0;
	max-width: 100%;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	letter-spacing: 0.05em;
}

.twe-mfa__qr {
	display: inline-block;
	margin: 12px 0;
	padding: 8px;
	border-radius: 6px;
	background: #ffffff;
}

.twe-mfa__qr svg {
	display: block;
	max-width: 100%;
	width: 220px;
	height: auto;
}

.twe-mfa__steps > li {
	margin-bottom: 16px;
}

.twe-mfa__code-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9em, 1fr));
	gap: 8px;
	margin: 12px 0;
	padding: 0;
	list-style: none;
}

.twe-mfa__code-list code {
	font-size: 1.1em;
	letter-spacing: 0.05em;
}

.twe-mfa__codes {
	margin-bottom: 16px;
	padding: 12px 16px;
	border-left: 4px solid var(--twe-accent);
	border-radius: 4px;
	background: rgba(31, 95, 191, 0.08);
}

.twe-mfa .twe-form,
.twe-mfa-sessions .twe-form,
.twe-mfa-page .twe-form {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px;
	margin: 8px 0;
}

.twe-mfa input[name="twe_code"],
.twe-mfa-page input[name="twe_code"] {
	width: 9em;
	font-size: 1.2em;
	letter-spacing: 0.1em;
}

/*
 * 1.4.1: code forms (backup codes, set-up, email check, verify page). The label's text sits above
 * its field, the field and the button share one baseline row and the same height, and a sentence
 * inside the form takes its own full-width line. Doubled class: Astra styles labels and inputs.
 */
.twe-portal.twe-portal .twe-mfa .twe-form,
.twe-portal.twe-portal .twe-mfa-page .twe-form {
	align-items: flex-end;
	gap: 8px 12px;
}

.twe-portal.twe-portal .twe-mfa .twe-form > p,
.twe-portal.twe-portal .twe-mfa-page .twe-form > p {
	flex: 1 0 100%;
	margin: 0;
}

.twe-portal.twe-portal .twe-mfa .twe-form > label,
.twe-portal.twe-portal .twe-mfa-page .twe-form > label {
	display: flex;
	flex: 0 1 7.5em;
	flex-direction: column;
	gap: 4px;
	min-width: 5.5em;
	margin: 0;
}

.twe-portal.twe-portal .twe-mfa input[name="twe_code"],
.twe-portal.twe-portal .twe-mfa-page input[name="twe_code"],
.twe-portal.twe-portal .twe-mfa .twe-form > .twe-button,
.twe-portal.twe-portal .twe-mfa-page .twe-form > .twe-button {
	min-height: 44px;
	margin: 0;
}

.twe-portal.twe-portal .twe-mfa input[name="twe_code"],
.twe-portal.twe-portal .twe-mfa-page input[name="twe_code"] {
	width: 100%;
	max-width: 9em;
	padding: 6px 10px;
	line-height: 1.2;
}

/* 1.4.1: a field refused for holding an ID or card number keeps its text and is outlined. */
.twe-portal.twe-portal .is-refused {
	border-color: var(--twe-danger);
	outline: 2px solid var(--twe-danger);
	outline-offset: 1px;
	background: rgba(179, 38, 30, 0.04);
}

.twe-portal.twe-portal .twe-field__error {
	display: block;
	margin-top: 4px;
	color: var(--twe-danger);
	font-size: 0.9em;
	font-weight: 700;
}

/*
 * 1.4.1: no blank space between the uploader notice and the form. Themes give paragraphs a bottom
 * margin (Astra: .entry-content p) that beat the notice's own margin; the doubled class wins.
 */
.twe-portal.twe-portal .twe-upload-taxnote,
.twe-portal.twe-portal .twe-upload-staffnote {
	margin: 10px 0 0;
}

.twe-portal.twe-portal .twe-upload-taxnote + .twe-upload-form,
.twe-portal.twe-portal .twe-upload-staffnote + .twe-upload-form {
	margin-top: 10px;
}

.twe-colleague__reminder {
	margin: 12px 0;
	font-weight: 700;
}

/* 1.4.1: the set-up choice (email codes or an app) and "Remember this browser". */
.twe-portal.twe-portal .twe-mfa__lead {
	margin: 0 0 6px;
	font-size: 1.1em;
	font-weight: 700;
}

.twe-portal.twe-portal .twe-mfa__choices {
	display: grid;
	gap: 12px;
	margin: 12px 0;
	padding: 0;
	list-style: none;
}

.twe-portal.twe-portal .twe-mfa__choice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin: 0;
}

.twe-portal.twe-portal .twe-mfa__remember label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
}

.twe-portal.twe-portal .twe-mfa__remember .twe-field__hint {
	display: block;
}

.twe-account__facts {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.twe-account__facts > div {
	min-width: 0;
}

.twe-account__password {
	margin: 0 0 12px;
}

.twe-dashboard__links {
	display: flex;
	gap: 16px;
	align-items: center;
}

/* 1.4.3 step 15: the member intake form (My Intake). */
.twe-portal.twe-portal .twe-intake {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.twe-portal.twe-portal .twe-intake__nav ol {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-portal.twe-portal .twe-intake__step {
	display: inline-block;
	padding: 4px 10px;
	border: 1px solid var(--twe-border);
	border-radius: var(--twe-radius);
	text-decoration: none;
}

.twe-portal.twe-portal .twe-intake__step.is-active {
	border-color: currentColor;
	font-weight: 700;
}

.twe-portal.twe-portal .twe-intake__step.is-done .twe-intake__tick {
	color: var(--twe-success);
}

.twe-portal.twe-portal .twe-intake__q {
	margin: 0 0 16px;
	padding: 12px;
	border: 1px solid var(--twe-border);
	border-radius: var(--twe-radius);
}

.twe-portal.twe-portal .twe-intake__group {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.twe-portal.twe-portal .twe-intake__q input[type="text"],
.twe-portal.twe-portal .twe-intake__q input[type="tel"],
.twe-portal.twe-portal .twe-intake__q input[type="date"],
.twe-portal.twe-portal .twe-intake__q input[type="month"],
.twe-portal.twe-portal .twe-intake__q input[type="number"],
.twe-portal.twe-portal .twe-intake__q select,
.twe-portal.twe-portal .twe-intake__q textarea {
	width: 100%;
	max-width: 32em;
}

.twe-portal.twe-portal .twe-intake__ssn4 {
	max-width: 6em;
	letter-spacing: 0.2em;
}

.twe-portal.twe-portal .twe-intake__choice,
.twe-portal.twe-portal .twe-intake__part {
	display: block;
	margin: 4px 0;
}

.twe-portal.twe-portal .twe-intake__flags {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 8px 0 0;
	color: var(--twe-muted);
	font-size: 0.9em;
}

.twe-portal.twe-portal .twe-intake__entry {
	margin: 0 0 12px;
	padding: 8px 12px;
	border-left: 3px solid var(--twe-border);
}

.twe-portal.twe-portal .twe-intake__members,
.twe-portal.twe-portal .twe-intake__readonly {
	color: var(--twe-muted);
}

.twe-portal.twe-portal .twe-intake__saved.is-error {
	color: var(--twe-danger);
	font-weight: 700;
}

.twe-portal.twe-portal .twe-intake__consent[hidden],
.twe-portal.twe-portal .twe-intake__q[hidden] {
	display: none;
}

/* 1.4.3 step 16: the consultant's read-only Intake tab and the attendee dashboard's access link. */
.twe-portal.twe-portal .twe-intake-view__section th {
	padding-top: 16px;
	font-weight: 700;
}

.twe-portal.twe-portal .twe-intake-view th[scope="row"] {
	width: 35%;
	font-weight: 600;
	vertical-align: top;
}

.twe-portal.twe-portal .twe-intake-view td {
	vertical-align: top;
	overflow-wrap: anywhere;
}

/* 1.4.3 dev.25: "Pick your session" and "Become a member" at the top of the attendee dashboard, the
   credit-expiry line, the sign-up form's "Who referred you?", and the payment welcome page. */
.twe-portal.twe-portal .twe-notice--warning {
	border-left-color: #996800;
	background: rgba(153, 104, 0, 0.08);
}

.twe-portal.twe-portal .twe-attendee__top {
	display: grid;
	gap: var(--twe-gap);
	margin-bottom: var(--twe-gap);
}

.twe-portal.twe-portal .twe-attendee__sessions {
	margin: 0 0 16px;
	padding-left: 20px;
}

.twe-portal.twe-portal .twe-ws-referred[hidden] {
	display: none;
}

.twe-portal.twe-portal .twe-payment-welcome {
	max-width: 640px;
	text-align: center;
}

.twe-portal.twe-portal .twe-payment-welcome__title {
	margin: 0 0 12px;
}

/* 1.4.3 dev.26: "Ready for more?" for members (one card per offered plan). */
.twe-portal.twe-portal .twe-upgrades__list {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.twe-portal.twe-portal .twe-upgrade-offer__price {
	font-weight: 600;
	margin: 0 0 8px;
	/* dev.32: a long price ("$4,995 + 15% of net profit during the business year") wraps inside the card. */
	white-space: normal;
	overflow-wrap: anywhere;
	max-width: 100%;
}

/* dev.33: a control turned off in a read-only switch (the upgrade cards' checkout), with its hint below. */
.twe-portal.twe-portal .twe-button--disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

.twe-portal.twe-portal .twe-readonly-hint {
	display: block;
	margin-top: 6px;
}

/* 1.4.3-rc.3: "Back to website" at the top left of a portal page (no theme header there). The label is a
   tooltip on hover and keyboard focus, and sits next to the arrow on small and touch screens. */
.twe-portal.twe-portal .twe-back {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	color: var(--twe-ink, #111);
	text-decoration: none;
	line-height: 1.2;
}

.twe-portal.twe-portal .twe-back__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	background: var(--twe-accent);
	color: var(--twe-accent-text);
	flex: none;
}

.twe-portal.twe-portal .twe-back:focus {
	outline: none;
}

.twe-portal.twe-portal .twe-back:focus-visible .twe-back__icon {
	outline: 3px solid var(--twe-accent);
	outline-offset: 3px;
}

.twe-portal.twe-portal .twe-back__label {
	position: absolute;
	left: calc(100% + 8px);
	top: 50%;
	transform: translateY(-50%);
	padding: 4px 10px;
	border-radius: 6px;
	background: var(--twe-accent);
	color: var(--twe-accent-text);
	font-size: 0.85em;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.twe-portal.twe-portal .twe-back:hover .twe-back__label,
.twe-portal.twe-portal .twe-back:focus-visible .twe-back__label {
	opacity: 1;
	visibility: visible;
}

@media (max-width: 600px), (hover: none) {
	.twe-portal.twe-portal .twe-back__label {
		position: static;
		transform: none;
		padding: 0;
		background: none;
		color: var(--twe-ink, #111);
		opacity: 1;
		visibility: visible;
	}
}

.twe-portal.twe-back-bar {
	margin: 0 0 12px;
}

.twe-dashboard__header .twe-back {
	display: inline-flex;
}

/* 1.5.0-dev.19: headings are near-black (#111, 18.9:1 on white), no longer the accent: gold is an accent only
   (underlines, borders, the active tab's background behind black text, text on black), never text on white.
   1.4.3-rc.3: the portal's own text colors, so a theme's or Elementor's global "Text" color (a pale gold on
   live) never reaches the dashboards. Body text dark gray (#333, 12.6:1 on white), muted text #595959
   (7:1), headings in the accent color setting; buttons keep the accent and "Text on accent". Everything is
   scoped to .twe-portal; the doubled class (0,2,x) beats Elementor kit selectors such as
   ".elementor-kit-5 h2" without !important. */
.twe-portal.twe-portal {
	--twe-text: #333;
	--twe-muted: #595959;
	--twe-ink: #111;
	--twe-heading: var(--twe-ink);
	color: var(--twe-text);
}

/* Plain text elements a kit may color directly (".elementor-kit-5 p"): back to the portal's text color. */
.twe-portal.twe-portal :is(p, li, dt, dd, td, th, label, summary, legend, figcaption, small, strong, em, b, i, span, div, caption):not([class]) {
	color: inherit;
}

.twe-portal.twe-portal :is(h1, h2, h3, h4, h5, h6) {
	color: var(--twe-heading);
}

.twe-portal.twe-portal :is(.twe-empty, .twe-field__hint, .twe-dashboard__label, .twe-due, .twe-facts dt, .twe-document__meta, .twe-progress__hint, .twe-thread__meta, .twe-session__when, .twe-announcement__date, .twe-bell__time) {
	color: var(--twe-muted);
}

/* 1.4.3-rc.4: notices can be closed (×). The dashboard's space between blocks becomes each block's own
   bottom margin (the same 20px as the grid gap was), so a closing notice folds its space away with it and
   nothing below jumps. */
.twe-dashboard {
	gap: 0;
}

.twe-dashboard > :not(:last-child) {
	margin-bottom: var(--twe-gap);
}

.twe-portal .twe-notice--dismissible {
	position: relative;
	padding-right: 48px;
}

.twe-portal.twe-portal .twe-notice__close {
	position: absolute;
	top: 6px;
	right: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.twe-portal.twe-portal .twe-notice__close:hover {
	background: rgba(0, 0, 0, 0.07);
}

.twe-portal.twe-portal .twe-notice__close:focus {
	outline: none;
}

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

.twe-portal.twe-portal .twe-notice__form {
	display: inline;
	margin: 0;
	padding: 0;
}

.twe-portal.twe-portal .twe-notice.is-closing {
	overflow: hidden;
	max-height: 0 !important;
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
	padding-bottom: 0;
	opacity: 0;
	transition: max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
	.twe-portal.twe-portal .twe-notice.is-closing {
		transition: none;
	}
}

/* 1.4.3-rc.7: the portal footer line on portal pages (the site footer is hidden there). Centered, muted
   #595959 (7:1 on white, the rc.3 muted color), links the same color and underlined, smaller on phones. */
.twe-portal.twe-portal.twe-portal-footer {
	max-width: 1100px;
	margin: 32px auto 16px;
	padding: 12px 16px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	text-align: center;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--twe-muted);
}

.twe-portal.twe-portal.twe-portal-footer p {
	margin: 0;
	color: var(--twe-muted);
	font-size: inherit;
}

.twe-portal.twe-portal.twe-portal-footer a {
	color: var(--twe-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.twe-portal.twe-portal.twe-portal-footer a:hover,
.twe-portal.twe-portal.twe-portal-footer a:focus-visible {
	color: var(--twe-text);
}

.twe-portal.twe-portal.twe-portal-footer a:focus-visible {
	outline: 2px solid var(--twe-accent);
	outline-offset: 2px;
}

.twe-portal-footer__dot {
	margin: 0 0.35em;
}

/* 1.6.0-dev.57: white label (a tax preparer's client): the company's only mention, one line at the very bottom,
   smaller and lighter than the links (#767676: 4.5:1 on white, still readable). */
.twe-portal.twe-portal.twe-portal-footer p.twe-portal-footer__credit {
	margin: 6px 0 0;
	font-size: 0.75em;
	color: #767676;
}

/* rc.8: each item stays whole; a narrow screen breaks only between items. */
.twe-portal-footer__item {
	display: inline-block;
}

@media (max-width: 600px) {
	.twe-portal.twe-portal.twe-portal-footer {
		margin-top: 24px;
		font-size: 0.75rem;
	}

	/* rc.8: on phones the copyright and the credit each take a row, then Terms · Privacy · Support. */
	.twe-portal-footer__item--row {
		display: block;
	}

	.twe-portal-footer__dot--row {
		display: none;
	}
}

/* 1.5.0-dev.21: e-signatures. The document scrolls inside its own box, so reaching its end can be seen; dark text
   on white; the hash wraps anywhere; the PDF view fills the width. */
.twe-portal.twe-portal .twe-esign__doc {
	max-height: 60vh;
	overflow-y: auto;
	padding: 16px;
	border: 1px solid var(--twe-border);
	border-radius: var(--twe-radius);
	background: #fff;
	color: var(--twe-text);
	line-height: 1.6;
}

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

.twe-portal.twe-portal .twe-esign__end {
	color: var(--twe-muted);
	font-style: italic;
}

.twe-portal.twe-portal .twe-esign__consent {
	padding: 12px 16px;
	border-left: 4px solid var(--twe-accent);
	background: var(--twe-soft);
}

.twe-portal.twe-portal .twe-esign__pdf {
	width: 100%;
	height: 70vh;
	border: 1px solid var(--twe-border);
}

.twe-portal.twe-portal .twe-esign-hash {
	display: block;
	color: var(--twe-muted);
	font-family: ui-monospace, Consolas, monospace;
	font-size: 0.8em;
	overflow-wrap: anywhere;
}

.twe-portal.twe-portal .twe-esign-card__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-portal.twe-portal .twe-esign-card__list li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--twe-border);
}

/* 1.5.0-dev.22: placed fields. A form's page is its image with the boxes over it, sized in percent of the page so
   they stay on their place at any width; inputs dark on a pale fill, focus clearly outlined. */
.twe-portal.twe-portal .twe-esign__doc--pages {
	padding: 8px;
	background: var(--twe-soft);
}

.twe-portal.twe-portal .twe-esign-page {
	position: relative;
	width: 100%;
	margin: 0 0 12px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.twe-portal.twe-portal .twe-esign-page img {
	display: block;
	width: 100%;
	height: 100%;
}

.twe-portal.twe-portal .twe-esign-field--placed {
	position: absolute;
	box-sizing: border-box;
	min-width: 0;
	margin: 0;
	padding: 0 2px;
	border: 1px solid #1f4e9c;
	border-radius: 2px;
	background: rgba(255, 248, 214, 0.92);
	color: #111;
	font-size: clamp(8px, 1.4vw, 13px);
	line-height: 1;
}

.twe-portal.twe-portal .twe-esign-field--placed:focus {
	outline: 3px solid #1f4e9c;
	outline-offset: 1px;
	z-index: 2;
}

.twe-portal.twe-portal .twe-esign-field--filled,
.twe-portal.twe-portal .twe-esign-field--auto {
	display: flex;
	align-items: center;
	overflow: hidden;
	white-space: nowrap;
}

.twe-portal.twe-portal .twe-esign-field--filled {
	border-style: dotted;
	background: rgba(255, 255, 255, 0.85);
}

.twe-portal.twe-portal .twe-esign-field--auto {
	border-style: dashed;
	background: rgba(225, 235, 252, 0.92);
	font-style: italic;
}

.twe-portal.twe-portal input.twe-esign-field:not(.twe-esign-field--placed) {
	min-width: 10em;
	padding: 2px 6px;
}

.twe-portal.twe-portal span.twe-esign-field:not(.twe-esign-field--placed) {
	padding: 0 4px;
	border-bottom: 1px dashed var(--twe-muted);
	font-style: italic;
}

/* 1.5.0-dev.26: loan affordability (Funding tab). */
.twe-capacity-figures { display: grid; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.twe-capacity-figure { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; justify-content: space-between; border-bottom: 1px solid rgba(0, 0, 0, 0.08); padding-bottom: 0.35rem; }
.twe-capacity-figure dt { font-weight: 600; }
.twe-capacity-figure dd { margin: 0; }
.twe-capacity-estimate, .twe-capacity-practice { display: inline-block; font-size: 0.8em; opacity: 0.85; }
.twe-capacity-practice { font-weight: 600; }
.twe-capacity-scenarios-wrap { overflow-x: auto; max-width: 100%; }
.twe-capacity-scenarios { border-collapse: collapse; min-width: 100%; }
.twe-capacity-scenarios th, .twe-capacity-scenarios td { padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
.twe-capacity-scenarios form { margin: 0.35rem 0 0; }
.twe-field__money { display: inline-flex; align-items: center; gap: 0.25rem; }

/* 1.5.0-dev.47: documents requested (the client's Documents tab), phone first. */
.twe-portal.twe-portal .twe-docreq__progress { margin: 0 0 0.25rem; }
.twe-portal.twe-portal .twe-docreq__list { margin: 0.75rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.75rem; }
.twe-portal.twe-portal .twe-docreq__item { margin: 0; padding: 0.75rem; border: 1px solid var(--twe-track); border-left: 4px solid var(--twe-warning); border-radius: 6px; min-width: 0; overflow-wrap: anywhere; }
.twe-portal.twe-portal .twe-docreq__item--uploaded { border-left-color: var(--twe-accent); }
.twe-portal.twe-portal .twe-docreq__item--received { border-left-color: var(--twe-success); }
.twe-portal.twe-portal .twe-docreq__item--na { border-left-color: var(--twe-track-edge); }
.twe-portal.twe-portal .twe-docreq__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 0.75rem; }
.twe-portal.twe-portal .twe-docreq__status--needed { background: rgba(154, 103, 0, 0.12); }
.twe-portal.twe-portal .twe-docreq__status--received { background: rgba(26, 127, 69, 0.14); }
.twe-portal.twe-portal .twe-docreq__note,
.twe-portal.twe-portal .twe-docreq__reason,
.twe-portal.twe-portal .twe-docreq__bank { margin: 0.4rem 0 0; }
.twe-portal.twe-portal .twe-docreq__files { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.twe-portal.twe-portal .twe-docreq__upload,
.twe-portal.twe-portal .twe-docreq__form { max-width: 520px; margin-top: 0.5rem; display: grid; gap: 0.5rem; }
.twe-portal.twe-portal .twe-docreq__item input[type="text"],
.twe-portal.twe-portal .twe-docreq__item input[type="file"] { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 44px; font-size: 16px; }
.twe-portal.twe-portal .twe-docreq__item .twe-button { box-sizing: border-box; min-height: 44px; }
.twe-portal.twe-portal .twe-docreq__na,
.twe-portal.twe-portal .twe-docreq__bankform { margin-top: 0.5rem; }
.twe-portal.twe-portal .twe-docreq__na summary,
.twe-portal.twe-portal .twe-docreq__bankform summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.twe-portal.twe-portal .twe-docreq__type { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.twe-portal.twe-portal .twe-docreq__type label { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; }

@media (max-width: 600px) {
	.twe-portal.twe-portal .twe-docreq__item .twe-button { width: 100%; }
}

/* 1.5.0-dev.50: the tax questionnaire, phone first: one question a screen. */
.twe-portal.twe-taxintake { position: relative; overflow-x: hidden; max-width: 560px; margin: 0 auto; }
.twe-portal.twe-portal .twe-taxintake__card { box-sizing: border-box; width: 100%; min-width: 0; overflow-wrap: anywhere; }
.twe-portal.twe-portal .twe-taxintake__top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.twe-portal.twe-portal .twe-taxintake__back { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 1.5rem; line-height: 1; text-decoration: none; color: inherit; }
.twe-portal.twe-portal .twe-taxintake__progress { flex: 1; min-width: 0; }
.twe-portal.twe-portal .twe-taxintake__bar { border-radius: 2px; background: var(--twe-track); overflow: hidden; }
.twe-portal.twe-portal .twe-taxintake__bar span { display: block; min-height: 4px; background: var(--twe-accent); transition: width 0.24s ease; }
.twe-portal.twe-portal .twe-taxintake__count { margin: 0.25rem 0 0; font-size: 0.8125rem; }
.twe-portal.twe-portal .twe-taxintake__section { margin: 0 0 0.25rem; font-size: 0.875rem; font-weight: 600; }
.twe-portal.twe-portal .twe-taxintake__q { display: block; margin: 0 0 0.75rem; padding: 0; border: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.3; outline: none; }
.twe-portal.twe-portal .twe-taxintake__form { display: grid; gap: 0.5rem; margin: 0.5rem 0 0; }
.twe-portal.twe-portal .twe-taxintake__form input[type="text"],
.twe-portal.twe-portal .twe-taxintake__form input[type="tel"],
.twe-portal.twe-portal .twe-taxintake__form input[type="email"],
.twe-portal.twe-portal .twe-taxintake__form input[type="date"],
.twe-portal.twe-portal .twe-taxintake__form input[type="number"],
.twe-portal.twe-portal .twe-taxintake__form input[type="file"],
.twe-portal.twe-portal .twe-taxintake__form textarea { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 48px; font-size: 16px; }
.twe-portal.twe-portal .twe-taxintake__choices { margin: 0; padding: 0; border: 0; display: grid; gap: 0.5rem; min-width: 0; }
.twe-portal.twe-portal .twe-taxintake__choice { display: flex; align-items: center; gap: 0.625rem; box-sizing: border-box; min-height: 52px; padding: 0.5rem 0.75rem; border: 1px solid var(--twe-track-edge); border-radius: 8px; cursor: pointer; font-size: 1rem; }
.twe-portal.twe-portal .twe-taxintake__choice input { flex: none; min-width: 22px; min-height: 22px; margin: 0; }
.twe-portal.twe-portal .twe-taxintake__choice:has(input:checked) { border-color: var(--twe-accent); box-shadow: inset 0 0 0 1px var(--twe-accent); }
.twe-portal.twe-portal .twe-taxintake__actions { position: sticky; bottom: 0; display: grid; gap: 0.5rem; padding: 0.75rem 0; background: #fff; }
.twe-portal.twe-taxintake.twe-taxintake .twe-button { box-sizing: border-box; width: 100%; min-height: 48px; text-align: center; font-size: 1rem; }
.twe-portal.twe-taxintake.twe-taxintake .twe-button--small { width: auto; min-height: 44px; }
.twe-portal.twe-portal .twe-taxintake__next { margin: 0.75rem 0 0; }
.twe-portal.twe-taxintake--js .twe-taxintake__form--auto .twe-taxintake__nextbtn { display: none; }
.twe-portal.twe-taxintake--js[data-input="keyboard"] .twe-taxintake__form--auto .twe-taxintake__nextbtn { display: block; }
.twe-portal.twe-portal .twe-taxintake__doc { margin-top: 0.75rem; }
.twe-portal.twe-portal .twe-taxintake__files { margin: 0.5rem 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.twe-portal.twe-portal .twe-taxintake__files li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; }
.twe-portal.twe-portal .twe-taxintake__file { min-width: 0; }
.twe-portal.twe-portal .twe-taxintake__remove { margin: 0; }
.twe-portal.twe-portal .twe-taxintake__saved { margin: 0 0 0.5rem; }
.twe-portal.twe-portal .twe-taxintake__group { margin: 1.25rem 0 0.5rem; }
.twe-portal.twe-portal .twe-taxintake__still { margin: 0; padding-left: 1.1rem; }
.twe-portal.twe-portal .twe-taxintake__still a { display: inline-flex; align-items: center; min-height: 44px; }
.twe-portal.twe-portal .twe-taxintake__dropped { margin: 0.75rem 0; padding: 0.625rem 0.75rem; border-left: 4px solid var(--twe-warning); }
.twe-portal.twe-portal .twe-taxintake__dropped p { margin: 0 0 0.25rem; }
.twe-portal.twe-portal .twe-taxintake__dropped ul { margin: 0; padding-left: 1.1rem; }
.twe-portal.twe-portal .twe-taxintake__answers { margin: 0; }
.twe-portal.twe-portal .twe-taxintake__answer { padding: 0.5rem 0; border-bottom: 1px solid var(--twe-track); }
.twe-portal.twe-portal .twe-taxintake__answer dt { font-size: 0.875rem; }
.twe-portal.twe-portal .twe-taxintake__answer dd { margin: 0.125rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.twe-portal.twe-portal .twe-taxintake__value { font-weight: 600; min-width: 0; }
.twe-portal.twe-portal .twe-taxintake__change { margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; }
.twe-portal.twe-portal .twe-taxintake__pencil { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: inherit; }

/* The slide: the finished question leaves to the left, the next arrives from the right; going back, the other way. */
.twe-portal.twe-taxintake--moving { min-height: 60vh; }
.twe-portal.twe-portal .twe-taxintake__card--out-left,
.twe-portal.twe-portal .twe-taxintake__card--out-right { position: absolute; left: 0; right: 0; pointer-events: none; }
.twe-portal.twe-portal .twe-taxintake__card--out-left { animation: twe-ti-out-left 0.24s ease forwards; }
.twe-portal.twe-portal .twe-taxintake__card--out-right { animation: twe-ti-out-right 0.24s ease forwards; }
.twe-portal.twe-portal .twe-taxintake__card--in-right { animation: twe-ti-in-right 0.24s ease; }
.twe-portal.twe-portal .twe-taxintake__card--in-left { animation: twe-ti-in-left 0.24s ease; }
@keyframes twe-ti-out-left { to { transform: translateX(-100%); opacity: 0; } }
@keyframes twe-ti-out-right { to { transform: translateX(100%); opacity: 0; } }
@keyframes twe-ti-in-right { from { transform: translateX(100%); opacity: 0; } }
@keyframes twe-ti-in-left { from { transform: translateX(-100%); opacity: 0; } }
@keyframes twe-ti-fade-out { to { opacity: 0; } }
@keyframes twe-ti-fade-in { from { opacity: 0; } }

/* The phone's "reduce motion": a fade instead. */
@media (prefers-reduced-motion: reduce) {
	.twe-portal.twe-portal .twe-taxintake__card--out-left,
	.twe-portal.twe-portal .twe-taxintake__card--out-right { animation-name: twe-ti-fade-out; }
	.twe-portal.twe-portal .twe-taxintake__card--in-left,
	.twe-portal.twe-portal .twe-taxintake__card--in-right { animation-name: twe-ti-fade-in; }
	.twe-portal.twe-portal .twe-taxintake__bar span { transition: none; }
}

/* 1.5.0-dev.51: a tax document's Download, with its reason. */
.twe-doc-reason { margin-top: 6px; max-width: 100%; min-width: 0; }
.twe-doc-reason summary { cursor: pointer; min-height: 32px; }
.twe-doc-reason form { display: grid; gap: 6px; margin: 6px 0 0; min-width: 0; }
.twe-doc-reason input[type="text"] { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; }

/* 1.5.0-dev.57: the Security acknowledgment card. One card; the statement set off like the e-sign consent; the typed
   signature in the signed record's font (Times Italic). */
.twe-portal.twe-portal .twe-staff-ack__docs { margin: 0 0 12px; padding-left: 20px; }
.twe-portal.twe-portal .twe-staff-ack__docs li { margin: 4px 0; }
.twe-portal.twe-portal .twe-staff-ack__dl { margin-left: 10px; font-size: 0.9em; } /* 1.6.0-dev.57 */
.twe-portal.twe-portal .twe-staff-ack__seen { margin-left: 6px; color: var(--twe-muted); font-size: 0.9em; }
.twe-portal.twe-portal .twe-staff-ack__text { margin: 12px 0; padding: 12px 16px; border-left: 4px solid var(--twe-accent); background: var(--twe-soft); color: var(--twe-text); line-height: 1.6; }
.twe-portal.twe-portal .twe-staff-ack__text p { margin: 0; }
.twe-portal.twe-portal .twe-staff-ack__sig { display: inline-block; min-width: 240px; max-width: 100%; padding: 4px 0; border-bottom: 1px solid var(--twe-border); font-family: "Times New Roman", Times, serif; font-style: italic; font-size: 1.4em; color: var(--twe-text); overflow-wrap: anywhere; }
.twe-portal.twe-portal .twe-staff-ack input[type="text"] { box-sizing: border-box; width: 100%; max-width: 420px; }
.twe-portal.twe-portal .twe-staff-ack input[readonly] { background: var(--twe-soft); }

/* 1.5.0-dev.72: a tax client's demo: one short line under the page title (no banner). */
.twe-tax-demo-line {
	margin: 0 0 16px;
}
/* 1.5.0-dev.105: a service client's demo: one bar with "Become a member" and the way back to My Services. */
.twe-service-demo-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:12px 16px;border-left:4px solid var(--twe-accent,#d4af37);background:var(--twe-soft,#f6f6f6)}
.twe-service-demo-bar span{flex:1 1 280px}
.twe-service-demo-bar .twe-button{margin:0}
.twe-service-demo-bar__back{display:inline-flex;align-items:center;min-height:44px}

/* 1.5.0-dev.75: "Text this link" (TWE_Portal_SMS_Link). */
.twe-sms{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0 0}
.twe-sms [hidden]{display:none !important}
.twe-sms__note{flex-basis:100%;margin:0}
.twe-share-sms{margin:12px 0}
.twe-founding-new .twe-sms{margin:0 0 12px}
/* 1.5.0-dev.75: the Community Affordability Network tick box message, right under the box. */
.twe-can__ack-error{display:block;margin:4px 0 8px 28px}
.twe-can-join .twe-can__ack{display:block;margin:8px 0}
/* 1.5.0-dev.94: "Request a consultation": the button opens the short form in place (no pop-up). */
.twe-consult__ask > summary{list-style:none;display:inline-block;cursor:pointer}
.twe-consult__ask > summary::-webkit-details-marker{display:none}
.twe-consult__ask[open] > summary{margin-bottom:12px}
.twe-consult__form fieldset{border:0;margin:0 0 12px;padding:0}
.twe-consult__form legend{font-weight:600;margin-bottom:4px}
.twe-consult__form .twe-check{display:inline-block;margin:0 14px 6px 0;white-space:nowrap}
.twe-consult__form select,.twe-consult__form textarea{width:100%;max-width:420px;box-sizing:border-box}
.twe-consult-list form{margin:0 0 8px}
.twe-consult-list label{display:inline-block;margin:0 8px 6px 0}
/* 1.5.0-dev.95: "Already have an account? Log in" over the purchase form; the login page's sign-up links and plans note. */
.twe-join__login{margin:0 0 16px;font-size:1rem}
.twe-join__login a{font-weight:600;text-decoration:underline}
.twe-join__links{margin:16px 0 0}
.twe-join__links p{margin:0 0 8px}
.twe-join__links a{font-weight:600}
.twe-join__plans{margin:0 0 16px}
/* 1.5.0-dev.98: the one-page workshop sign-up ([twe_workshop_register]): one column, thumb-sized controls (16px text so iOS doesn't zoom). */
.twe-reg{max-width:520px}
.twe-reg__form .twe-field{margin:0 0 14px}
.twe-reg__form .twe-field label{display:block;font-weight:600;margin:0 0 4px}
.twe-reg__form input[type="text"],.twe-reg__form input[type="email"],.twe-reg__form input[type="password"]{width:100%;box-sizing:border-box;min-height:44px;font-size:16px;padding:8px 10px}
.twe-reg__password-row{display:flex;gap:8px;align-items:stretch}
.twe-reg__password-row input{flex:1 1 auto;min-width:0}
.twe-reg__show{flex:0 0 auto;min-height:44px}
.twe-reg__sessions{border:0;margin:0 0 14px;padding:0}
.twe-reg__sessions legend{font-weight:600;margin:0 0 6px;padding:0}
.twe-reg__session{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;min-height:44px;padding:8px 10px;margin:0 0 6px;border:1px solid currentColor;border-radius:6px;cursor:pointer}
.twe-reg__session input{margin:0}
.twe-reg__session-topic{font-weight:600}
.twe-reg__consent label,.twe-reg__sms label{display:flex;gap:8px;align-items:flex-start;line-height:1.4;}
.twe-reg__consent input,.twe-reg__sms input{margin:4px 2px 0;flex:0 0 auto;transform:scale(1.25);}
.twe-reg__submit{width:100%;min-height:48px;font-size:1.05rem}
.twe-reg__hp{position:absolute;left:-10000px;width:1px;overflow:hidden;clip-path:inset(50%);}
.twe-reg__turnstile{margin:0 0 12px}
.twe-reg__signin,.twe-reg__explore{font-size:.95rem}
.twe-reg__title{margin:0 0 8px}
/* 1.5.0-dev.99: returning people on the one-page sign-up. */
.twe-reg__signin-top{margin:0 0 14px}
.twe-reg__signin-top .twe-button{width:100%;min-height:44px;box-sizing:border-box;text-align:center}
.twe-reg__known[hidden]{display:none}
.twe-reg__known,.twe-reg__link{margin:0 0 14px}
.twe-reg__choice{margin:0 0 10px}
.twe-reg__choice .twe-button,.twe-reg--match .twe-button{width:100%;min-height:48px;box-sizing:border-box;text-align:center}
.twe-reg__contact{margin:0 0 10px}
.twe-mfa__not-you{font-size:.95rem}
/* 1.5.0-dev.127: the BOT Affiliate Agreement pop-up and the W-9 card. */
.twe-aff-sign{max-width:760px;width:calc(100% - 32px);box-sizing:border-box;padding:var(--twe-gap);border:1px solid var(--twe-border);border-radius:var(--twe-radius);background:var(--twe-surface);color:inherit}
.twe-aff-sign::backdrop{background:rgba(0,0,0,.55)}
.twe-aff-sign__text,.twe-aff-copy__text{max-height:50vh;overflow-y:auto;padding:12px;margin:0 0 14px;border:1px solid var(--twe-border);border-radius:var(--twe-radius)}
.twe-aff-sign__buttons .twe-button{min-height:44px;margin-right:8px}
.twe-aff-sign__buttons .twe-button:disabled{opacity:.55;cursor:not-allowed}
.twe-aff-w9__form input[type=text],.twe-aff-w9__form input[type=password]{max-width:100%}
@media print{.twe-aff-copy{display:block}.twe-aff-copy__text{max-height:none;overflow:visible;border:0}}

/* Fund & File 1.6.0-dev.11: the loan file's steps on the Client dashboard (TWE_Portal_Firm_Loans::dashboard_card()). */
.twe-portal .twe-loan-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 8px 0 12px;
	padding: 0;
}

.twe-portal .twe-loan-steps__step {
	border: 1px solid #c3c4c7;
	border-radius: 999px;
	color: #50575e;
	font-size: 0.875rem;
	padding: 2px 10px;
}

.twe-portal .twe-loan-steps__step--done {
	background: #f0f6fc;
	color: #1d2327;
}

.twe-portal .twe-loan-steps__step--now {
	background: var(--twe-accent, #1f4e79);
	border-color: var(--twe-accent, #1f4e79);
	color: var(--twe-accent-text, #fff);
	font-weight: 600;
}

/*
 * 1.6.0-dev.59: a tax preparer's desk (the consultant dashboard's Tax tab, TWE_Portal_Preparer_Desk). Phone first: one
 * column, boxes and buttons 44 px tall with 16 px text (no zoom on a phone), nothing wider than the screen.
 */
.twe-portal .twe-desk {
	display: grid;
	gap: var(--twe-gap);
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.twe-portal .twe-desk > * {
	min-width: 0;
}

.twe-portal .twe-desk__muted {
	color: var(--twe-muted);
}

.twe-portal .twe-desk__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 16px;
}

@media (min-width: 700px) {
	.twe-portal .twe-desk__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.twe-portal .twe-desk input[type="text"],
.twe-portal .twe-desk input[type="email"],
.twe-portal .twe-desk input[type="number"],
.twe-portal .twe-desk input[type="date"],
.twe-portal .twe-desk input[type="tel"],
.twe-portal .twe-desk input[type="file"],
.twe-portal .twe-desk select,
.twe-portal .twe-desk textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	font-size: 16px;
}

.twe-portal .twe-desk .twe-field label,
.twe-portal .twe-desk .twe-field > label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.twe-portal .twe-desk button,
.twe-portal .twe-desk .button,
.twe-portal .twe-desk .twe-button,
.twe-portal .twe-desk input[type="submit"] {
	box-sizing: border-box;
	min-height: 44px;
	max-width: 100%;
	white-space: normal;
}

.twe-portal .twe-desk details > summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	cursor: pointer;
	font-weight: 600;
}

.twe-portal .twe-desk__list {
	display: grid;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-portal.twe-portal .twe-desk__client {
	display: block;
	padding: 12px 14px;
	border: 1px solid var(--twe-border);
	border-left: 4px solid var(--twe-accent);
	border-radius: var(--twe-radius);
	background: var(--twe-surface);
	color: inherit;
	text-decoration: none;
}

.twe-portal.twe-portal .twe-desk__client:hover,
.twe-portal.twe-portal .twe-desk__client:focus {
	border-color: var(--twe-accent);
	outline: 2px solid var(--twe-accent);
	outline-offset: 1px;
}

.twe-portal .twe-desk__name {
	display: block;
	font-size: 1.05em;
	font-weight: 700;
	text-decoration: underline;
}

.twe-portal .twe-desk__line {
	display: block;
}

.twe-portal .twe-desk__label {
	font-weight: 600;
}

.twe-portal .twe-desk__unread {
	display: inline-block;
	margin-top: 6px;
}

.twe-portal .twe-desk__back {
	margin: 0;
}

.twe-portal.twe-portal .twe-desk__back a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.twe-portal .twe-desk__title {
	margin: 0;
	font-size: 1.3em;
}

.twe-portal .twe-desk__meta {
	margin: 0;
	color: var(--twe-muted);
}

.twe-portal .twe-desk__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.twe-portal.twe-portal .twe-desk__tab {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--twe-border);
	border-radius: 22px;
	color: inherit;
	text-decoration: none;
}

.twe-portal.twe-portal .twe-desk__tab.is-active {
	border-color: #000;
	background: #000;
	color: #fff;
	font-weight: 700;
}

.twe-portal .twe-desk__panel {
	min-width: 0;
}

.twe-portal .twe-desk__panel h3,
.twe-portal .twe-desk__panel h4 {
	margin: 20px 0 8px;
}

.twe-portal .twe-desk .twe-practice-table-wrap,
.twe-portal .twe-desk .twe-table-wrap {
	max-width: 100%;
	overflow-x: auto;
}

.twe-portal .twe-desk table {
	width: 100%;
	border-collapse: collapse;
}

.twe-portal .twe-desk__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.twe-portal .twe-desk .notice {
	margin: 0;
	padding: 10px 12px;
	border-left: 4px solid #00a32a;
	background: #edfaef;
	color: #000;
}

.twe-portal .twe-desk .notice-error {
	border-left-color: #b32d2e;
	background: #fcf0f1;
}

.twe-portal .twe-desk .notice p {
	margin: 0;
}

/* 1.6.0-dev.59: the preparer's link (a long address) wraps instead of widening the page on a phone. */
.twe-portal .twe-desk code,
.twe-portal .twe-desk .twe-prep-link__url {
	overflow-wrap: anywhere;
	word-break: break-all;
	white-space: normal;
}

.twe-portal .twe-desk input[type="color"] {
	min-width: 64px;
	min-height: 44px;
	font-size: 16px;
}

/* 1.6.0-dev.59: "View my landing page" and "Copy link" side by side (they wrap on a narrow phone). */
.twe-portal .twe-prep-link__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/*
 * 1.6.0-dev.60: every consultant now has every tool, so the consultant dashboard is phone first throughout: tabs, buttons
 * and the share card a thumb's size (44 px), every box 16 px text (no zoom on a phone).
 */
.twe-portal.twe-portal.twe-dashboard--consultant .twe-tabs__tab {
	min-height: 44px;
	box-sizing: border-box;
}

.twe-portal.twe-portal.twe-dashboard--consultant .twe-tab-panel .twe-button:not(.twe-button--link),
.twe-portal.twe-portal .twe-messages .twe-button:not(.twe-button--link),
.twe-portal.twe-portal .twe-books-share .twe-button {
	min-height: 44px;
	box-sizing: border-box;
}

.twe-portal.twe-dashboard--consultant .twe-tab-panel input[type="text"],
.twe-portal.twe-dashboard--consultant .twe-tab-panel input[type="email"],
.twe-portal.twe-dashboard--consultant .twe-tab-panel input[type="number"],
.twe-portal.twe-dashboard--consultant .twe-tab-panel input[type="date"],
.twe-portal.twe-dashboard--consultant .twe-tab-panel input[type="time"],
.twe-portal.twe-dashboard--consultant .twe-tab-panel select,
.twe-portal.twe-dashboard--consultant .twe-tab-panel textarea,
.twe-portal .twe-messages textarea {
	font-size: 16px;
	min-height: 44px;
	box-sizing: border-box;
	max-width: 100%;
}

.twe-portal .twe-books-share label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
}

/*
 * 1.6.0-dev.61: "Write it for me" inside the Branding form (TWE_Portal_AI_Drafts::panel()): a soft box, phone first:
 * every box full width with 16 px text (no zoom on a phone), the buttons a thumb's size (44 px), the prompt wrapping.
 */
.twe-portal .twe-ai-draft {
	box-sizing: border-box;
	max-width: 100%;
	margin: 0 0 20px;
	padding: 16px;
	border: 1px solid #dfe3e8;
	border-left: 4px solid var(--twe-accent, #d4af37);
	border-radius: 10px;
	background: #f8f9fb;
}

.twe-portal .twe-ai-draft__title {
	margin: 0 0 6px;
	font-size: 1.05rem;
}

.twe-portal .twe-ai-draft input[type="text"],
.twe-portal .twe-ai-draft select,
.twe-portal .twe-ai-draft textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 44px;
	font-size: 16px;
}

.twe-portal .twe-ai-draft label {
	display: block;
}

.twe-portal .twe-ai-draft .twe-button {
	min-height: 44px;
	box-sizing: border-box;
}

.twe-portal .twe-ai-draft__go {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
}

.twe-portal .twe-ai-draft__left {
	color: #4a5563;
	font-size: 0.95rem;
}

.twe-portal .twe-ai-draft__status:empty {
	display: none;
}

.twe-portal .twe-ai-draft__status {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 6px;
	background: #eef2f6;
}

.twe-portal .twe-ai-draft__status.is-ok {
	background: #edf7ed;
	border-left: 4px solid #1e7b34;
}

.twe-portal .twe-ai-draft__status.is-error {
	background: #fcf0f1;
	border-left: 4px solid #b32d2e;
}

.twe-portal .twe-ai-draft__own summary {
	display: flex;
	align-items: center;
	min-height: 44px;
	box-sizing: border-box;
	cursor: pointer;
	font-weight: 600;
}

.twe-portal .twe-ai-draft__prompt {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	font-family: inherit;
	line-height: 1.45;
}

/* 1.6.0-dev.61: the landing page's intro and call-to-action boxes, as wide as the other boxes. */
.twe-portal .twe-prep-brand #twe-brand-intro,
.twe-portal .twe-prep-brand #twe-brand-cta {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	font-size: 16px;
}

/* 1.6.0-dev.62: the preparer's profile photo next to their name in the client's portal, and on the Branding form. */
.twe-portal .twe-prep-named {
	display: flex;
	align-items: center;
	gap: 10px;
}

.twe-portal .twe-prep-avatar {
	flex: 0 0 auto;
	width: 32px;
	aspect-ratio: 1 / 1; /* Square without a fixed height (tests/twe-test-p33-css.php). */
	border-radius: 50%;
	object-fit: cover;
}

.twe-portal .twe-prep-brand__profile {
	width: 64px;
	aspect-ratio: 1 / 1; /* Square without a fixed height (tests/twe-test-p33-css.php). */
	border-radius: 50%;
	object-fit: cover;
}

/* 1.6.0-dev.66: "Your tax preparer", the first card of a preparer's client's Overview, in the preparer's colors. */
.twe-portal .twe-prep-card {
	border-top: 4px solid var(--twe-accent, #d4af37);
	min-width: 0;
}

.twe-portal .twe-prep-card__business {
	margin: 0 0 8px;
	color: var(--twe-heading, inherit);
	font-size: 1.15em;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.twe-portal .twe-prep-card__person {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	min-width: 0;
}

.twe-portal .twe-prep-card__photo {
	flex: 0 0 auto;
	width: 56px;
	aspect-ratio: 1 / 1; /* Square without a fixed height (tests/twe-test-p33-css.php). */
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--twe-brand-2, var(--twe-accent, #d4af37));
}

.twe-portal .twe-prep-card__name {
	min-width: 0;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.twe-portal .twe-prep-card__actions {
	margin: 0 0 12px;
}

.twe-portal .twe-prep-card .twe-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	max-width: 100%;
	text-align: center;
}

.twe-portal .twe-prep-card__session {
	padding-top: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.twe-portal .twe-prep-card__label {
	margin: 0;
	color: var(--twe-heading, inherit);
	font-size: 0.9em;
	font-weight: 600;
}

.twe-portal .twe-prep-card__when {
	margin: 0 0 8px;
}

@media (max-width: 480px) {
	.twe-portal .twe-prep-card .twe-button {
		width: 100%;
	}
}

.twe-portal .twe-prep-brand #twe-brand-bio {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	font-size: 16px;
}

/*
 * 1.6.0-dev.62: the plain buttons of the Practice forms a preparer's desk borrows ("Resend set-up link" and the like)
 * took the theme's own button colors (light text on light gold). They are the portal's primary button now: the
 * accent with its text color (black on the default gold, 10:1), whatever the theme says.
 */
.twe-portal.twe-portal .twe-desk .button:not(.button-link, .twe-button--ghost, .twe-button--secondary) {
	border: 2px solid var(--twe-accent, #d4af37);
	background: var(--twe-accent, #d4af37);
	color: var(--twe-accent-text, #000);
	font-weight: 600;
	text-shadow: none;
}

.twe-portal.twe-portal .twe-desk .button:not(.button-link, .twe-button--ghost, .twe-button--secondary):hover,
.twe-portal.twe-portal .twe-desk .button:not(.button-link, .twe-button--ghost, .twe-button--secondary):focus {
	border-color: var(--twe-accent-text, #000);
	background: var(--twe-accent, #d4af37);
	color: var(--twe-accent-text, #000);
}

/*
 * 1.6.0-dev.67: the portal's own buttons and link-buttons, whatever the theme's global button settings (Astra's
 * 20px 40px padding, 50px radius and gold hover/focus). Sizes at :where() strength (0,2,0), so they beat a theme's
 * "button" and ".button" and the portal's own variants and context rules still apply; the states one step stronger.
 * Hover, focus and active use the page's accent (a tax preparer's for their clients and themself; the portal's
 * otherwise), never the theme's color. Replaces the Customizer CSS "TWE Portal desk fixes" (2026-12-03).
 */
.twe-portal.twe-portal :where(.twe-button, .button, .button-primary, .button-secondary) {
	box-sizing: border-box;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: inherit;
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	text-shadow: none;
}

.twe-portal.twe-portal :where(.twe-button--small, .button-small) {
	padding: 4px 12px;
	font-size: 0.9em;
}

.twe-portal.twe-portal :where(.twe-button--link, .button-link) {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	min-height: 0;
}

/* No underline on a link drawn as a button ("Go there", "Next", "Download PDF"), whatever the theme's link rules. */
.twe-portal.twe-portal.twe-portal a:where(.twe-button, .button, .button-primary, .button-secondary):not(.twe-button--link),
.twe-portal.twe-portal.twe-portal a:where(.twe-button, .button, .button-primary, .button-secondary):not(.twe-button--link):is(:hover, :focus, :active, :visited) {
	text-decoration: none;
}

.twe-portal.twe-portal :where(.twe-button, .button-primary):not(.twe-button--ghost, .twe-button--secondary, .twe-button--danger, .twe-button--link, .button-link):is(:hover, :focus, :active) {
	border-color: var(--twe-accent, #2271b1);
	background-color: var(--twe-accent, #2271b1);
	color: var(--twe-accent-text, #fff);
}

.twe-portal.twe-portal :where(.twe-button--ghost, .twe-button--secondary, .button:not(.button-primary, .button-link)):is(:hover, :focus, :active) {
	border-color: var(--twe-accent, #2271b1);
	background-color: transparent;
	color: var(--twe-ink, #111);
}

.twe-portal.twe-portal .twe-button.twe-button--danger:is(:hover, :focus, :active) {
	border-color: var(--twe-danger, #b3261e);
	background-color: var(--twe-danger, #b3261e);
	color: #fff;
}

.twe-portal.twe-portal :where(.twe-button--link, .button-link):is(:hover, :focus, :active) {
	border-color: transparent;
	background: none;
	box-shadow: none;
}

.twe-portal.twe-portal :where(.twe-button, .button, .button-primary, .button-secondary, .button-link):focus-visible {
	outline: 2px solid var(--twe-accent, #2271b1);
	outline-offset: 2px;
}

/* "Remove (asked by mistake)": a small red text link, not a button. */
.twe-portal.twe-portal .twe-practice-docreq__remove,
.twe-portal.twe-portal .twe-practice-docreq__remove:is(:hover, :focus, :active) {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	min-height: 0;
	color: var(--twe-danger, #b3261e);
	font-size: 0.875em;
	font-weight: 400;
	text-decoration: underline;
	cursor: pointer;
}

.twe-portal.twe-portal .twe-practice-docreq__remove:is(:hover, :focus) {
	color: #8c1d18;
}

/* A section heading put straight into a desk panel. */
.twe-portal.twe-portal .twe-desk__panel > h2 {
	font-size: 26px;
	line-height: 1.25;
}

/* The theme's scroll-to-top button on dashboard pages: the page's accent (set on the body by the page frame). */
body.twe-portal-page #ast-scroll-top,
body.twe-portal-page #ast-scroll-top:is(:hover, :focus) {
	background-color: var(--twe-page-accent, #2271b1);
	color: var(--twe-page-accent-text, #fff);
}

/*
 * 1.6.0-dev.67: if a theme's wpautop still reaches the markup somewhere the portal can't put it back
 * (TWE_Portal_Shortcodes::restore_markup()), its line breaks and paragraphs don't break the tab bar, the calendar
 * or the client list (none of these has a line break of its own).
 */
.twe-portal.twe-portal :is(.twe-tabs, .twe-month, .twe-calendar__bar, .twe-calendar__views, .twe-dashboard-links, .twe-messages__people) br {
	display: none;
}

.twe-portal.twe-portal :is(.twe-tabs, .twe-month__head, .twe-month__grid, .twe-calendar__bar, .twe-calendar__views) > p {
	display: contents;
}

/* 1.6.0-dev.67: two clients with the same name: the email under the name. */
.twe-portal .twe-client-pick {
	display: inline-flex;
	flex-direction: column;
	vertical-align: top;
}

.twe-portal .twe-client-email {
	display: block;
	font-size: 0.85em;
	font-weight: 400;
	color: var(--twe-muted);
	overflow-wrap: anywhere;
}

/* 1.6.0-dev.67: a task marked done moves here (twe-portal.js), with "Undo" for a few seconds. */
.twe-portal .twe-tasks__moved {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--twe-border);
}

.twe-portal .twe-tasks__moved-title {
	margin: 0 0 8px;
}

.twe-portal .twe-desk__task-actions {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-left: 8px;
	min-height: 0;
}
