/* Trademark Intake System, frontend + admin styles
 *
 * Colour pairs in this file are chosen to pass WCAG AA: 4.5:1 for text, 3:1
 * for the edges of controls and for focus rings. The accent gold is
 * decoration only and is never used for text. Anything that needs to be
 * read or operated has a border or a word as well as a colour.
 */

@font-face {
	font-family: 'Plus Jakarta Sans';
	src: url('../fonts/PlusJakartaSans-VF.woff2') format('woff2');
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

/* Visually hidden, still read by screen readers. Used on both the public
   pages and the admin screens. */
.tm-sr-only,
.tm-intake-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.tm-intake-wrap,
.tm-admin-wrap {
	--tm-primary: #1a2f4b;
	--tm-primary-light: #2c4a73;
	--tm-accent: #b8894f;       /* decoration only */
	--tm-border: #d8dde3;       /* dividers and card edges */
	--tm-control: #6b7280;      /* edges of inputs and buttons: 4.8:1 on white */
	--tm-bg-soft: #f6f7f9;
	--tm-text: #1f242c;
	--tm-text-soft: #4b5563;    /* 7.5:1 on white, 6.6:1 on the soft background */
	--tm-link: #1a4a80;
	--tm-error: #b3261e;
	--tm-success: #1e6b3e;
	--tm-focus: #1a2f4b;
}

.tm-intake-wrap {
	max-width: 720px;
	margin: 0 auto;
	box-sizing: border-box;
	padding: clamp(1rem, 3vw, 1.75rem);
	background: #fff;
	color: var(--tm-text);
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.55;
}

/* Force the font on every descendant, not just relying on inheritance -
   browsers give form controls (input/textarea/select/button) and <code>-type
   elements their own default font-family regardless of the parent's, so
   setting it only on .tm-intake-wrap isn't enough to make it stick. */
.tm-intake-wrap,
.tm-intake-wrap * {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Something hidden stays hidden whatever else sets its display. */
.tm-intake-wrap [hidden] {
	display: none !important;
}

/* Links: always underlined, so they are not told apart by colour alone. */
.tm-intake-wrap a {
	color: var(--tm-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.tm-intake-wrap a:hover {
	text-decoration-thickness: 2px;
}
.tm-intake-wrap a.tm-btn {
	text-decoration: none;
}

/* Keyboard focus: a solid ring that is visible on every colour used here. */
.tm-intake-wrap :focus-visible,
.tm-admin-wrap .tm-btn:focus-visible,
.tm-admin-wrap .tm-filter:focus-visible,
.tm-admin-wrap .tm-dash-card:focus-visible {
	outline: 3px solid var(--tm-focus);
	outline-offset: 2px;
}
.tm-intake-wrap .tm-btn-primary:focus-visible {
	box-shadow: 0 0 0 2px #fff;
}
.tm-intake-wrap [tabindex="-1"]:focus {
	outline: none; /* headings and message boxes that only receive focus from the script */
}
.tm-intake-wrap .tm-message-region:focus-visible,
.tm-intake-wrap .tm-message-region:focus {
	outline: 3px solid var(--tm-focus);
	outline-offset: 2px;
}

/* --- Progress ------------------------------------------------------ */

.tm-progress {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0 0 2rem;
	padding: 0;
}
.tm-progress-step {
	display: flex;
	align-items: center;
	gap: .5rem;
	color: var(--tm-text-soft);
}
.tm-progress > .tm-progress-step + .tm-progress-step {
	flex: 1;
}
.tm-progress > .tm-progress-step + .tm-progress-step::before {
	content: "";
	flex: 1;
	height: 2px;
	margin: 0 1rem;
	background: var(--tm-control);
}
.tm-progress-step.is-active::before,
.tm-progress-step.is-done::before {
	background: var(--tm-primary);
}
.tm-progress-dot {
	box-sizing: border-box;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 2px solid var(--tm-control);
	background: #fff;
	color: var(--tm-text-soft);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .85rem;
	font-weight: 700;
	position: relative;
	z-index: 1;
}
.tm-progress-step.is-active .tm-progress-dot,
.tm-progress-step.is-done .tm-progress-dot {
	background: var(--tm-primary);
	border-color: var(--tm-primary);
	color: #fff;
}
.tm-progress-step.is-active .tm-progress-dot {
	box-shadow: 0 0 0 4px rgba(26, 47, 75, .2);
}
.tm-progress-label {
	font-size: .92rem;
	font-weight: 600;
}
.tm-progress-step.is-active .tm-progress-label {
	color: var(--tm-primary);
	font-weight: 700;
}

/* 4-stage persistent status tracker (Submitted/Conflict/Documents/Decision).
   Dots sit in a row with the labels underneath, joined by a line, and there
   is a distinct "stopped here" state for conflict/rejected outcomes. */
.tm-progress-4 {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	align-items: start;
}
.tm-progress-4 .tm-progress-step {
	flex-direction: column;
	gap: .35rem;
	text-align: center;
	position: relative;
}
.tm-progress-4 > .tm-progress-step + .tm-progress-step {
	flex: none;
}
.tm-progress-4 > .tm-progress-step + .tm-progress-step::before {
	position: absolute;
	top: 14px;
	right: 50%;
	width: 100%;
	flex: none;
	margin: 0;
	z-index: 0;
}
.tm-progress-4 .tm-progress-label {
	font-size: .85rem;
}
.tm-progress-step.is-stopped .tm-progress-dot {
	background: var(--tm-error);
	border-color: var(--tm-error);
	color: #fff;
}
.tm-progress-step.is-stopped .tm-progress-label {
	color: var(--tm-error);
	font-weight: 700;
}

/* Honeypot: pushed off-screen rather than display:none (which some bots
   skip filling precisely because they detect it). It is also inert and
   aria-hidden in the markup, so no person can reach it. */
.tm-hp-field {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Forms ---------------------------------------------------------- */

.tm-intake-form h2 {
	margin-top: 0;
	color: var(--tm-primary);
}
.tm-intro {
	color: var(--tm-text-soft);
	margin-bottom: 1.25rem;
}
.tm-switch {
	margin: .25rem 0;
}
.tm-back {
	margin: 0 0 1rem;
}

.tm-intake-form fieldset {
	border: 1px solid var(--tm-control);
	border-radius: 8px;
	padding: 1.25rem 1.25rem .5rem;
	margin: 0 0 1.5rem;
	min-width: 0;
}
.tm-intake-form legend {
	font-weight: 700;
	padding: 0 .5rem;
	color: var(--tm-primary);
}
.tm-intake-form fieldset.tm-subfieldset {
	border-color: var(--tm-border);
	background: var(--tm-bg-soft);
	margin-bottom: 1rem;
	padding-top: 1rem;
}
.tm-intake-form fieldset.tm-subfieldset legend {
	font-size: .92rem;
	color: var(--tm-text-soft);
}

.tm-row {
	margin-bottom: 1rem;
}
.tm-row-split {
	display: flex;
	gap: 1rem;
}
.tm-row-split > div {
	flex: 1;
	min-width: 0;
}
.tm-intake-form label,
.tm-intake-form .tm-label {
	display: block;
	font-weight: 600;
	margin-bottom: .35rem;
	font-size: .92rem;
}
.tm-intake-form .req,
.tm-intake-wrap label .req {
	color: var(--tm-error);
	font-weight: 700;
}
.tm-hint {
	margin: 0 0 .4rem;
	font-size: .85rem;
	color: var(--tm-text-soft);
}

.tm-intake-form input[type=text],
.tm-intake-form input[type=email],
.tm-intake-form input[type=tel],
.tm-intake-form input[type=url],
.tm-intake-form input[type=date],
.tm-intake-form input[type=search],
.tm-intake-form select,
.tm-intake-form textarea {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: .6rem .7rem;
	border: 1px solid var(--tm-control);
	border-radius: 6px;
	background: #fff;
	color: var(--tm-text);
	font-size: 1rem;
	font-family: inherit;
}
.tm-intake-form textarea {
	min-height: 5rem;
	resize: vertical;
}
.tm-intake-form input[readonly] {
	background: var(--tm-bg-soft);
}
.tm-intake-form input[type=file] {
	width: 100%;
	box-sizing: border-box;
	padding: .55rem;
	border: 1px dashed var(--tm-control);
	border-radius: 6px;
	background: var(--tm-bg-soft);
	color: var(--tm-text);
	font-size: .95rem;
}
.tm-intake-form ::placeholder {
	color: #6b7280;
	opacity: 1;
}
.tm-intake-form input:focus,
.tm-intake-form select:focus,
.tm-intake-form textarea:focus {
	border-color: var(--tm-primary);
}
.tm-intake-form [aria-invalid="true"] {
	border-color: var(--tm-error);
	border-width: 2px;
}
.tm-field-error {
	margin: .35rem 0 0;
	color: var(--tm-error);
	font-size: .9rem;
	font-weight: 600;
}

.tm-link-button {
	appearance: none;
	background: none;
	border: 0;
	margin: 0;
	padding: .25rem 0;
	min-height: 24px;
	color: var(--tm-link);
	font-size: .9rem;
	text-align: left;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.tm-link-button:hover {
	text-decoration-thickness: 2px;
}

/* --- File upload boxes ------------------------------------------------ */

.tm-dropzone {
	border: 2px dashed var(--tm-control);
	border-radius: 8px;
	padding: 1.25rem;
	text-align: center;
	cursor: pointer;
	background: var(--tm-bg-soft);
	position: relative;
	transition: border-color .15s ease, background .15s ease;
}
.tm-dropzone.is-dragover {
	border-color: var(--tm-primary);
	border-style: solid;
	background: #eaf1fb;
}
.tm-dropzone:focus-within {
	outline: 3px solid var(--tm-focus);
	outline-offset: 2px;
	border-color: var(--tm-primary);
}
.tm-dropzone-text {
	display: block;
	margin: 0;
	color: var(--tm-text-soft);
	font-size: .92rem;
	pointer-events: none;
}
.tm-intake-form .tm-dropzone input[type=file] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	cursor: pointer;
}
.tm-file-list {
	list-style: none;
	margin: .5rem 0 0;
	padding: 0;
	font-size: .9rem;
}
.tm-file-list:empty {
	display: none;
}
.tm-file-list li {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .25rem .6rem;
	padding: .4rem .6rem;
	background: var(--tm-bg-soft);
	border: 1px solid var(--tm-border);
	border-radius: 6px;
	margin-bottom: .3rem;
}
.tm-file-name {
	flex: 1 1 12rem;
	font-weight: 600;
	overflow-wrap: anywhere;
}
.tm-file-size {
	color: var(--tm-text-soft);
}
.tm-file-remove {
	appearance: none;
	background: #fff;
	border: 1px solid var(--tm-error);
	border-radius: 6px;
	color: var(--tm-error);
	cursor: pointer;
	font-size: .88rem;
	font-weight: 600;
	min-height: 36px;
	padding: .3rem .8rem;
}
.tm-file-remove:hover {
	background: #fbeceb;
}

/* --- Buttons ---------------------------------------------------------- */

.tm-btn {
	appearance: none;
	transition: background-color .15s ease, border-color .15s ease;
	box-sizing: border-box;
	display: inline-block;
	min-height: 44px;
	border: 2px solid var(--tm-primary);
	border-radius: 6px;
	background: #fff;
	color: var(--tm-primary);
	padding: .7rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
}
.tm-btn:hover {
	background: var(--tm-bg-soft);
	color: var(--tm-primary); /* themes such as Kadence turn button text white on hover */
}
.tm-btn-primary {
	background: var(--tm-primary);
	color: #fff;
}
.tm-intake-wrap a.tm-btn-primary {
	color: #fff;
}
.tm-btn-primary:hover {
	background: var(--tm-primary-light);
	border-color: var(--tm-primary-light);
	color: #fff;
}
.tm-btn[aria-disabled="true"],
.tm-btn:disabled {
	opacity: .75;
	cursor: progress;
}
.tm-fine-print {
	font-size: .85rem;
	color: var(--tm-text-soft);
	margin-top: .75rem;
}
.tm-login-help {
	margin: .75rem 0 0;
}

/* --- Messages -------------------------------------------------------------- */

.tm-message-region:empty {
	display: none;
}
.tm-message {
	padding: .85rem 1rem;
	border: 1px solid;
	border-left-width: 6px;
	border-radius: 6px;
	margin-bottom: 1.25rem;
	font-size: .95rem;
}
.tm-message p {
	margin: 0 0 .5rem;
}
.tm-message p:last-child {
	margin-bottom: 0;
}
.tm-message ul {
	margin: .4rem 0 0 1.2rem;
	padding: 0;
}
.tm-message-error {
	background: #fbeceb;
	color: #8f1d17;
	border-color: var(--tm-error);
}
.tm-message-info {
	background: #eaf1fb;
	color: #17406f;
	border-color: #2c6db5;
}
.tm-message-warning {
	background: #fdf4e3;
	color: #5c3b00;
	border-color: #b7791f;
}
.tm-message-warning form {
	margin-top: .6rem;
}
.tm-agent-start {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.25rem 2rem;
}
.tm-agent-start-col h3 {
	margin-top: 0;
}
.tm-agent-start select {
	width: 100%;
}
.tm-agent-start-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}
.tm-message-success {
	background: #e9f6ee;
	color: #14532d;
	border-color: var(--tm-success);
}
.tm-intake-wrap .tm-message a {
	color: inherit;
}
.tm-success {
	border: 1px solid var(--tm-success);
	border-left-width: 6px;
	border-radius: 8px;
	background: #f1faf4;
	padding: 1.25rem 1.5rem;
}
.tm-success h2 {
	margin-top: 0;
	color: var(--tm-success);
}

/* --- Admin dashboard --- */
:where(.tm-admin-wrap) .tm-status {
	display: inline-block;
	padding: .2rem .6rem;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 600;
	background: #e5e7eb;
	color: #374151;
	vertical-align: middle;
}
.tm-status-new,
.tm-status-coi_review { background: #fef3c7; color: #92400e; }
.tm-status-coi_cleared,
.tm-status-approved { background: #d1fae5; color: #065f46; }
.tm-status-coi_conflict,
.tm-status-rejected { background: #fee2e2; color: #991b1b; }
.tm-status-docs_submitted,
.tm-status-under_review { background: #dbeafe; color: #1e40af; }

.tm-search-form { margin: 1rem 0; }

.tm-detail-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 1.5rem;
	align-items: start;
	margin-top: 1rem;
}
/* Grid columns may shrink below their content; a wide table then scrolls
   inside its card instead of pushing the whole screen sideways. */
.tm-detail-main,
.tm-detail-side { min-width: 0; }
.tm-admin-wrap .tm-card { overflow-x: auto; }
/* Field edges at 3:1 or better against the admin's grey and white. */
.tm-admin-wrap input[type="text"],
.tm-admin-wrap input[type="email"],
.tm-admin-wrap input[type="url"],
.tm-admin-wrap input[type="tel"],
.tm-admin-wrap input[type="number"],
.tm-admin-wrap input[type="date"],
.tm-admin-wrap input[type="search"],
.tm-admin-wrap input[type="password"],
.tm-admin-wrap select,
.tm-admin-wrap textarea {
	border-color: #6b7280;
}
.tm-card {
	background: #fff;
	border: 1px solid #c9cfd6;
	border-radius: 8px;
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.25rem;
}
.tm-card h2 {
	margin-top: 0;
	font-size: 1.05rem;
}
.tm-card h3 {
	margin-top: 0;
}
.tm-kv th {
	text-align: left;
	width: 160px;
	vertical-align: top;
	color: var(--tm-text-soft, #4b5563);
	padding: .35rem 0;
	font-weight: 600;
}
.tm-kv td {
	padding: .35rem 0;
}
/* Label and value tables never push the page sideways on a narrow phone:
   the columns keep their widths and long values (references, numbers)
   wrap inside them. */
table.tm-kv:not(.tm-portal-table) { width: 100%; }
table.tm-kv:not(.tm-portal-table) th,
table.tm-kv:not(.tm-portal-table) td { overflow-wrap: anywhere; }
/* Labels break only between words ("Our / reference"), never inside one. */
table.tm-kv:not(.tm-portal-table) th { overflow-wrap: normal; word-break: normal; }
a.tm-target { display: inline-block; min-height: 24px; line-height: 24px; }
.tm-list {
	margin: 0;
	padding-left: 1.2rem;
}
.tm-list li {
	margin: .25rem 0;
}
.tm-pagination { margin-top: 1rem; }
.tm-pagination a {
	display: inline-block;
	min-width: 24px;
	padding: .3rem .65rem;
	margin-right: .25rem;
	border: 1px solid var(--tm-control, #6b7280);
	border-radius: 4px;
	text-decoration: none;
}
.tm-pagination a.current,
.tm-pagination a[aria-current="page"] {
	background: #1a2f4b;
	color: #fff;
	border-color: #1a2f4b;
	font-weight: 700;
}
.tm-row-overdue {
	background: #fef2f2 !important;
}
.tm-btn-danger {
	color: #b3261e !important;
	border-color: #b3261e !important;
}
.tm-btn-danger:hover {
	background: #fbeceb !important;
	border-color: #8f1d17 !important;
}

.tm-dash-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
	margin: 1.25rem 0 1.5rem;
}
.tm-dash-card {
	display: block;
	background: #fff;
	border: 1px solid #c9cfd6;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s ease, border-color .15s ease;
}
.tm-dash-card:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,.08);
	border-color: #6b7280;
}
.tm-dash-card-alert {
	border-color: #b3261e;
	background: #fef2f2;
}
.tm-dash-num {
	font-size: 1.9rem;
	font-weight: 700;
	line-height: 1;
	color: #1a2f4b;
}
.tm-dash-card-alert .tm-dash-num {
	color: #b3261e;
}
.tm-dash-label {
	font-size: .85rem;
	color: #4b5563;
	margin-top: .35rem;
}

/* --- Class picker ------------------------------------------------------ */

.tm-nice-picker {
	border: 1px solid var(--tm-control, #6b7280);
	border-radius: 8px;
	padding: .85rem;
	background: var(--tm-bg-soft, #f6f7f9);
}
.tm-intake-form .tm-nice-picker .tm-nice-filter {
	margin-bottom: .75rem;
}
.tm-nice-filter {
	width: 100%;
	box-sizing: border-box;
	padding: .5rem .7rem;
	border: 1px solid var(--tm-control, #6b7280);
	border-radius: 6px;
	margin-bottom: .75rem;
	font-size: .95rem;
}
.tm-intake-form .tm-nice-group {
	border: 0;
	padding: 0;
	margin: 0;
}
.tm-intake-form .tm-nice-group legend {
	padding: 0;
	margin: .5rem 0 .35rem;
	font-size: .85rem;
	color: var(--tm-text-soft, #4b5563);
	text-transform: none;
	letter-spacing: 0;
}
.tm-nice-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: .3rem;
	max-height: 260px;
	overflow-y: auto;
	padding-right: .25rem;
}
.tm-intake-form .tm-nice-item,
.tm-admin-wrap .tm-nice-item {
	display: flex;
	align-items: flex-start;
	gap: .4rem;
	font-size: .88rem;
	font-weight: 400;
	margin: 0;
	padding: .35rem .4rem;
	border-radius: 4px;
	cursor: pointer;
}
.tm-nice-item:hover {
	background: #fff;
}
.tm-nice-item input {
	margin-top: .2rem;
	flex-shrink: 0;
	width: 1.1rem;
	height: 1.1rem;
}
.tm-nice-item.is-hidden {
	display: none;
}
.tm-foreign-reg-row {
	border: 1px solid var(--tm-border, #d8dde3);
	border-radius: 6px;
	padding: .75rem .75rem 0;
	margin-bottom: .75rem;
	background: #fff;
}
.tm-intake-form .tm-terms-row {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	font-weight: 400;
	font-size: .95rem;
}
.tm-terms-row input {
	margin-top: .2rem;
	flex-shrink: 0;
	width: 1.2rem;
	height: 1.2rem;
}

/* --- Portal header and login ------------------------------------------- */

.tm-portal-header {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1rem;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2px solid var(--tm-border, #d8dde3);
	padding-bottom: .75rem;
	margin-bottom: 1rem;
}
.tm-portal-header h2 {
	margin: 0;
}
.tm-client-login {
	max-width: 380px;
	margin: 1rem 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--tm-control, #6b7280);
	border-radius: 8px;
	background: #fff;
}
.tm-client-login h2,
.tm-client-login h3 {
	margin-top: 0;
}
.tm-client-login p {
	margin: 0 0 .75rem;
}
.tm-client-login label {
	display: block;
	font-weight: 600;
	margin-bottom: .3rem;
	font-size: .92rem;
}
.tm-client-login input[type="text"],
.tm-client-login input[type="password"],
.tm-client-login input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	min-height: 44px;
	padding: .55rem .7rem;
	border: 1px solid var(--tm-control, #6b7280);
	border-radius: 6px;
	background: #fff;
	color: var(--tm-text, #1f242c);
	font-size: 1rem;
}
.tm-client-login .login-remember label {
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.tm-client-login .login-remember input {
	width: 1.2rem;
	height: 1.2rem;
}
.tm-client-login .login-submit input[type="submit"] {
	appearance: none;
	min-height: 44px;
	margin-top: .25rem;
	padding: .6rem 1.5rem;
	border: 2px solid var(--tm-primary, #1a2f4b);
	border-radius: 6px;
	background: var(--tm-primary, #1a2f4b);
	color: #fff;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}
.tm-client-login .login-submit input[type="submit"]:hover {
	background: var(--tm-primary-light, #2c4a73);
}

.tm-privacy-notice {
	background: var(--tm-bg-soft, #f6f7f9);
	border: 1px solid var(--tm-border, #d8dde3);
	border-radius: 8px;
	padding: 1rem 1.2rem;
	margin-bottom: 1.25rem;
	font-size: .9rem;
}
.tm-privacy-notice h3,
.tm-privacy-notice h4 {
	margin: 0 0 .5rem;
	font-size: .95rem;
	color: var(--tm-primary, #1a2f4b);
}
.tm-privacy-notice-text p {
	margin: 0 0 .6rem;
}
.tm-privacy-notice-text p:last-child {
	margin-bottom: 0;
}

@media (max-width: 782px) {
	.tm-row-split { flex-direction: column; }
	.tm-detail-grid { grid-template-columns: 1fr; }
}

/* --- Client portal dashboard --------------------------------------------- */

.tm-portal-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
	gap: .75rem;
	margin-bottom: 1.25rem;
}
.tm-tile {
	background: #fff;
	border: 1px solid #c9cfd6;
	border-radius: 8px;
	padding: .9rem 1rem;
	display: flex;
	flex-direction: column;
}
.tm-tile-num { font-size: 1.6rem; font-weight: 700; color: #1a2f4b; line-height: 1.2; }
.tm-tile-label { font-size: .88rem; color: #4b5563; }
.tm-card-attention { border-left: 6px solid #b45309; background: #fffbeb; }
.tm-attention-list { list-style: none; margin: 0; padding: 0; }
.tm-attention-list li { padding: .5rem 0; border-bottom: 1px solid #e5d3a0; }
.tm-attention-list li:last-child { border-bottom: 0; }
.tm-portal-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.tm-portal-toolbar input[type="search"] { flex: 1 1 200px; max-width: 320px; min-height: 40px; padding: .45rem .6rem; border: 1px solid #6b7280; border-radius: 4px; font-size: 1rem; }
.tm-portal-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.tm-filter { border: 1px solid #6b7280; background: #fff; color: #1f242c; border-radius: 999px; min-height: 36px; padding: .3rem .9rem; cursor: pointer; font-size: .9rem; }
.tm-filter.is-active,
.tm-filter[aria-pressed="true"] { background: #1a2f4b; color: #fff; border-color: #1a2f4b; font-weight: 700; }
.tm-filter[aria-pressed="true"]::before { content: "\2713\00a0"; }
/* A table that is wider than its box scrolls inside the box. It is positioned so
   that hidden screen-reader text inside it is clipped with it and cannot make
   the whole page scroll sideways. */
.tm-table-wrap { position: relative; overflow-x: auto; }
.tm-table-wrap:focus-visible { outline: 3px solid var(--tm-focus, #1a2f4b); outline-offset: 2px; }
.tm-portal-table { width: 100%; border-collapse: collapse; }
.tm-portal-table th, .tm-portal-table td { padding: .5rem .5rem; border-bottom: 1px solid #dfe3e8; text-align: left; vertical-align: top; width: auto; }
.tm-portal-table th { color: #1f242c; font-weight: 700; }
.tm-portal-table .tm-total-label { text-align: right; }
.tm-portal-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 .75rem; }
.tm-inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.tm-inline-form select {
	box-sizing: border-box;
	max-width: 100%;
	min-height: 44px;
	padding: .5rem .7rem;
	border: 1px solid var(--tm-control);
	border-radius: 6px;
	background: #fff;
	color: var(--tm-text);
	font-size: 1rem;
	font-family: inherit;
}
.tm-badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.tm-badge-progress { background: #e0ecff; color: #1e3a8a; }
.tm-badge-registered { background: #dcfce7; color: #166534; }
.tm-badge-closed { background: #e5e7eb; color: #374151; }
.tm-badge-ok { background: #dcfce7; color: #166534; }
.tm-badge-muted { background: #e5e7eb; color: #374151; }
.tm-badge-urgent { background: #fee2e2; color: #991b1b; }
.tm-stages { list-style: none; display: flex; gap: 0; padding: 0; margin: 1rem 0; counter-reset: stage; }
.tm-stages li { flex: 1; text-align: center; padding: .5rem .25rem; font-size: .88rem; color: #4b5563; border-top: 4px solid #9aa3af; }
.tm-stages li.is-done { border-top-color: #1a2f4b; color: #1a2f4b; }
.tm-stages li.is-current { border-top-color: #166534; color: #166534; font-weight: 700; }
.tm-journey { list-style: none; display: flex; padding: 0; margin: 1.1rem 0 1.3rem; counter-reset: tmstage; }
.tm-journey li { flex: 1 1 0; position: relative; text-align: center; padding: 2.1rem .2rem 0; font-size: .8rem; line-height: 1.3; color: #4b5563; min-width: 0; }
.tm-journey li::before {
	counter-increment: tmstage;
	content: counter(tmstage) / "";
	position: absolute; top: 0; left: 50%; transform: translateX(-50%);
	width: 1.7rem; height: 1.7rem; border-radius: 50%;
	border: 2px solid #9aa3af; background: #fff; color: #4b5563;
	font-weight: 700; font-size: .8rem; line-height: 1.55rem; text-align: center; z-index: 1;
}
.tm-journey li::after { content: ""; position: absolute; top: .8rem; right: 50%; width: 100%; height: 3px; background: #d1d5db; z-index: 0; }
.tm-journey li:first-child::after { display: none; }
.tm-journey li.is-done::before { content: "\2713" / ""; background: var(--tm-primary, #1a2f4b); border-color: var(--tm-primary, #1a2f4b); color: #fff; }
.tm-journey li.is-done::after, .tm-journey li.is-current::after { background: var(--tm-primary, #1a2f4b); }
.tm-journey li.is-done { color: var(--tm-primary, #1a2f4b); }
.tm-journey li.is-current { color: #166534; font-weight: 700; }
.tm-journey li.is-current::before { border-color: #166534; color: #166534; box-shadow: 0 0 0 4px rgba(22, 101, 52, .2); }
.tm-mark-image { display: block; max-width: 180px; max-height: 140px; width: auto; height: auto; object-fit: contain; border: 1px solid var(--tm-border, #d8dde3); border-radius: 6px; background: #fff; padding: .4rem; margin: 0 0 .8rem; }
.tm-mark-thumb { display: inline-block; width: 40px; height: 40px; object-fit: contain; vertical-align: middle; margin: 0 .55rem .2rem 0; border: 1px solid var(--tm-border, #d8dde3); border-radius: 4px; background: #fff; }
.tm-report { margin-top: 1rem; }
.tm-decision { border-top: 1px solid var(--tm-border, #d8dde3); padding-top: .9rem; margin-top: .9rem; }
.tm-decision:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.tm-decision h4 { margin: 0 0 .2rem; }
.tm-decision-open { border-left: 4px solid #b45309; padding-left: .9rem; }
.tm-decision-advice { background: var(--tm-bg-soft, #f3f6fa); border-radius: 6px; padding: .6rem .9rem; margin: .6rem 0; }
.tm-decision-advice p { margin: .3rem 0; }
.tm-decision-list { margin: .5rem 0 1rem; padding-left: 1.1rem; }
.tm-decision-list li { margin: 0 0 .8rem; }
.tm-btn-whatsapp { border-color: #166534; color: #166534; }
.tm-intake-wrap a.tm-btn-whatsapp { color: #14532d; }
.tm-quick-contact { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
@media (max-width: 700px) {
	.tm-journey { flex-direction: column; margin-left: .2rem; }
	.tm-journey li { text-align: left; padding: .2rem 0 .9rem 2.6rem; min-height: 1.7rem; }
	.tm-journey li::before { left: 0; transform: none; }
	.tm-journey li::after { top: -1.1rem; right: auto; left: .78rem; width: 3px; height: 1.6rem; }
}
.tm-btn-link { display: inline-block; text-decoration: none; }
.tm-btn-small { min-height: 36px; padding: .3rem .8rem; font-size: .9rem; margin-left: .5rem; }
@media (max-width: 600px) {
	.tm-stages li { font-size: .8rem; }
	.tm-progress-4 .tm-progress-label { font-size: .78rem; }
	/* Phones: the theme already pads the page, so give the content the room. */
	.tm-intake-wrap { padding-left: .5rem; padding-right: .5rem; }
	.tm-card { padding: 1rem; }
	.tm-kv th { width: 40%; padding-right: .75rem; }
}

/* Tables that become a stack of small cards on narrow screens. Each cell is
   labelled by its column name (shown from data-label, hidden from assistive
   technology because the table headers already say it) and the real table
   roles are kept in the markup, so a screen reader still reads a table with
   row and column headers. */
@media (max-width: 640px) {
	.tm-portal-table.tm-stack,
	.tm-portal-table.tm-stack tbody,
	.tm-portal-table.tm-stack tfoot { display: block; }
	.tm-portal-table.tm-stack thead {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
	.tm-portal-table.tm-stack tr {
		display: block;
		padding: .6rem 0;
		border-bottom: 1px solid #dfe3e8;
	}
	.tm-portal-table.tm-stack th,
	.tm-portal-table.tm-stack td {
		display: block;
		width: auto;
		padding: .15rem 0;
		border: 0;
	}
	.tm-portal-table.tm-stack td {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: .1rem 1rem;
		text-align: right;
	}
	.tm-portal-table.tm-stack td::before {
		content: attr(data-label);
		content: attr(data-label) / "";
		flex: 0 0 auto;
		font-weight: 600;
		text-align: left;
		color: var(--tm-text-soft, #4b5563);
	}
	.tm-portal-table.tm-stack td[data-label=""] { justify-content: flex-start; text-align: left; }
	.tm-portal-table.tm-stack tfoot tr { display: flex; justify-content: space-between; gap: 1rem; }
	.tm-portal-table.tm-stack tfoot th,
	.tm-portal-table.tm-stack tfoot .tm-total-label { text-align: left; }
}

/* Message threads (portal and staff) */
.tm-thread { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; max-height: 420px; overflow-y: auto; }
.tm-msg { padding: .6rem .8rem; border-radius: 8px; max-width: 90%; border: 1px solid #c9cfd6; }
.tm-msg-mine { align-self: flex-end; background: #e0ecff; }
.tm-msg-theirs { align-self: flex-start; background: #f3f4f6; }
.tm-msg-meta { font-size: .82rem; color: #4b5563; margin-bottom: .25rem; }
.tm-msg-body { white-space: normal; word-wrap: break-word; }

/* Invoices */
@media print {
	body * { visibility: hidden; }
	.tm-invoice, .tm-invoice * { visibility: visible; }
	.tm-invoice { position: absolute; left: 0; top: 0; width: 100%; border: 0; }
	.tm-print-btn { display: none; }
}

/* Conversations */
.tm-convo { border: 1px solid #c9cfd6; border-radius: 8px; margin-bottom: .6rem; background: #fff; }
.tm-convo > summary { cursor: pointer; padding: .7rem .9rem; display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: baseline; }
.tm-convo-subject { font-weight: 600; }
.tm-convo-mark, .tm-convo-date { font-size: .88rem; color: #4b5563; }
.tm-convo-new { font-size: .8rem; font-weight: 600; color: #fff; background: #b42318; border-radius: 999px; padding: .05rem .5rem; }
.tm-convo > .tm-thread { padding: 0 .9rem; }
.tm-convo-reply { display: flex; flex-direction: column; gap: .5rem; padding: 0 .9rem .9rem; }
.tm-convo-reply textarea { width: 100%; box-sizing: border-box; }
.tm-convo-reply button { align-self: flex-start; }
.tm-convo-heading { margin: 1.2rem 0 .5rem; font-size: .95rem; color: #4b5563; }
.tm-convo-closed { background: #f9fafb; }
.tm-convo-closed .tm-convo-subject { color: #4b5563; }
.tm-convo-state { font-size: .8rem; border: 1px solid #6b7280; border-radius: 999px; padding: .05rem .5rem; color: #4b5563; }
.tm-convo-state-form { padding: 0 .9rem .9rem; margin: 0; }

.tm-mark-summary { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; color: #374151; }
.tm-mark-summary li { margin: 0; }

/* --- Portal menu, pages and new cards ------------------------------------ */

.tm-portal-who { margin: 0; }
.tm-intake-wrap a.tm-logout {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 .25rem;
}
.tm-portal-nav { margin: 0 0 1.25rem; }
.tm-portal-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.tm-portal-nav li { margin: 0; }
.tm-intake-wrap .tm-portal-nav a {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	min-height: 44px;
	padding: .35rem .95rem;
	border: 1px solid var(--tm-control);
	border-radius: 999px;
	color: var(--tm-text);
	background: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: .95rem;
}
.tm-intake-wrap .tm-portal-nav a:hover { background: var(--tm-bg-soft); }
.tm-intake-wrap .tm-portal-nav a[aria-current="page"] {
	background: var(--tm-primary);
	border-color: var(--tm-primary);
	color: #fff;
}
.tm-count {
	display: inline-block;
	min-width: 1.4em;
	padding: 0 .4em;
	border-radius: 999px;
	background: #b42318;
	color: #fff;
	font-size: .8rem;
	line-height: 1.5;
	text-align: center;
}
.tm-portal-nav a[aria-current="page"] .tm-count { background: #fff; color: #b42318; }
.tm-view-title { margin: 0 0 1rem; }
.tm-intake-wrap a.tm-tile {
	color: inherit;
	text-decoration: none;
}
.tm-intake-wrap a.tm-tile:hover { border-color: var(--tm-primary); background: var(--tm-bg-soft); }
.tm-allclear {
	padding: .75rem 1rem;
	border: 1px solid var(--tm-border);
	border-radius: 8px;
	background: var(--tm-bg-soft);
}
.tm-history { list-style: none; margin: 0; padding: 0; }
.tm-history li {
	display: flex;
	flex-wrap: wrap;
	gap: .1rem .75rem;
	padding: .45rem 0;
	border-bottom: 1px solid var(--tm-border);
}
.tm-history li:last-child { border-bottom: 0; }
.tm-history-date { flex: 0 0 6.5rem; color: var(--tm-text-soft); font-size: .9rem; }
.tm-history-text { flex: 1 1 14rem; }
.tm-history-mark { font-size: .9rem; }
.tm-request-list { list-style: none; margin: 0; padding: 0; }
.tm-request {
	padding: .9rem 0;
	border-bottom: 1px solid var(--tm-border);
}
.tm-request:last-child { border-bottom: 0; padding-bottom: 0; }
.tm-request-head { margin: 0 0 .35rem; }
.tm-request .tm-badge { margin-left: .25rem; }
.tm-upload-form { margin-top: .6rem; }
.tm-intake-wrap .tm-row-stack { flex-direction: column; }
/* Links that stand on their own line get a target at least 24px tall. */
.tm-intake-wrap .tm-doc-list a,
.tm-intake-wrap .tm-history-mark a,
.tm-intake-wrap .tm-back a,
.tm-intake-wrap .tm-portal-table th a,
.tm-intake-wrap .tm-link-list a:not(.tm-btn) {
	display: inline-block;
	padding: .2rem 0;
}
.tm-nowrap { white-space: nowrap; }
.tm-upload-form .tm-row { margin-bottom: .75rem; }
.tm-doc-list, .tm-link-list { margin: .25rem 0 .75rem; padding-left: 1.2rem; }
.tm-contact-list { list-style: none; margin: .25rem 0 .75rem; padding-left: 0; }
.tm-doc-list li, .tm-contact-list li { margin: .3rem 0; }
.tm-link-list { list-style: none; padding: 0; }
.tm-link-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 .6rem; }
.tm-steps { margin: .5rem 0 0; padding-left: 1.4rem; }
.tm-steps li { margin: .3rem 0; }
.tm-proof {
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid var(--tm-border);
}
.tm-auth-owner { border-top: 1px solid var(--tm-border, #d8dde3); padding-top: .9rem; margin-top: 1rem; }
.tm-auth-owner h4 { margin: 0 0 .25rem; }
.tm-auth-form fieldset,
#tm-client-cases fieldset,
#tm-enforcement fieldset { border: 0; margin: .5rem 0; padding: 0; min-width: 0; }
.tm-auth-form legend,
#tm-client-cases legend,
#tm-enforcement legend { font-weight: 600; padding: 0; margin-bottom: .35rem; }
#tm-enforcement .tm-choice { max-width: 46rem; }
#tm-client-cases .tm-choice input,
#tm-enforcement .tm-choice input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; }
.tm-auth-form .tm-choice,
#tm-client-cases .tm-choice,
#tm-enforcement .tm-choice {
	display: flex;
	align-items: flex-start;
	gap: .55rem;
	min-height: 24px;
	padding: .35rem 0;
	font-weight: 400;
	cursor: pointer;
}
.tm-auth-form .tm-choice input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; }
.tm-admin-wrap .tm-auth-form .tm-choice { max-width: 46rem; }
.tm-auth-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.tm-admin-wrap .tm-auth-actions .button { margin: 0; }
.tm-auth-steps { margin: .9rem 0 .4rem; border: 1px solid var(--tm-border, #d8dde3); border-radius: 6px; padding: 0 .9rem; }
.tm-auth-steps > summary { cursor: pointer; font-weight: 600; padding: .6rem 0; min-height: 24px; }
.tm-auth-steps > summary:focus-visible { outline: 3px solid var(--tm-primary, #1a2f4b); outline-offset: 2px; }
.tm-auth-steps[open] { padding-bottom: .7rem; }
.tm-auth-steps h4 { margin: .8rem 0 .2rem; font-size: 1rem; }
.tm-inline-admin-form { display: inline-block; margin: 0 .3rem .3rem 0; }
.tm-inline-admin-form input[type="text"] { max-width: 14rem; }
@media (max-width: 600px) {
	.tm-history-date { flex-basis: 100%; }
	.tm-intake-wrap .tm-portal-nav a { padding: .35rem .75rem; }
}
/* Every field in the plugin keeps an edge that can be seen (3:1), whatever
   lighter border the theme gives fields (Kadence's default is #CBD5E0). */
.tm-intake-wrap textarea,
.tm-intake-wrap select,
.tm-intake-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="submit"]):not([type="button"]) {
	border-color: var(--tm-control, #6b7280);
}

/* --- Email wording (staff) */
.tm-email-template > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; min-height: 24px; }
.tm-email-preview > summary { cursor: pointer; display: inline-block; min-height: 24px; padding: 6px 0; }
.tm-email-reset { margin: 1rem 0; }
.tm-email-reset label { display: inline-block; padding: 6px 0; }
.tm-email-template[open] > summary { margin-bottom: .6rem; }
.tm-email-template textarea { font-size: 13px; }
.tm-placeholder-list { margin: .2rem 0 .8rem 1.2rem; columns: 2 22rem; }
.tm-placeholder-list li { break-inside: avoid; margin: 0 0 .2rem; }
.tm-email-preview pre { white-space: pre-wrap; background: #f6f7f9; border: 1px solid #d8dde3; padding: .75rem; max-width: 70rem; font-size: 13px; }

/* --- Reports (staff) */
.tm-report-period { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin: .5rem 0; }
.tm-report-period .button-link { display: inline-block; padding: 4px 0; }
.tm-report-tiles { list-style: none; margin: 1rem 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.tm-report-tiles li { background: #fff; border: 1px solid #c9cfd6; border-radius: 8px; padding: .8rem 1rem; color: #4b5563; font-size: 13px; }
.tm-report-num { display: block; font-size: 1.6rem; font-weight: 700; color: #1a2f4b; line-height: 1.25; }
.tm-report-num.tm-report-money { font-size: 1.1rem; }
.tm-report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 0 1.25rem; align-items: start; }
.tm-report-table td { white-space: nowrap; }
.tm-rnum { display: inline-block; min-width: 2.5em; }
.tm-rbar { display: inline-block; height: .7em; background: #1a2f4b; border-radius: 2px; vertical-align: middle; max-width: calc(100% - 3em); }
.tm-report-narrow { max-width: 30rem; margin-bottom: 1rem; }
.tm-reports caption { text-align: left; font-weight: 600; padding: .4rem 0; }
.tm-reports caption.screen-reader-text { padding: 0; }

/* --- Registration check page, similar marks, enforcement */
.tm-check-grid { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; }
.tm-check-qr svg { display: block; width: 168px; height: 168px; border: 1px solid var(--tm-border, #d8dde3); border-radius: 6px; }
.tm-check-grid > div:last-child { flex: 1 1 260px; min-width: 0; }
.tm-check-link { width: 100%; max-width: 32rem; font-size: .9rem; }
.tm-similar-table td, .tm-similar-table th { vertical-align: top; }

/* --- Wide portal layout -------------------------------------------------
   The portal's own pages use the full content width the theme gives them
   (Kadence's content box is 1290 pixels). Layout decisions use the width of
   the portal itself (a container query), not the window, so a theme with a
   sidebar or a narrow page template still gets the one-column layout. */
.tm-intake-wrap.tm-portal-wide {
	max-width: 1240px;
	padding-left: 0;
	padding-right: 0;
	container: tm-portal / inline-size;
}
.tm-portal-wide .tm-portal-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
@container tm-portal (min-width: 560px) {
	.tm-mark-facts.has-image { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.5rem; align-items: start; }
	.tm-mark-facts.has-image .tm-mark-image { margin: .2rem 0 0; }
}
@container tm-portal (min-width: 820px) {
	.tm-overview,
	.tm-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 1.25rem; align-items: start; }
	.tm-overview-side .tm-portal-actions { flex-direction: column; align-items: stretch; }
	.tm-overview-side .tm-portal-actions .tm-btn { text-align: center; }
	.tm-overview-main > .tm-allclear { margin-top: 0; }
	/* The side column is narrow: fields there sit one above the other. */
	.tm-detail-side .tm-row-split { display: block; }
	.tm-detail-side .tm-row-split > * + * { margin-top: .75rem; }
	.tm-journey li { font-size: .85rem; }
}

@media print {
	.tm-portal-nav, .tm-portal-header, .tm-back { display: none; }
}

/* --- People who ask for less motion, more contrast ------------------------ */

@media (prefers-reduced-motion: reduce) {
	.tm-intake-wrap *,
	.tm-admin-wrap * {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

@media (forced-colors: active) {
	.tm-btn,
	.tm-filter,
	.tm-badge,
	.tm-message,
	.tm-progress-dot {
		border: 2px solid CanvasText;
	}
	.tm-progress-step.is-active .tm-progress-dot,
	.tm-progress-step.is-done .tm-progress-dot {
		background: Highlight;
		color: HighlightText;
	}
	.tm-dropzone:focus-within,
	.tm-intake-wrap :focus-visible {
		outline: 3px solid Highlight;
	}
}

/* Two-step login */
.tm-two-step .tm-steps { margin-left: 1.4em; max-width: 46rem; }
.tm-two-step .tm-steps li { margin-bottom: 1.1rem; line-height: 1.55; }
.tm-two-step .tm-qr-box { display: inline-block; margin: .6rem 0 .3rem; padding: 4px; background: #fff; border: 1px solid #c3c4c7; border-radius: 6px; }
.tm-two-step .tm-qr-box svg { display: block; width: 196px; height: auto; }
.tm-two-step .tm-secret { font-size: 1rem; letter-spacing: .06em; word-break: break-all; }
.tm-two-step .tm-code-input { font-size: 1.2rem; letter-spacing: .2em; max-width: 12rem; }
.tm-two-step .tm-code-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .4rem .8rem; max-width: 34rem; padding: 0; margin: .8rem 0; list-style: none; }
.tm-two-step .tm-code-list code { font-size: 1.05rem; padding: .2rem .4rem; }
.tm-two-step .tm-recovery-codes { border-left: 4px solid #996800; }
.tm-two-step .tm-inline-form p { margin: .4rem 0; }

/* Filing pack readiness */
.tm-ready-list { list-style: none; margin: .6rem 0 1rem; padding: 0; max-width: 52rem; }
.tm-ready-list li { padding: .35rem 0 .35rem .8rem; border-left: 4px solid #8c8f94; margin-bottom: .3rem; line-height: 1.45; }
.tm-ready-list .tm-ready-ok { border-left-color: #1a7f37; }
.tm-ready-list .tm-ready-missing { border-left-color: #b32d2e; }
.tm-ready-list .tm-ready-check { border-left-color: #996800; }
.tm-ready-state { font-weight: 600; }
.tm-ready-missing .tm-ready-state { color: #8a2424; }
.tm-ready-check .tm-ready-state { color: #6b4a00; }
.tm-ready-ok .tm-ready-state { color: #14632b; }

/* System check */
.tm-system-check .tm-check-table { max-width: 70rem; margin: 1rem 0; }
.tm-system-check .tm-check-table th[scope="row"] { font-weight: 600; width: 16rem; }
.tm-system-check .tm-check-table td { vertical-align: top; overflow-wrap: anywhere; }

/* Yearly summary */
#tm-client-summary summary { cursor: pointer; display: inline-block; min-height: 24px; padding: 6px 0; }
.tm-summary-text { white-space: pre-wrap; background: #f6f7f9; border: 1px solid #d8dde3; padding: .75rem; font-size: 13px; max-width: 46rem; overflow-wrap: anywhere; }

/* Sign-in activity */
.tm-signin-list { list-style: none; margin: .5rem 0 1rem; padding: 0; }
.tm-signin-list li { padding: .45rem 0; border-bottom: 1px solid #e5e7eb; overflow-wrap: anywhere; }
.tm-signin-list li:last-child { border-bottom: 0; }
.tm-signin-history summary { cursor: pointer; display: inline-block; min-height: 24px; padding: 6px 0; }

/* Billing terms, discounts, invoice preview */
.tm-check-col { width: 2.2rem; text-align: center; }
.tm-check-col input[type="checkbox"] { margin: 0; width: 20px; height: 20px; }
.tm-bulk-billing { margin: 1rem 0 1.5rem; padding: .9rem 1rem; border: 1px solid #c3c4c7; background: #fff; max-width: 52rem; }
.tm-bulk-billing legend { font-weight: 600; padding: 0 .3rem; }
.tm-bulk-billing p { margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tm-discount-choice { border: 0; margin: 0; padding: 0; }
.tm-discount-choice p { margin: 0 0 .5rem; }
.tm-wht-note { margin: .75rem 0; padding: .6rem .8rem; border-left: 4px solid #2f5f8a; background: #f2f6fa; }
.tm-invoice-preview .tm-preview-frame { max-width: 52rem; margin: 1rem 0 2rem; padding: 1rem; background: #f6f7f9; border: 1px dashed #8c8f94; }

/* Non-traditional marks */
.tm-mark-guidance { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid #2f5f8a; background: #f2f6fa; }
.tm-mark-guidance p { margin: .3rem 0; }

/* Staff guide */
.tm-guide { max-width: 60rem; }
.tm-guide-lead { font-size: 1.05rem; max-width: 46rem; }
.tm-guide-toc ul { list-style: none; margin: .5rem 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.tm-guide-toc a { display: inline-block; min-height: 24px; padding: 2px 0; }
.tm-guide-steps { counter-reset: none; margin-left: 1.6em; max-width: 46rem; }
.tm-guide-steps > li { margin-bottom: 1.3rem; padding-left: .3rem; }
.tm-guide-steps h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.tm-guide-steps p, .tm-guide-list li { line-height: 1.6; }
.tm-guide-list { list-style: disc; margin-left: 1.4em; max-width: 46rem; }
.tm-guide h2 { margin-top: 2rem; }

/* 3.23.0: bulk bar, waiting on, conflict checks */
.tm-bulk-bar { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: .75rem; }
.tm-bulk-bar .tm-fine-print { flex-basis: 100%; }
.tm-waiting-line { margin: .25rem 0 1rem; }
.tm-waiting-list { margin: 0; padding-left: 1.2rem; }
.tm-waiting-list li { margin: .3rem 0; }
.tm-waiting-late > a { font-weight: 600; }
.tm-waiting-client summary { cursor: pointer; margin-top: .75rem; }
.tm-queue-found { margin: .35rem 0 0; padding-left: 1.1rem; font-size: 13px; }
.tm-queue td form { display: inline-block; margin-right: .5rem; }
.tm-authority-list { margin: 0 0 1rem; padding-left: 1.2rem; }
.tm-authority-list li { margin: .5rem 0; }
.tm-authority-list .tm-inline-form { display: inline-flex; margin-left: .75rem; }
.tm-link-danger { color: #b32d2e; }
.tm-draft-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 0 0 1rem; }
.tm-gs-finder { position: relative; margin: .25rem 0 .75rem; }
.tm-gs-finder .tm-gs-input { width: 100%; }
.tm-gs-list { position: absolute; z-index: 20; left: 0; right: 0; max-height: 16rem; overflow-y: auto; margin: 2px 0 0; padding: 0; list-style: none; background: #fff; border: 1px solid var(--tm-control, #6b7280); border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.tm-gs-list [role="option"] { padding: .55rem .75rem; cursor: pointer; line-height: 1.35; }
.tm-gs-list [role="option"][aria-selected="true"], .tm-gs-list [role="option"]:hover { background: var(--tm-bg-soft, #f0f6fc); outline: 2px solid var(--tm-primary, #2271b1); outline-offset: -2px; }
.tm-gs-class { font-size: .85em; color: #50575e; white-space: nowrap; }
.tm-admin-wrap input[type="file"], .tm-admin-wrap .regular-text { max-width: 100%; }
.tm-admin-wrap .subsubsub { display: flex; flex-wrap: wrap; float: none; gap: 0 .25rem; }
.tm-admin-wrap .subsubsub li { white-space: normal; }
.tm-bulk-bar select { max-width: 100%; }

/* 3.24.0 */
.tm-estimate { border: 1px solid var(--tm-border); border-left: 4px solid var(--tm-primary); border-radius: 6px; background: var(--tm-bg-soft); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.tm-estimate h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.tm-estimate-total { margin: 0 0 .5rem; }
.tm-estimate-amount { font-size: 1.5rem; font-weight: 700; color: var(--tm-text); font-variant-numeric: tabular-nums; }
.tm-estimate-lines { margin: 0 0 .5rem; padding-left: 1.2rem; color: var(--tm-text-soft); }
.tm-agent-banner { background: var(--tm-bg-soft); border: 1px solid var(--tm-border); border-left: 4px solid var(--tm-accent); border-radius: 6px; padding: .6rem 1rem; margin: 0 0 1rem; }
.tm-agent-banner p { margin: 0; }
.tm-agent-open { display: flex; flex-wrap: wrap; gap: .5rem; }
.tm-agent-open .tm-btn { padding: .45rem 1rem; min-height: 40px; }
.tm-agent-line, .tm-waiting-line + .tm-agent-line { margin: -.5rem 0 1rem; color: #50575e; }
.tm-proc-list, .tm-evidence-list, .tm-proc-docs { margin: 0 0 .75rem; padding-left: 1.2rem; }
.tm-proc-list li, .tm-evidence-list li { margin: .35rem 0; }
.tm-proc-new { display: flex; flex-wrap: wrap; gap: .5rem; }
.tm-proc-item { border-top: 1px solid var(--tm-border); padding-top: .75rem; margin-top: .75rem; }
.tm-proc-item:first-of-type { border-top: 0; padding-top: 0; }
.tm-proc-item h4 { margin: 0 0 .35rem; }
.tm-proc-history li { margin: .4rem 0; }
.tm-watch-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tm-recordal-request summary, #tm-use-evidence summary { cursor: pointer; margin: .5rem 0; font-weight: 600; }

/* 3.26.0 */
.tm-day-picks { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }

/* --- Staff pages: summary bar, tabs, folded forms (3.28.0) ------------------ */

.tm-status-preparing,
.tm-status-regularisation,
.tm-status-applied,
.tm-status-allowed,
.tm-status-published { background: #dbeafe; color: #1e40af; }
.tm-status-registered,
.tm-status-renewed { background: #d1fae5; color: #065f46; }
.tm-status-refused,
.tm-status-abandoned { background: #fee2e2; color: #991b1b; }
.tm-status-closed,
.tm-status-relied_on { background: #e5e7eb; color: #374151; }

.tm-summary {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 1.25rem 2rem;
	background: #fff;
	border: 1px solid #c9cfd6;
	border-left: 6px solid var(--tm-primary);
	border-radius: 8px;
	padding: 1.1rem 1.5rem;
	margin: 1rem 0 .75rem;
}
.tm-summary p { margin: 0 0 .4rem; }
.tm-summary-mark { font-size: 1.35rem; line-height: 1.3; }
.tm-summary-mark .tm-status { font-size: .8rem; vertical-align: middle; margin-left: .4rem; }
.tm-summary-client { color: #4b5563; }
.tm-summary-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: .75rem 0 0; }
.tm-summary-facts div { min-width: 0; }
.tm-summary-facts dt { font-size: .78rem; color: #4b5563; font-weight: 600; }
.tm-summary-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tm-summary-next { border-left: 1px solid #e5e7eb; padding-left: 1.5rem; }
.tm-summary-label { font-size: .78rem; color: #4b5563; font-weight: 600; }
.tm-summary-actions { margin-top: .75rem !important; display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 782px) {
	.tm-summary { grid-template-columns: minmax(0, 1fr); padding: 1rem; }
	.tm-summary-next { border-left: 0; border-top: 1px solid #e5e7eb; padding: .9rem 0 0; }
}

.tm-view-switch { margin: 0 0 .5rem; text-align: right; }
.tm-view-switch .button-link { min-height: 24px; text-decoration: underline; }

.tm-tablist[hidden],
.tm-tabpanel[hidden] { display: none !important; }
.tm-tablist {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
	border-bottom: 2px solid #c9cfd6;
	margin: 0 0 1.25rem;
}
.tm-tab {
	appearance: none;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	padding: .65rem 1rem;
	min-height: 44px;
	font: inherit;
	font-weight: 600;
	color: #374151;
	cursor: pointer;
}
.tm-tab:hover { color: var(--tm-primary); border-bottom-color: #9ca3af; }
.tm-tab[aria-selected="true"] { color: var(--tm-primary); border-bottom-color: var(--tm-primary); }
.tm-tab:focus-visible { outline: 2px solid var(--tm-primary); outline-offset: -2px; }
.tm-tabpanel:focus { outline: none; }
.tm-tabs-on .tm-tabpanel { max-width: 1100px; }

details.tm-add { margin-top: 1rem; border-top: 1px solid #e5e7eb; padding-top: .75rem; }
details.tm-add > summary {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 .9rem;
	border: 1px solid var(--tm-primary);
	border-radius: 4px;
	color: var(--tm-primary);
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
details.tm-add > summary::-webkit-details-marker { display: none; }
details.tm-add > summary::before { content: "+"; margin-right: .4rem; font-weight: 700; }
details.tm-add[open] > summary { margin-bottom: .75rem; background: #f3f4f6; }
details.tm-add[open] > summary::before { content: "\2212"; }
details.tm-add > summary:focus-visible { outline: 2px solid var(--tm-primary); outline-offset: 2px; }

.tm-settings-tabs { margin: 14px 20px 0 2px; }
.tm-settings-tabs-title { margin: 0 0 .35rem; font-size: .8rem; font-weight: 600; color: #4b5563; }
.tm-settings-tabs ul { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; list-style: none; border-bottom: 2px solid #c9cfd6; }
.tm-settings-tabs li { margin: 0; }
.tm-settings-tabs a { display: inline-block; padding: .55rem .9rem; min-height: 24px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: #374151; font-weight: 600; text-decoration: none; }
.tm-settings-tabs a:hover { color: #1a2f4b; border-bottom-color: #9ca3af; }
.tm-settings-tabs a.is-current { color: #1a2f4b; border-bottom-color: #1a2f4b; }
.tm-settings-tabs a:focus-visible { outline: 2px solid #1a2f4b; outline-offset: 2px; box-shadow: none; }
.tm-bulk-bar[hidden], #tm-bulk-hint[hidden] { display: none !important; }
.tm-marks-table a.tm-sort { color: inherit; text-decoration: none; display: inline-block; min-height: 24px; line-height: 24px; }
.tm-marks-table a.tm-sort:hover, .tm-marks-table a.tm-sort.is-sorted { text-decoration: underline; }
.tm-find-form { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; max-width: 640px; }
.tm-find-form input[type="search"] { flex: 1 1 260px; min-height: 36px; }
.tm-find-list { margin: 0; padding-left: 1.2rem; }
.tm-find-list li { margin: .35rem 0; }
.tm-week-list { margin: 0; padding: 0; list-style: none; }
.tm-week-list li { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: baseline; padding: .45rem 0; border-top: 1px solid #e5e7eb; }
.tm-week-list li:first-child { border-top: 0; }
.tm-week-date { min-width: 6.5em; font-weight: 600; }
#wpadminbar #wp-admin-bar-tm-find .ab-item { height: 32px; padding: 0 8px; }
#wpadminbar #wp-admin-bar-tm-find .tm-bar-find input[type="search"] { height: 24px; margin-top: 4px; padding: 0 8px; width: 220px; font-size: 13px; line-height: 24px; color: #1d2327; background: #fff; border: 1px solid #8c8f94; border-radius: 3px; }
#wpadminbar #wp-admin-bar-tm-find .tm-bar-find input[type="search"]:focus { outline: 2px solid #72aee6; outline-offset: 1px; }
@media screen and (max-width: 782px) { #wpadminbar .tm-bar-find-node { display: none; } }

/* Step 1: the notice folds, and the estimate shows under the classes (3.28.0) */
details.tm-privacy-notice > summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--tm-primary, #1a2f4b);
	min-height: 24px;
}
details.tm-privacy-notice[open] > summary { margin-bottom: .6rem; }
details.tm-privacy-notice > summary:focus-visible { outline: 2px solid var(--tm-primary, #1a2f4b); outline-offset: 2px; }
.tm-estimate-mini[hidden] { display: none; }
.tm-estimate-mini {
	margin: .6rem 0 0;
	padding: .55rem .8rem;
	background: var(--tm-bg-soft, #f6f7f9);
	border-left: 4px solid var(--tm-primary, #1a2f4b);
	border-radius: 4px;
	font-size: .92rem;
}
details.tm-history-more { margin-top: .5rem; }
details.tm-history-more > summary { cursor: pointer; font-weight: 600; color: var(--tm-primary, #1a2f4b); min-height: 24px; }
details.tm-history-more > summary:focus-visible { outline: 2px solid var(--tm-primary, #1a2f4b); outline-offset: 2px; }
.tm-search-form input[type="search"] { min-width: min(320px, 100%); }

/* Long option text never pushes a form wider than a narrow screen. */
.tm-admin-wrap select { max-width: 100%; }
/* Search results: links easy to tap. */
.tm-find-list li { margin: 0; padding: .3em 0; line-height: 1.6; }
.tm-find-list li a { display: inline-block; padding: .2em 0; }

/* --- IPAS (3.29.0): folded "other owners", filing details form ------------- */
details.tm-more > summary { cursor: pointer; font-weight: 600; color: var(--tm-primary, #1a2f4b); min-height: 24px; padding: 6px 0; }
details.tm-more > summary:focus-visible { outline: 2px solid var(--tm-primary, #1a2f4b); outline-offset: 2px; }
details.tm-more[open] > summary { margin-bottom: .6rem; }
#tm-ipas-details h3 { margin: 1.4rem 0 .2rem; padding-top: .8rem; border-top: 1px solid #d8dde3; }
#tm-ipas-details .form-table th { width: 15rem; }

/* --- 3.30.0: keying sheet, term check, other owners ------------------------ */
.tm-sheet .tm-sheet-table { margin: .4rem 0 1rem; }
.tm-sheet .tm-sheet-table th { width: 15rem; font-weight: 600; vertical-align: top; }
.tm-sheet .tm-sheet-value { font-size: 14px; overflow-wrap: anywhere; }
.tm-sheet .tm-sheet-remark { width: 16rem; color: #50575e; }
.tm-sheet .tm-sheet-copy { width: 6.5rem; text-align: right; white-space: nowrap; }
.tm-sheet .tm-sheet-copy .button { min-width: 5rem; min-height: 28px; }
.tm-sheet .tm-sheet-copy .tm-copied { border-color: #1a7f37; color: #1a7f37; }
.tm-term-check { margin: .4rem 0 0; padding: 0; list-style: none; }
.tm-term-check li { margin: 0 0 .15rem; padding-left: .6rem; border-left: 3px solid #c3c4c7; }
.tm-term-check .tm-term-state { font-weight: 600; }
.tm-term-check .tm-term-ok { border-left-color: #1a7f37; }
.tm-term-check .tm-term-other { border-left-color: #b26200; }
.tm-term-check .tm-term-none { border-left-color: #b32d2e; }
#tm-ipas-details > details.tm-add { margin-bottom: .5rem; }
@media (max-width: 782px) {
	.tm-sheet .tm-sheet-table th, .tm-sheet .tm-sheet-remark { width: auto; }
}

/* --- 3.31.0: tick-box questions on the client forms ------------------------ */
.tm-intake-wrap label.tm-check { display: flex; gap: .55rem; align-items: flex-start; font-weight: 400; min-height: 24px; cursor: pointer; }
.tm-intake-wrap label.tm-check input[type="checkbox"] { width: 18px; height: 18px; margin: .15rem 0 0; flex: 0 0 auto; }

/* The "Linked in Cases" card and the "Open a matter in Cases" button. */
.tm-cases-conflicts { margin: .25rem 0 .75rem 1.2rem; list-style: disc; }
.tm-cases-line { margin: .5rem 0; }
.tm-inline-form { margin: .5rem 0; }

/* A mark's timeline in the portal: each step and its date. */
.tm-key-dates { list-style: none; margin: .5rem 0 1rem; padding: 0; border-left: 3px solid #d1d5db; }
.tm-key-dates li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1rem; padding: .45rem 0 .45rem 1.1rem; }
.tm-key-dates li::before { content: ""; position: absolute; left: -.5rem; top: .75rem; width: .7rem; height: .7rem; border-radius: 50%; background: #fff; border: 2px solid #6b7280; }
.tm-key-dates li.is-done::before { background: var(--tm-primary, #1a2f4b); border-color: var(--tm-primary, #1a2f4b); }
.tm-key-dates li.is-next::before { border-color: #166534; box-shadow: 0 0 0 3px rgba(22, 101, 52, .2); }
.tm-key-dates li.is-next .tm-key-step { font-weight: 700; }
.tm-key-dates .tm-key-when { text-align: right; white-space: nowrap; }
.tm-key-dates .tm-key-note { grid-column: 1 / -1; font-size: .85rem; color: #4b5563; }
.tm-key-dates li.is-later { color: #4b5563; }
@media (max-width: 480px) { .tm-key-dates li { grid-template-columns: 1fr; } .tm-key-dates .tm-key-when { text-align: left; } }

/* --- Portal visuals (3.35) ------------------------------------------------ */

/* Step strip: eight small segments, filled up to where the mark is. */
.tm-strip { display: flex; gap: 2px; width: 112px; max-width: 100%; margin-top: .35rem; }
.tm-strip span { flex: 1 1 0; height: 6px; border-radius: 2px; background: #d8dde3; }
.tm-strip span.is-done { background: var(--tm-primary); }
.tm-strip span.is-now { background: #166534; box-shadow: 0 0 0 1px #166534; }

/* The next 12 months. */
.tm-cal-key { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: 0 0 .8rem; }
.tm-cal-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: -1px; margin-right: .1rem; }
.tm-cal-dot.is-urgent { background: #b42318; }
.tm-cal-dot.is-soon { background: #b45309; }
.tm-cal-dot.is-later { background: #5b6b80; }
.tm-cal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: .6rem; }
.tm-cal-month { border: 1px solid var(--tm-border); border-radius: 8px; padding: .55rem .65rem .6rem; background: #fff; min-height: 5.5rem; }
.tm-cal-month.is-empty { background: var(--tm-bg-soft); }
.tm-cal-name { margin: 0 0 .35rem; font-size: .82rem; font-weight: 700; color: var(--tm-text-soft); letter-spacing: .01em; }
.tm-cal-none { margin: 0; font-size: .8rem; color: #6b7280; }
.tm-cal-events { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.tm-cal-ev { font-size: .84rem; line-height: 1.3; padding: .25rem .4rem .3rem .55rem; border-left: 4px solid #5b6b80; background: #f3f5f8; border-radius: 0 4px 4px 0; }
.tm-cal-ev.is-soon { border-left-color: #b45309; background: #fff7ea; }
.tm-cal-ev.is-urgent { border-left-color: #b42318; background: #fdeeee; }
.tm-cal-ev a { color: inherit; text-decoration: none; display: block; }
.tm-cal-ev a:hover .tm-cal-title, .tm-cal-ev a:focus-visible .tm-cal-title { text-decoration: underline; }
.tm-cal-day { font-weight: 700; color: var(--tm-primary); margin-right: .15rem; }
.tm-cal-what { display: block; color: var(--tm-text-soft); font-size: .78rem; }
.tm-cal-late { margin: 0 0 .8rem; padding: .5rem .7rem; border: 1px solid #f1b4b4; background: #fdeeee; border-radius: 6px; }
.tm-cal-late .tm-cal-events { margin-top: .35rem; }

/* Needs you, for agents. */
.tm-needs-list li { display: block; }
.tm-needs-date { margin-right: .35rem; }

/* Bars by class and by client. */
.tm-bars { list-style: none; margin: .2rem 0 .9rem; padding: 0; display: grid; gap: .45rem; }
.tm-bars li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 4.6rem; gap: .6rem; align-items: center; font-size: .88rem; }
.tm-bar-label { overflow-wrap: anywhere; }
.tm-bar-label .tm-fine-print { display: block; font-size: .76rem; }
.tm-bar { height: .7rem; background: #eef1f4; border-radius: 999px; overflow: hidden; }
.tm-bar span { display: block; height: 100%; background: var(--tm-primary-light); border-radius: 999px; }
.tm-bar-n { text-align: right; color: var(--tm-text-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
	.tm-bars li { grid-template-columns: 1fr 4.4rem; }
	.tm-bars .tm-bar-label { grid-column: 1 / -1; }
}

/* Where an agent's clients are. */
.tm-map { margin: 0 0 .8rem; }
.tm-map svg { display: block; width: 100%; height: auto; background: #f2f5f8; border-radius: 8px; }
.tm-map-land { fill: #d5dce4; stroke: #fff; stroke-width: .6; }
.tm-map-dot { fill: var(--tm-primary); fill-opacity: .82; stroke: #fff; stroke-width: 1.5; }
.tm-map-table { max-width: 28rem; }
.tm-map-table td { font-variant-numeric: tabular-nums; }

/* Watch. */
.tm-watch-list { list-style: none; margin: 0; padding: 0; }
.tm-watch-list li { padding: .45rem 0; border-bottom: 1px solid var(--tm-border); }
.tm-watch-list li:last-child { border-bottom: 0; }

/* Proof of use gauge. */
.tm-gauge-wrap { margin: .3rem 0 .8rem; }
.tm-gauge-wrap.is-compact { margin: .45rem 0 0; display: grid; gap: .2rem; }
.tm-gauge { height: .6rem; border-radius: 999px; background: #eef1f4; overflow: hidden; max-width: 22rem; }
.tm-gauge-fill { display: block; height: 100%; border-radius: 999px; }
.tm-gauge.is-good .tm-gauge-fill { background: #1e6b3e; }
.tm-gauge.is-soon .tm-gauge-fill { background: #b45309; }
.tm-gauge.is-late .tm-gauge-fill { background: #b42318; }
.tm-gauge-text { margin: .35rem 0 0; }

/* The second row of the marks toolbar. */
.tm-portal-toolbar-2 { gap: .6rem 1rem; }
.tm-tool { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--tm-text-soft); }
.tm-tool select { min-height: 38px; padding: .3rem .5rem; border: 1px solid var(--tm-control); border-radius: 4px; background: #fff; color: var(--tm-text); font-size: .95rem; max-width: 14rem; }
.tm-view-switch { margin-left: auto; }
[data-tm-pane][hidden], .tm-mark-card[hidden] { display: none !important; }

/* Mark cards. */
.tm-mark-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .8rem; }
.tm-mark-card { border: 1px solid var(--tm-border); border-radius: 10px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.tm-mark-card-pic { height: 108px; display: flex; align-items: center; justify-content: center; background: var(--tm-bg-soft); border-bottom: 1px solid var(--tm-border); padding: .6rem; }
.tm-mark-card-pic img { max-height: 92px; max-width: 100%; object-fit: contain; }
.tm-mark-card-pic.is-word span { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 700; color: var(--tm-primary); text-align: center; line-height: 1.15; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tm-mark-card-body { padding: .65rem .8rem .8rem; display: flex; flex-direction: column; gap: .3rem; }
.tm-mark-card-body p { margin: 0; }
.tm-mark-card-name { margin: 0; font-size: 1.02rem; line-height: 1.25; }
.tm-mark-card-name a { color: var(--tm-text); }
.tm-mark-card-next { font-size: .86rem; }
.tm-chips { list-style: none; margin: .15rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; }
.tm-chips li { font-size: .76rem; padding: .08rem .45rem; border: 1px solid #b9c2cd; border-radius: 999px; color: var(--tm-text-soft); }

/* Ask us to act. */
.tm-instruct-list { margin: 0 0 .7rem; padding-left: 1.1rem; }
.tm-instruct-list li { margin: .2rem 0; }

@media print {
	.tm-portal-toolbar, .tm-view-switch { display: none; }
	.tm-cal-ev, .tm-cal-month { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
	.tm-mark-card, .tm-cal-ev { transition: none; }
}

/* --- Requests offline (3.36) ---------------------------------------------- */
.tm-offline { border-left: 6px solid var(--tm-primary); }
.tm-offline h2 { margin-top: 0; font-size: 1.6rem; line-height: 1.25; }
.tm-offline-form h3 { font-size: 1.15rem; }
.tm-offline-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--tm-border); }
.tm-offline-form h3 { margin-top: 0; }
.tm-availability { background: #fff; border: 1px solid #c9cfd6; border-left: 6px solid #1e6b3e; border-radius: 8px; padding: .4rem 1.25rem 1rem; margin: 1.25rem 0; max-width: 60rem; }
.tm-availability.is-closed { border-left-color: #b45309; background: #fffbeb; }
.tm-availability h2 { margin: .8rem 0 .4rem; }
.tm-availability fieldset label { line-height: 2; }
.tm-inline-form { display: inline-flex; flex-wrap: wrap; gap: .5rem; }
.tm-demo-card { border-left-color: #4a3aa3; }
.tm-demo-logins { margin: .3rem 0 1rem 1.2rem; list-style: disc; }

/* --- Theme guards (3.37.1) ---------------------------------------------------
 * Themes that indent lists inside page content (".single-content ol") are
 * outranked for the portal's own lists. */
.tm-intake-wrap .tm-cal, .tm-intake-wrap .tm-cal-events, .tm-intake-wrap .tm-attention-list, .tm-intake-wrap .tm-bars,
.tm-intake-wrap .tm-mark-cards, .tm-intake-wrap .tm-chips, .tm-intake-wrap .tm-watch-list, .tm-intake-wrap .tm-instruct-list { margin-left: 0; }
.tm-intake-wrap .tm-cal, .tm-intake-wrap .tm-cal-events, .tm-intake-wrap .tm-attention-list, .tm-intake-wrap .tm-bars,
.tm-intake-wrap .tm-mark-cards, .tm-intake-wrap .tm-chips, .tm-intake-wrap .tm-watch-list { padding-left: 0; }

/* --- Staff view of the portal (3.38) ---------------------------------------- */
.tm-staff-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin: 0 0 1rem; padding: .7rem 1rem; border: 1px solid #c4b5fd; border-left: 6px solid #4a3aa3; border-radius: 8px; background: #f5f3ff; }
.tm-staff-bar p { margin: 0; }
.tm-staff-bar-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.tm-staff-bar-links a[aria-current="page"] { font-weight: 700; text-decoration: none; }
form.tm-staff-off { opacity: .55; }
form.tm-staff-off button, form.tm-staff-off input, form.tm-staff-off select, form.tm-staff-off textarea { cursor: not-allowed; }

/* --- Modern Web Guidance (3.39) ----------------------------------------------
 * Text in fields is never below 16px, so phones do not zoom in when a field
 * is tapped, and fields use the page's own typeface.
 */
.tm-intake-wrap input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]),
.tm-intake-wrap select,
.tm-intake-wrap textarea {
	font-family: inherit;
	font-size: max(1rem, 1em);
}

/* --- Streamlined request form (3.40) ----------------------------------------- */
/* A returning client's details on one line. */
.tm-intake-wrap .tm-filing-as {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: .25rem 1rem;
	margin: 1rem 0 1.25rem;
	padding: .75rem 1rem;
	border: 1px solid var(--tm-border);
	border-radius: 8px;
	background: var(--tm-bg-soft);
}
.tm-intake-wrap .tm-filing-as p {
	margin: 0;
	min-width: 0;
	overflow-wrap: anywhere;
}
.tm-intake-wrap .tm-filing-as-label {
	font-weight: 600;
}

/* Step 2 during the conflict check: what comes once it clears. */
.tm-intake-wrap .tm-early-later {
	margin: 1rem 0 1.25rem;
	padding: .8rem 1rem;
	border-left: 4px solid var(--tm-primary-light);
	background: var(--tm-bg-soft);
}
.tm-intake-wrap .tm-early-later p {
	margin: 0;
}

/* --- Team logins (3.41) -------------------------------------------------------
 * A login with its own account and a place on an agent's team picks which
 * one it works as, in the portal header.
 */
.tm-intake-wrap .tm-account-switch {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem .5rem;
	margin: 0;
	min-width: 0;
	max-width: 100%;
}
.tm-intake-wrap .tm-account-switch label {
	font-weight: 600;
	font-size: .9rem;
}
.tm-intake-wrap .tm-account-switch select {
	flex: 1 1 12rem;
	width: auto;
	max-width: 100%;
	min-width: 0;
	text-overflow: ellipsis;
}
/* Staff: adding or linking team logins on the agent's page. */
#tm-client-team .tm-team-list li {
	margin-bottom: .6rem;
}
#tm-client-team .tm-team-list .tm-fine-print {
	display: block;
}
#tm-client-team .tm-team-staff-forms {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
	gap: 1rem 2rem;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid #dcdcde;
}
#tm-client-team .tm-team-staff-form h3 {
	margin: 0 0 .25rem;
	font-size: 1em;
}
#tm-client-team .tm-team-staff-form .regular-text {
	width: 100%;
	max-width: 25rem;
}

/* Official fees invoice form on a mark's page (3.42). */
.tm-official-fees {
	margin-top: 1rem;
	padding-top: .75rem;
	border-top: 1px solid #dcdcde;
}
.tm-official-fees > summary {
	cursor: pointer;
	font-weight: 600;
}
.tm-official-fees .tm-official-lines input[type="text"] {
	width: 100%;
}
.tm-official-fees .tm-official-lines td:first-child {
	width: 70%;
}

/* Country dropdown with "Other": the box for typing one in sits under it. */
.tm-country-other { display: block; margin-top: .5rem; }
.tm-country-other[hidden] { display: none; }

/* Goods and services, a box for each ticked class. */
.tm-gs-classes { margin-top: 1rem; }
.tm-gs-classes[hidden] { display: none; }
.tm-gs-class-row textarea { width: 100%; box-sizing: border-box; }
.tm-gs-class-row + .tm-gs-class-row { margin-top: .75rem; }

/* Classes with the goods or services of each, in the client portal. */
.tm-class-goods { list-style: none; margin: 0 0 1rem; padding: 0; }
.tm-class-goods li { padding: .6rem 0; border-top: 1px solid var(--tm-border); }
.tm-class-goods li:first-child { border-top: 0; }
.tm-class-goods p { margin: 0; }
.tm-class-goods .tm-class-goods-num { font-weight: 700; font-size: 1rem; line-height: 1.4; }
.tm-class-goods .tm-class-goods-text { font-size: 1rem; line-height: 1.5; margin-top: .15rem; }
.tm-class-goods .tm-class-goods-heading { font-size: .85rem; line-height: 1.45; margin-top: .3rem; }

/* Filing details on the client's mark page. */
.tm-filing-details { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.tm-filing-details caption { text-align: left; font-weight: 700; padding: .4rem 0; }
.tm-filing-details th, .tm-filing-details td { text-align: left; vertical-align: top; padding: .4rem .5rem .4rem 0; border-top: 1px solid var(--tm-border); }
.tm-filing-details th { width: 38%; font-weight: 600; }
.tm-filing-details td { overflow-wrap: anywhere; }
@media (max-width: 520px) { .tm-filing-details th, .tm-filing-details td { display: block; width: auto; } .tm-filing-details td { border-top: 0; padding-top: 0; } }

/* The agent's client list: "Handled by" and the buttons fit a phone. */
.tm-handled { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tm-handled select { min-width: 0; max-width: 100%; }
.tm-agent-open { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (max-width: 640px) {
	.tm-agent-clients td.tm-handled-cell { display: block; text-align: left; }
	.tm-agent-clients td.tm-handled-cell::before { display: block; margin-bottom: .3rem; }
	.tm-agent-clients .tm-handled { width: 100%; }
	.tm-agent-clients .tm-handled select { flex: 1 1 100%; width: 100%; }
	.tm-agent-clients .tm-agent-open .tm-btn { flex: 1 1 auto; }
	.tm-agent-clients td[data-label=""]::before { display: none; }
	.tm-agent-clients .tm-agent-open { width: 100%; }
}

/* --- Portal app layout (3.43) ---------------------------------------------
   A menu down the left on wide screens, a bar along the bottom on phones.
   The menu sits outside the size container, so the phone bar can be fixed
   to the window; the content column is the container the cards query. */
.tm-intake-wrap:has(> .tm-app) { container-type: normal; max-width: 1320px; }
.tm-app-main { container: tm-portal / inline-size; min-width: 0; }
.tm-rail-brand { display: none; }
.tm-rail-ico { width: 20px; height: 20px; flex: none; }
.tm-intake-wrap .tm-portal-nav.tm-rail { margin: 0; }
.tm-intake-wrap .tm-portal-nav.tm-rail a { border: 0; text-decoration: none; }
.tm-portal-header { margin-bottom: .75rem; }
@media (min-width: 960px) {
	.tm-app { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 2rem; align-items: start; }
	.tm-intake-wrap .tm-portal-nav.tm-rail { position: sticky; top: 1.25rem; background: var(--tm-primary); border-radius: 16px; padding: 1.1rem .7rem; }
	.tm-rail-brand { display: block; color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.3; margin: 0 0 1rem; padding: 0 .6rem 1rem; border-bottom: 1px solid rgba(255,255,255,.16); }
	.tm-rail-brand span { display: block; font-weight: 400; font-size: .8rem; color: #c3d0de; margin-top: .15rem; }
	.tm-portal-nav.tm-rail ul { flex-direction: column; flex-wrap: nowrap; gap: 2px; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a { display: flex; width: 100%; gap: .65rem; min-height: 42px; padding: .45rem .65rem; border-radius: 9px; background: transparent; color: #dfe7ef; font-weight: 500; font-size: .95rem; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a:hover { background: rgba(255,255,255,.09); color: #fff; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; font-weight: 700; }
	.tm-portal-nav.tm-rail .tm-count { margin-left: auto; background: #f0b45a; color: #1a2f4b; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a:focus-visible { outline: 3px solid #f0b45a; outline-offset: 1px; }
}
@media (max-width: 959.98px) {
	.tm-intake-wrap .tm-portal-nav.tm-rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: #fff; border-top: 1px solid var(--tm-border); padding: .25rem .25rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(26,47,75,.06); }
	.tm-portal-nav.tm-rail ul { flex-wrap: nowrap; overflow-x: auto; gap: 0; justify-content: flex-start; scrollbar-width: none; }
	.tm-portal-nav.tm-rail li { flex: 1 0 auto; display: flex; justify-content: center; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a { position: relative; flex-direction: column; justify-content: center; gap: 2px; min-height: 54px; min-width: 64px; padding: .25rem .4rem; border-radius: 10px; background: transparent; color: var(--tm-text-soft); font-size: .72rem; font-weight: 600; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a[aria-current="page"] { background: transparent; color: var(--tm-primary); font-weight: 800; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--tm-primary); }
	.tm-portal-nav.tm-rail .tm-count { position: absolute; top: 3px; right: calc(50% - 22px); font-size: .62rem; min-width: 1.3em; }
	.tm-app-main { padding-bottom: 88px; }
}
/* Forms keep a comfortable reading width inside the wide layout. */
.tm-app-main > #tm-intake-step1-form, .tm-app-main > .tm-intake-form, .tm-app-main > form.tm-step2-form { max-width: 820px; }

/* Top bar: title, search, the main action */
.tm-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 0 0 1.25rem; }
.tm-topbar .tm-view-title { margin: 0; flex: 1 1 auto; font-size: 1.7rem; letter-spacing: -.01em; }
.tm-topbar-search { flex: 0 1 340px; }
.tm-topbar-search input { width: 100%; min-height: 44px; border: 1px solid var(--tm-border); border-radius: 10px; padding: .5rem .85rem; font: inherit; background: #fff; }
.tm-topbar > .tm-btn { margin: 0; }
@container tm-portal (max-width: 640px) {
	.tm-topbar-search { flex: 1 1 100%; order: 3; }
	.tm-topbar .tm-view-title { font-size: 1.4rem; }
}

/* The next step: the one thing to do, then the rest in a line */
.tm-focus { background: var(--tm-primary); color: #fff; border-radius: 16px; padding: 1.25rem 1.4rem; margin: 0 0 1.75rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 1.75rem; align-items: center; }
.tm-focus h3 { color: #fff; font-size: 1.3rem; margin: 0 0 .3rem; }
.tm-focus p { margin: 0; color: #dbe4ee; }
.tm-focus .tm-focus-lbl { font-size: .85rem; color: #b6c6d8; margin: 0 0 .2rem; }
.tm-intake-wrap a.tm-btn-light, .tm-btn-light { background: #fff; border-color: #fff; color: var(--tm-primary); }
.tm-focus-also { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.16); padding-top: .75rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .92rem; }
.tm-focus-also ul { display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.tm-intake-wrap .tm-focus a:not(.tm-btn) { color: #fff; }
.tm-intake-wrap .tm-focus a:focus-visible { outline-color: #f0b45a; }
@container tm-portal (max-width: 640px) { .tm-focus { grid-template-columns: 1fr; } .tm-focus > .tm-btn { justify-self: start; } }
.tm-allclear-line { color: var(--tm-text-soft); margin: -.25rem 0 1.25rem; }

/* Sections, chips */
.tm-home-sec { margin: 0 0 2rem; }
.tm-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; margin: 0 0 .85rem; }
.tm-sec-head h3 { margin: 0; font-size: 1.15rem; }
.tm-sec-tools { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.tm-chips { display: flex; gap: .35rem; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tm-intake-wrap .tm-chip { flex: none; white-space: nowrap; min-height: 36px; border: 1px solid var(--tm-border); background: #fff; color: var(--tm-text); border-radius: 999px; padding: .25rem .85rem; font: inherit; font-size: .88rem; cursor: pointer; }
.tm-intake-wrap .tm-chip.is-on { background: var(--tm-primary); border-color: var(--tm-primary); color: #fff; }
.tm-badge-turn { background: #fdf0dc; color: #8a4a00; }
.tm-home-all { margin: .9rem 0 0; }
.tm-empty { background: #fff; border: 1px dashed var(--tm-border); border-radius: 14px; padding: 1.1rem 1.25rem; }

/* Mark cards with the journey */
.tm-mcards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: .9rem; }
.tm-mcard { background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; padding: 1rem 1.1rem; margin: 0; }
.tm-mcard.is-turn { border-color: #e6b46a; box-shadow: inset 4px 0 0 #e8a33d; }
.tm-mcard-head { display: flex; gap: .8rem; align-items: flex-start; }
.tm-mcard-title { flex: 1; min-width: 0; }
.tm-mcard-title .tm-fine-print { margin: .1rem 0 0; }
.tm-mcard-name { margin: 0; font-size: 1.02rem; font-weight: 700; overflow-wrap: anywhere; }
.tm-intake-wrap .tm-mcard-name a { color: inherit; text-decoration: none; }
.tm-intake-wrap .tm-mcard-name a:hover { text-decoration: underline; }
.tm-mcard-next { margin: .6rem 0 0; font-size: .93rem; }
.tm-mcard .tm-btn-small { margin: .6rem 0 0; }
.tm-pic { width: 48px; height: 48px; flex: none; border: 1px solid var(--tm-border); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tm-pic-img { width: 100%; height: 100%; object-fit: contain; }
.tm-pic.is-word { background: #f3f5f8; font-size: .56rem; font-weight: 800; line-height: 1.1; text-align: center; padding: 3px; overflow-wrap: anywhere; color: var(--tm-primary); }
.tm-life { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); margin: .85rem 0 .1rem; padding: 0; }
.tm-life li { position: relative; margin: 0; padding-top: 16px; font-size: .72rem; color: var(--tm-text-soft); }
.tm-life li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 3px; background: var(--tm-border); }
.tm-life li:last-child::before { display: none; }
.tm-life li::after { content: ""; position: absolute; top: 0; left: 0; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid #b8c2cd; box-sizing: border-box; }
.tm-life li.is-done::before { background: #0a7a88; }
.tm-life li.is-done::after { background: #0a7a88; border-color: #0a7a88; }
.tm-life li.is-now { color: var(--tm-text); font-weight: 700; }
.tm-life li.is-now::after { width: 14px; height: 14px; top: -1.5px; border: 3px solid #0a7a88; background: #fff; box-shadow: 0 0 0 4px #dff1f3; }
.tm-life li.is-now:not(.is-done)::before { background: var(--tm-border); }
.tm-life.is-compact li { font-size: .68rem; }
.tm-journey-ended { margin: .7rem 0 0; }

/* Timeline view */
.tm-tl { background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; overflow: hidden; }
.tm-tl-head, .tm-tl-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.tm-tl-head { border-bottom: 1px solid var(--tm-border); font-size: .75rem; color: var(--tm-text-soft); }
.tm-tl-lab { padding: .55rem 1rem; }
.tm-tl-months { display: grid; grid-template-columns: repeat(12, 1fr); }
.tm-tl-months span { padding: .55rem 0 .55rem .35rem; border-left: 1px solid #eef1f5; }
.tm-tl-row { border-bottom: 1px solid #eef1f5; min-height: 76px; }
.tm-tl-row:last-child { border-bottom: 0; }
.tm-tl-mark { display: flex; gap: .6rem; align-items: center; padding: .7rem 1rem; font-size: .92rem; }
.tm-tl-mark .tm-pic { width: 40px; height: 40px; }
.tm-intake-wrap .tm-tl-mark a { color: inherit; text-decoration: none; }
.tm-tl-track { position: relative; background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 12 - 1px), #eef1f5 calc(100% / 12 - 1px), #eef1f5 calc(100% / 12)); }
.tm-tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #b3261e; }
.tm-tl-bar { position: absolute; top: 14px; height: 24px; border-radius: 7px; font-size: .75rem; font-weight: 600; padding: 3px 8px; white-space: nowrap; overflow: hidden; box-sizing: border-box; }
.tm-tl-bar.is-turn { background: #fdf0dc; color: #8a4a00; border: 1px dashed #d9953a; }
.tm-tl-bar.is-with { background: linear-gradient(90deg, #dff1f3 60%, rgba(223,241,243,0)); color: #0a5f6a; }
.tm-tl-bar.is-opp { background: #ece6fa; color: #4c3596; }
.tm-tl-pin { position: absolute; top: 12px; transform: translateX(-50%); text-align: center; font-size: .7rem; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.tm-tl-pin::before { content: ""; display: block; width: 11px; height: 11px; margin: 0 auto 3px; border-radius: 2px; background: var(--tm-primary); transform: rotate(45deg); }
.tm-tl-pin > span { display: inline-block; background: rgba(255,255,255,.9); padding: 0 2px; }
.tm-tl-key { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: .6rem 0 0; }
.tm-tl-k { display: inline-block; width: 18px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: -.5rem; }
.tm-tl-k.is-turn { background: #fdf0dc; border: 1px dashed #d9953a; } .tm-tl-k.is-with { background: #dff1f3; } .tm-tl-k.is-opp { background: #ece6fa; }
.tm-tl-k.is-pin { width: 9px; height: 9px; border-radius: 2px; background: var(--tm-primary); transform: rotate(45deg); }
@container tm-portal (max-width: 700px) {
	.tm-tl-head, .tm-tl-row { grid-template-columns: 1fr; }
	.tm-tl-lab { display: none; }
	.tm-tl-mark { padding-bottom: .2rem; }
	.tm-tl-track { min-height: 70px; }
	.tm-tl-months span { font-size: .62rem; padding-left: 2px; }
}

/* Coming up */
.tm-dates { list-style: none; margin: 0; padding: 0 0 .25rem; display: flex; gap: .7rem; overflow-x: auto; }
.tm-dates li { flex: none; margin: 0; min-width: 180px; max-width: 260px; background: #fff; border: 1px solid var(--tm-border); border-radius: 12px; border-top: 3px solid #b8c2cd; }
.tm-dates li.is-urgent { border-top-color: #b3261e; } .tm-dates li.is-soon { border-top-color: #e8a33d; }
.tm-dates li > a, .tm-dates li > span:first-child { display: block; padding: .65rem .85rem; color: inherit; text-decoration: none; }
.tm-dates li:not(:has(a)) { padding: .65rem .85rem; }
.tm-date-d { display: block; font-weight: 700; }
.tm-date-t { display: block; font-size: .85rem; color: var(--tm-text-soft); }
.tm-home-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; align-items: start; }

/* Agent: needs inbox, clients beside one client's marks */
.tm-agent-start { display: flex; gap: .5rem; flex-wrap: wrap; position: relative; }
.tm-pop { position: relative; }
.tm-pop > summary { list-style: none; margin: 0; }
.tm-pop > summary::-webkit-details-marker { display: none; }
.tm-pop-panel { position: absolute; right: 0; top: calc(100% + .5rem); z-index: 30; width: min(420px, 92vw); background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; box-shadow: 0 12px 32px rgba(26,47,75,.16); padding: 1rem 1.1rem; }
.tm-pop-panel h3 { margin: 0 0 .6rem; font-size: 1.05rem; }
.tm-pop-panel select, .tm-pop-panel input { width: 100%; }
@container tm-portal (max-width: 640px) { .tm-pop { position: static; } .tm-pop-panel { left: 0; right: 0; width: auto; } }
.tm-inbox { background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; margin: 0 0 1.5rem; }
.tm-inbox h3 { margin: 0; padding: .9rem 1.1rem .4rem; font-size: 1.1rem; }
.tm-inbox ul { list-style: none; margin: 0; padding: 0; }
.tm-inbox-row { display: grid; grid-template-columns: 150px 190px minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; padding: .7rem 1.1rem; border-top: 1px solid #eef1f5; margin: 0; }
.tm-inbox-row .tm-btn-small { margin: 0; }
@container tm-portal (max-width: 760px) {
	.tm-inbox-row { grid-template-columns: 1fr; gap: .3rem; }
	.tm-inbox-who { order: -1; }
	.tm-inbox-when:empty { display: none; }
	.tm-inbox-row .tm-btn { justify-self: start; }
}
.tm-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; align-items: start; margin: 0 0 2rem; }
@container tm-portal (min-width: 760px) { .tm-split { grid-template-columns: 300px minmax(0, 1fr); } }
.tm-clist { background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; overflow: hidden; }
.tm-clist ul { list-style: none; margin: 0; padding: 0; }
.tm-clist li { margin: 0; border-top: 1px solid #eef1f5; }
.tm-clist li:first-child { border-top: 0; }
.tm-intake-wrap .tm-clist a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; align-items: center; padding: .75rem 1rem; color: inherit; text-decoration: none; }
.tm-intake-wrap .tm-clist a:hover { background: #f6f8fa; }
.tm-intake-wrap .tm-clist a[aria-current="true"] { background: #eef3f8; box-shadow: inset 3px 0 0 var(--tm-primary); }
.tm-clist-name { font-weight: 700; }
.tm-clist-sub { grid-column: 1 / -1; margin: 0; }
.tm-clist-none { padding: .75rem 1rem; margin: 0; }
.tm-own-tag { display: inline-block; font-size: .7rem; font-weight: 600; background: #e8edf3; border-radius: 999px; padding: .05rem .5rem; vertical-align: middle; }
.tm-cdetail { background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; padding: 1.1rem 1.25rem; scroll-margin-top: 1rem; }
.tm-cdetail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: .6rem 1rem; }
.tm-cdetail-head h3 { margin: 0; font-size: 1.3rem; }
.tm-cdetail-head .tm-fine-print { margin: .15rem 0 0; }
.tm-cdetail-head form { display: flex; flex-wrap: wrap; gap: .4rem; }
.tm-cdetail-head .tm-btn-small { margin: 0; }
.tm-cdetail-team { margin: .6rem 0 0; }
.tm-mrows { list-style: none; margin: .75rem 0 0; padding: 0; }
.tm-mrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(200px, 250px); gap: .9rem; align-items: center; padding: .85rem 0; border-top: 1px solid #eef1f5; margin: 0; }
.tm-mrow-main .tm-fine-print, .tm-mrow-next { margin: .1rem 0 0; }
.tm-mrow-next { font-size: .9rem; }
.tm-mrow .tm-life { margin: 0; }
@container tm-portal (max-width: 900px) {
	.tm-mrow { grid-template-columns: 48px minmax(0, 1fr); }
	.tm-mrow-life { grid-column: 2; }
}
.tm-app-main .tm-portal-header { font-size: .92rem; padding-bottom: .6rem; }
.tm-app-main .tm-portal-header .tm-portal-who { margin: 0; }
.tm-focus h3, .tm-cdetail-head h3, .tm-sec-head h3, .tm-inbox h3 { font-weight: 700; }
@container tm-portal (min-width: 760.02px) {
	.tm-inbox-row { grid-template-columns: minmax(0, 130px) minmax(0, 190px) minmax(0, 1fr) auto; }
}
.tm-rail-label { white-space: nowrap; }

/* The portal on its own page (no theme header or footer). */
body.tm-portal-standalone { margin: 0; background: #f2f4f7; }
.tm-standalone { max-width: 1480px; margin: 0 auto; padding: 1.25rem clamp(.75rem, 2.5vw, 2.5rem) 2.5rem; box-sizing: border-box; }
.tm-portal-standalone .tm-intake-wrap:has(> .tm-app) { max-width: none; margin: 0; }
.tm-rail-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.tm-rail-site { display: none; }
@media (min-width: 960px) {
	.tm-rail-brand { display: flex; align-items: center; gap: .65rem; }
	.tm-portal-standalone .tm-intake-wrap .tm-portal-nav.tm-rail { min-height: calc(100vh - 2.5rem); display: flex; flex-direction: column; box-sizing: border-box; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a.tm-rail-site { display: flex; margin-top: auto; padding-top: 1rem; font-size: .85rem; color: #c3d0de; border-top: 1px solid rgba(255,255,255,.16); border-radius: 0; min-height: 0; }
}
@media (max-width: 959.98px) { .tm-intake-wrap .tm-portal-nav.tm-rail a.tm-rail-site { display: none; } }
.tm-portal-standalone .tm-intake-wrap { background: transparent; box-shadow: none; border: 0; padding: 0; }
.tm-rail-name { display: block; color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.tm-rail-name span { display: block; font-weight: 400; font-size: .8rem; color: #c3d0de; }
.tm-rail-who { display: none; }
@media (min-width: 960px) {
	/* On its own page the menu runs the full height, flush with the window's left edge. */
	.tm-portal-standalone .tm-standalone { padding: 0; max-width: none; }
	.tm-portal-standalone .tm-app { grid-template-columns: 236px minmax(0, 1fr); gap: 0; }
	.tm-portal-standalone .tm-intake-wrap .tm-portal-nav.tm-rail { position: sticky; top: 0; height: 100vh; min-height: 0; border-radius: 0; padding: 1.4rem .85rem 1.1rem; overflow-y: auto; }
	.tm-portal-standalone .tm-app-main { padding: 1.75rem clamp(1.5rem, 3vw, 2.75rem) 3rem; max-width: 1240px; }
	.tm-portal-standalone .tm-rail-who { display: block; margin: .75rem 0 0; padding: .75rem .65rem 0; border-top: 1px solid rgba(255,255,255,.16); color: #fff; font-size: .88rem; line-height: 1.35; }
	.tm-portal-standalone .tm-intake-wrap .tm-portal-nav.tm-rail a.tm-rail-logout { display: block; min-height: 0; padding: .3rem 0 0; color: #c3d0de; font-size: .85rem; text-decoration: underline; border-radius: 0; background: none; }
	.tm-portal-standalone .tm-intake-wrap .tm-portal-nav.tm-rail a.tm-rail-site { padding: .9rem .65rem 0; }
	/* Who is signed in is at the foot of the menu, so the line above the content goes, unless it holds a switcher. */
	.tm-portal-standalone .tm-app:has(.tm-rail-who) .tm-app-main > .tm-portal-header:not(:has(form, select)) { display: none; }
}
.tm-intake-wrap .tm-portal-nav.tm-rail a, .tm-intake-wrap .tm-portal-nav.tm-rail li, .tm-intake-wrap .tm-portal-nav.tm-rail ul { box-sizing: border-box; max-width: 100%; }
.tm-rail-brand .tm-rail-name { display: block; color: #fff; font-weight: 700; font-size: .98rem; line-height: 1.3; margin: 0; }
.tm-rail-brand .tm-rail-name span { display: block; font-weight: 400; font-size: .8rem; color: #c3d0de; margin-top: .1rem; }
/* An agent's open client: a labelled group under "Clients" */
.tm-rail-group-head { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
@media (min-width: 960px) {
	.tm-rail-group-head { margin: .6rem 0 .1rem; padding: .5rem .65rem .2rem; border-top: 1px solid rgba(255,255,255,.16); }
	.tm-rail-group-name { color: #fff; font-weight: 700; font-size: .85rem; line-height: 1.3; overflow-wrap: anywhere; }
	.tm-intake-wrap .tm-portal-nav.tm-rail a.tm-rail-close { width: auto; min-height: 28px; min-width: 28px; padding: 0; justify-content: center; font-size: 1.1rem; color: #c3d0de; border-radius: 6px; }
	.tm-intake-wrap .tm-portal-nav.tm-rail li.tm-rail-sub a { padding-left: 1.35rem; }
	.tm-rail-sub + li:not(.tm-rail-sub) { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid rgba(255,255,255,.16); }
}
@media (max-width: 959.98px) {
	.tm-rail-group-head { display: none; }
}
/* The chip rows scroll on their own; they never widen the page. */
.tm-sec-head > *, .tm-sec-tools, .tm-chips { min-width: 0; max-width: 100%; }
.tm-sec-tools { flex: 1 1 auto; justify-content: flex-end; }
@container tm-portal (max-width: 640px) { .tm-sec-tools { justify-content: flex-start; } }
/* The agent's Power of Attorney section, in a client's panel */
.tm-cdetail-auth { margin: 1rem 0 0; padding: .9rem 0 0; border-top: 1px solid var(--tm-border); }
.tm-cdetail-auth h4 { margin: 0 0 .4rem; font-size: 1rem; }
.tm-auth-list { list-style: none; margin: 0 0 .3rem; padding: 0; }
.tm-auth-list li { margin: .25rem 0; }
.tm-auth-add > summary { list-style: none; display: inline-flex; margin: .5rem 0 0; }
.tm-auth-add > summary::-webkit-details-marker { display: none; }
.tm-auth-add form { margin: .75rem 0 0; max-width: 560px; }
.tm-auth-add fieldset { border: 0; padding: 0; margin: 0 0 .8rem; }
.tm-auth-add legend { font-weight: 600; margin-bottom: .3rem; }
.tm-auth-add fieldset > label { display: block; margin: .25rem 0; }
.tm-auth-add select, .tm-auth-add input[type="date"] { max-width: 100%; }
.tm-auth-marks { margin: .3rem 0 0 1.6rem !important; max-height: 220px; overflow-y: auto; }
.tm-auth-marks label { display: block; margin: .2rem 0; }
.tm-cdetail-auth h4 { font-weight: 700; }
.tm-intake-wrap .tm-auth-add legend { font-size: .95rem; font-weight: 700; color: var(--tm-text); padding: 0; }
.tm-auth-add fieldset > .tm-hint { margin: 0 0 .3rem 1.6rem; }
.tm-intake-wrap .tm-auth-list li { font-size: .95rem; line-height: 1.5; }
.tm-cedit { margin: .6rem 0 0; }
.tm-cedit > summary { cursor: pointer; display: inline-block; }
.tm-cedit form { margin: .6rem 0 0; max-width: 560px; }
.tm-email-change { margin: 1rem 0 0; }
.tm-email-change > summary { list-style: none; display: inline-flex; }
.tm-email-change > summary::-webkit-details-marker { display: none; }
.tm-email-change form { margin: .75rem 0 0; }
.tm-sr-edit { margin: .6rem 0 0; }
.tm-sr-edit > summary { list-style: none; display: inline-flex; cursor: pointer; }
.tm-sr-edit > summary::-webkit-details-marker { display: none; }
.tm-sr-edit form { margin: .75rem 0 0; }
.tm-sr-marks { margin: .25rem 0 0 1.6rem; }
.tm-sr-list { margin: .25rem 0 .5rem 1.2rem; }
.tm-sr-off { margin: .5rem 0 0; }
#tm-withdraw { margin-top: 1.25rem; }
.tm-wd > summary { cursor: pointer; display: inline-block; }
.tm-wd form { margin: .75rem 0 0; max-width: 560px; }
.tm-yr { display: inline-block; margin-left: .5rem; }
.tm-yr-none { color: var(--tm-text-soft, #4b5563); }
.tm-yr > summary { cursor: pointer; display: inline; }
.tm-yr[open] { display: block; margin: .4rem 0 0; }
.tm-yr-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0 0; }
.tm-yr-form input[type=text] { flex: 1 1 8rem; width: 100%; min-width: 0; max-width: 20rem; box-sizing: border-box; }
.tm-yr-form .tm-btn-small { margin-left: 0; }
.tm-yr-form .tm-fine-print { flex-basis: 100%; margin: 0; }
.tm-yr-saved { color: var(--tm-success); font-weight: 600; }
.tm-yrs { margin: .6rem 0 0; }
.tm-yrs > summary { cursor: pointer; }
.tm-yrs > summary.tm-btn { list-style: none; display: inline-flex; }
.tm-yrs > summary::-webkit-details-marker { display: none; }
.tm-yrs-form { margin: .75rem 0 0; }
.tm-yrs-table th[scope=col] { font-weight: 600; }
.tm-yrs-table input[type=text] { width: 100%; max-width: 18rem; box-sizing: border-box; }
.tm-yrs-form textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, Menlo, Consolas, monospace; }
.tm-yrs > summary.tm-btn-small { margin-left: 0; }

/* 3.43.1: marks matching the Clients page search, across every client. */
.tm-agent-hits { background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; padding: .75rem 1rem; margin: -.5rem 0 1.25rem; }
.tm-agent-hits-h { margin: 0 0 .4rem; font-size: .95rem; font-weight: 600; }
.tm-agent-hits ul { list-style: none; margin: 0; padding: 0; }
.tm-agent-hits li { margin: 0; border-top: 1px solid #eef1f5; }
.tm-agent-hits li:first-child { border-top: 0; }
.tm-agent-hits a { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: .75rem; padding: .55rem .25rem; color: inherit; text-decoration: none; align-items: baseline; }
.tm-agent-hits a:hover strong, .tm-agent-hits a:focus strong { text-decoration: underline; }
@media (max-width: 640px) { .tm-agent-hits a { grid-template-columns: 1fr; gap: .1rem; } }

/* ------------------------------------------------------------------
 * 3.44: Clients page and All marks page for agents
 * ---------------------------------------------------------------- */

/* The sidebar runs the full height of the portal; its links stay in view while scrolling. */
@media (min-width: 960px) {
	.tm-app { align-items: stretch; }
	.tm-intake-wrap .tm-portal-nav.tm-rail { position: relative; top: auto; align-self: stretch; min-height: calc(100vh - 2.5rem); box-sizing: border-box; }
	.tm-intake-wrap .tm-portal-nav.tm-rail > ul { position: sticky; top: 1.25rem; }
	.tm-app-main { align-self: start; }
}

/* Needs you: the one strong block on the Clients page. */
.tm-inbox.is-main { border: 2px solid var(--tm-primary); border-radius: 16px; box-shadow: 0 6px 18px rgba(26,47,75,.08); }
.tm-inbox.is-main h3 { font-size: 1.25rem; display: flex; align-items: center; gap: .6rem; padding: 1rem 1.2rem .5rem; }
.tm-inbox-count { background: var(--tm-primary); color: #fff; font-size: .82rem; font-weight: 700; padding: .1rem .6rem; border-radius: 999px; }
.tm-inbox.is-main .tm-inbox-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; grid-template-columns: none; padding: .8rem 1.2rem; }
.tm-inbox.is-main .tm-inbox-when { flex: 0 0 150px; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.tm-inbox-days { font-size: .8rem; color: var(--tm-text-soft); }
.tm-inbox-main { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.tm-inbox.is-main .tm-inbox-what { font-weight: 600; }
.tm-inbox.is-main .tm-inbox-who { font-size: .88rem; color: var(--tm-text-soft); font-weight: 400; order: 0; }
.tm-intake-wrap .tm-inbox.is-main .tm-btn { margin: 0; min-height: 44px; }

/* The 90-day strip. */
.tm-strip90 { background: #fff; border: 1px solid var(--tm-border); border-radius: 14px; padding: 1rem 1.25rem .9rem; margin: 0 0 1.5rem; }
.tm-strip90 .tm-sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; }
.tm-strip90 h3 { margin: 0; font-size: 1.1rem; }
.tm-strip90-sum { margin: 0; color: var(--tm-text-soft); font-size: .9rem; }
.tm-strip90-sum strong { color: #991b1b; }
.tm-strip90-line { position: relative; margin: .5rem 12px 0; }
.tm-strip90-soon { position: absolute; left: 0; top: 50px; height: 14px; background: #fee2e2; border-radius: 7px 0 0 7px; }
.tm-strip90-axis { position: absolute; left: 0; right: 0; top: 56px; height: 2px; background: #d8dde3; }
.tm-strip90-tick { position: absolute; top: 16px; font-size: .75rem; font-weight: 600; color: var(--tm-text-soft); transform: translateX(-50%); white-space: nowrap; }
.tm-strip90-tick::after { content: ""; position: absolute; left: 50%; top: 22px; width: 1px; height: 38px; background: #c5ccd5; }
.tm-strip90-tick.is-today { transform: none; color: var(--tm-primary); font-weight: 700; }
.tm-strip90-tick.is-today::after { left: 0; }
.tm-strip90-dot { position: absolute; top: 48px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; border: 3px solid #fff; box-sizing: border-box; padding: 0; z-index: 2; }
.tm-strip90-dot.is-many { top: 44px; width: 26px; height: 26px; margin-left: -13px; color: #fff; font: inherit; font-size: .75rem; font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tm-strip90-dot.is-open { outline: 3px solid var(--tm-primary); outline-offset: 1px; }
.tm-strip90-stem { position: absolute; top: 66px; width: 1px; opacity: .55; }
.tm-strip90-label { position: absolute; width: 168px; font-size: .75rem; line-height: 16px; background: #fff; padding: 2px 5px; box-sizing: border-box; }
.tm-strip90-label > * { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-strip90-label.is-mid { transform: translateX(-50%); text-align: center; border-top: 2px solid; }
.tm-strip90-label.is-start { text-align: left; border-left: 2px solid; }
.tm-strip90-label.is-end { transform: translateX(-100%); text-align: right; border-right: 2px solid; }
.tm-strip90-who { color: var(--tm-text-soft); }
.tm-strip90 .is-soon.tm-strip90-dot, .tm-strip90 .is-soon.tm-strip90-stem { background: #b91c1c; box-shadow: 0 0 0 1px #b91c1c; }
.tm-strip90 .is-you.tm-strip90-dot, .tm-strip90 .is-you.tm-strip90-stem { background: #c47a12; box-shadow: 0 0 0 1px #c47a12; }
.tm-strip90 .is-fixed.tm-strip90-dot, .tm-strip90 .is-fixed.tm-strip90-stem { background: #2c4a73; box-shadow: 0 0 0 1px #2c4a73; }
.tm-strip90-stem { box-shadow: none !important; }
.tm-strip90-label.is-soon { border-color: #b91c1c; } .tm-strip90-label.is-soon strong { color: #991b1b; }
.tm-strip90-label.is-you { border-color: #c47a12; }
.tm-strip90-label.is-fixed { border-color: #2c4a73; }
.tm-strip90-day { border: 1px solid #c5ccd5; border-radius: 12px; padding: .7rem .9rem; background: #fbfcfd; margin: .25rem 0 .6rem; }
.tm-strip90-day-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.tm-strip90-day h4 { margin: 0; font-size: .95rem; }
.tm-strip90-day ul { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.tm-strip90-day li { margin: 0; }
.tm-strip90-day li > a, .tm-strip90-day li > span { display: flex; flex-direction: column; padding: .55rem .7rem; border: 1px solid #eef1f5; border-radius: 10px; background: #fff; color: inherit; text-decoration: none; font-size: .88rem; }
.tm-strip90-day li span span { color: var(--tm-text-soft); }
.tm-strip90-key { margin: .2rem 0 0; font-size: .75rem; color: var(--tm-text-soft); }
.tm-strip90-key span { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 .25rem 0 .6rem; }
.tm-strip90-key span:first-child { margin-left: 0; }
.tm-strip90-key .is-soon { background: #b91c1c; } .tm-strip90-key .is-you { background: #c47a12; } .tm-strip90-key .is-fixed { background: #2c4a73; }
@media (max-width: 640px) {
	/* On a phone the line is too narrow for labels: the dots stay, and the list (read out below) carries the words. */
	.tm-strip90-label, .tm-strip90-stem { display: none; }
	.tm-strip90-line { height: 84px !important; }
}

/* The stage bar under each client, and its key. */
.tm-stagebar { grid-column: 1 / -1; display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: #eef1f5; margin-top: .3rem; }
.tm-stagebar .is-progress, .tm-clist-key .is-progress { background: #2c4a73; }
.tm-stagebar .is-registered, .tm-clist-key .is-registered { background: #2f8a55; }
.tm-stagebar .is-closed, .tm-clist-key .is-closed { background: #b6bdc7; }
.tm-clist-key { margin: 0; padding: .6rem 1rem; font-size: .75rem; color: var(--tm-text-soft); border-bottom: 1px solid #eef1f5; }
.tm-clist-key span { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin: 0 .25rem 0 .5rem; }
.tm-clist-key span:first-child { margin-left: 0; }

/* Search matches: picture, client, references. */
.tm-agent-hits a { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr); }
.tm-agent-hit-mark { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.tm-agent-hit-mark .tm-pic { width: 36px; height: 36px; border-radius: 8px; }
.tm-agent-hit-refs strong { font-weight: 700; }

/* Status counts that filter the marks list. */
.tm-portal-filters.tm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 0 0 .9rem; }
.tm-filter.tm-stat { border-radius: 12px; border: 1px solid var(--tm-border); background: #fff; color: #1f242c; min-height: 72px; padding: .7rem .9rem; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .15rem; text-align: left; font-weight: 600; }
.tm-filter.tm-stat[aria-pressed="true"] { background: #eef3fa; color: #1f242c; border: 2px solid var(--tm-primary); box-shadow: 0 4px 12px rgba(26,47,75,.10); font-weight: 600; }
.tm-filter.tm-stat[aria-pressed="true"]::before { content: none; }
.tm-stat-n { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.tm-stat.is-progress .tm-stat-n { color: #1e3a8a; } .tm-stat.is-registered .tm-stat-n { color: #166534; } .tm-stat.is-closed .tm-stat-n { color: #4b5563; } .tm-stat.is-all .tm-stat-n { color: var(--tm-primary); }
.tm-stat-l { font-size: .9rem; }
@media (max-width: 560px) { .tm-portal-filters.tm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Marks table: picture, their reference, stage words, days away, proof-of-use ring. */
.tm-mark-cell { display: flex; align-items: center; gap: .6rem; }
.tm-mark-cell .tm-mark-thumb { margin: 0; flex: none; }
.tm-mark-thumb.is-word { display: inline-flex; align-items: center; justify-content: center; background: #f3f5f8; color: var(--tm-primary); font-size: .5rem; font-weight: 800; line-height: 1.05; text-align: center; padding: 2px; box-sizing: border-box; overflow: hidden; overflow-wrap: anywhere; }
td.tm-yref, .tm-yref { font-weight: 700; }
.tm-strip-words { display: block; font-size: .75rem; color: var(--tm-text-soft); margin-top: .2rem; }
.tm-days { display: block; font-size: .78rem; color: var(--tm-text-soft); }
.tm-days.is-urgent { color: #991b1b; font-weight: 700; }
.tm-ring-wrap { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; }
.tm-ring { width: 28px; height: 28px; border-radius: 50%; flex: none; background: conic-gradient(var(--tm-ring-c, #2f8a55) var(--tm-ring, 0%), #e5e9ee 0); -webkit-mask: radial-gradient(circle, transparent 8px, #000 8.5px); mask: radial-gradient(circle, transparent 8px, #000 8.5px); }
.tm-ring.is-good { --tm-ring-c: #2f8a55; } .tm-ring.is-soon { --tm-ring-c: #c47a12; } .tm-ring.is-late { --tm-ring-c: #b91c1c; }
.tm-ring-text { font-size: .78rem; color: var(--tm-text-soft); }

/* A watch hit, side by side. */
.tm-watch-list li.tm-watch-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .9rem; align-items: stretch; padding: .9rem 0; }
.tm-watch-side { border: 1px solid var(--tm-border); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.tm-watch-side.is-theirs { border-color: #e6b46a; }
.tm-watch-tag { margin: 0; padding: .4rem .8rem; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--tm-text-soft); background: #f6f7f9; }
.tm-watch-side.is-theirs .tm-watch-tag { color: #8a4a00; background: #fdf0dc; }
.tm-watch-pic { height: 104px; display: flex; align-items: center; justify-content: center; background: #f3f5f8; font-weight: 800; font-size: 1.3rem; letter-spacing: .04em; color: var(--tm-primary); padding: .5rem; text-align: center; overflow-wrap: anywhere; }
.tm-watch-img { max-height: 92px; max-width: 100%; object-fit: contain; }
.tm-watch-facts { padding: .7rem .8rem; display: flex; flex-direction: column; gap: .2rem; font-size: .9rem; }
.tm-watch-facts strong { font-size: 1rem; }
.tm-watch-last { color: #991b1b; font-weight: 700; }
.tm-watch-vs { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; max-width: 110px; text-align: center; font-size: .75rem; color: #8a4a00; }
.tm-watch-vs span { width: 38px; height: 38px; border-radius: 50%; background: #fdf0dc; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tm-watch-vs em { font-style: normal; font-weight: 600; }
.tm-watch-do { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0; }
.tm-intake-wrap .tm-watch-do .tm-btn { margin: 0; }
@media (max-width: 640px) { .tm-watch-list li.tm-watch-pair { grid-template-columns: 1fr; } .tm-watch-vs { flex-direction: row; max-width: none; } }
/* The strip's words as a list: read out on every screen, shown on a phone where the labels do not fit. */
.tm-strip90-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; margin: -1px; padding: 0; }
@media (max-width: 640px) {
	.tm-strip90-list { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; white-space: normal; margin: .4rem 0 .4rem 1.2rem; font-size: .88rem; }
	.tm-strip90-list li { margin: 0 0 .3rem; }
}

/* 3.44.2: Client, Class and Handled by behind "Filters"; the ones set show as chips that clear them. */
.tm-portal-toolbar-2 .tm-view-switch { margin-left: auto; }
.tm-filters-btn { min-height: 40px; padding: 0 .9rem; border: 1px solid var(--tm-control); border-radius: 8px; background: #fff; color: var(--tm-primary); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.tm-filters-btn[aria-expanded="true"] { background: #eef3fa; border-color: var(--tm-primary); }
.tm-filters-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 0 0 .1rem; }
.tm-filters-btn[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 3px; }
.tm-filters-n { background: var(--tm-primary); color: #fff; font-size: .75rem; min-width: 1.4em; padding: .05rem .4rem; border-radius: 999px; text-align: center; }
.tm-more-filters { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; padding: .75rem .9rem; margin: -.25rem 0 .75rem; background: #f6f7f9; border: 1px solid var(--tm-border); border-radius: 10px; }
.tm-more-filters[hidden] { display: none; }
.tm-filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 .75rem; }
.tm-filter-chips[hidden] { display: none; }
.tm-chip-x { display: inline-flex; align-items: center; gap: .45rem; min-height: 34px; padding: 0 .55rem 0 .8rem; border: 1px solid var(--tm-primary); border-radius: 999px; background: #eef3fa; color: var(--tm-primary); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.tm-chip-x span { font-size: 1.1rem; line-height: 1; }
.tm-chip-x:hover { background: #dfe8f4; }
.tm-chips-clear { font-size: .88rem; }
/* The same status tiles on a client's home, with "Your turn". */
.tm-portal-filters.tm-stats { grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); }
.tm-stat.is-turn .tm-stat-n { color: #8a4a00; }
#tm-home-marks .tm-portal-toolbar-2 { margin-top: .25rem; }
