.jta-chat-message-body a.jta-message-url{overflow-wrap:anywhere;text-decoration:underline;text-underline-offset:.15em}
:root {
	--jta-black: #111111;
	--jta-black-soft: #191919;
	--jta-yellow: #ffdd3e;
	--jta-yellow-soft: #fff8ce;
	--jta-paper: #f7f7f5;
	--jta-white: #ffffff;
	--jta-ink: #171717;
	--jta-muted: #747474;
	--jta-line: #e6e6e2;
	--jta-sidebar: 286px;
	--jta-content: 820px;
	color-scheme: light;
}

* {
	box-sizing: border-box;
}

.jta-chat-body [hidden] {
	display: none !important;
}

html,
body {
	margin: 0;
	min-height: 100%;
}

body.jta-chat-body {
	background: var(--jta-paper);
	color: var(--jta-ink);
	font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.jta-chat-body button,
.jta-chat-body input,
.jta-chat-body textarea {
	font: inherit;
}

.jta-chat-body button,
.jta-chat-body a {
	-webkit-tap-highlight-color: transparent;
}

.jta-chat-body svg {
	display: block;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.jta-chat-app {
	display: grid;
	grid-template-columns: var(--jta-sidebar) minmax(0, 1fr);
	height: 100dvh;
	min-height: 600px;
	overflow: hidden;
}

.jta-chat-sidebar {
	position: relative;
	z-index: 20;
	display: flex;
	min-width: 0;
	flex-direction: column;
	background: var(--jta-black);
	color: #ededed;
	box-shadow: 8px 0 30px rgb(0 0 0 / 5%);
}

.jta-chat-sidebar-head {
	position: relative;
	z-index: 30;
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	padding: 0 14px;
}

.jta-chat-brand,
.jta-chat-welcome-brand {
	color: var(--jta-white);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.055em;
	text-decoration: none;
}

.jta-chat-brand strong,
.jta-chat-welcome-brand span {
	color: var(--jta-yellow);
	font-weight: 550;
}

.jta-chat-new {
	display: flex;
	align-items: center;
	gap: 11px;
	min-height: 46px;
	margin: 2px 14px 12px;
	padding: 0 15px;
	border: 1px solid rgb(255 255 255 / 14%);
	border-radius: 13px;
	background: #202020;
	color: var(--jta-white);
	font-weight: 650;
	text-decoration: none;
	transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.jta-chat-new span {
	display: grid;
	width: 26px;
	height: 26px;
	place-items: center;
	border-radius: 8px;
	background: var(--jta-yellow);
	color: var(--jta-black);
}

.jta-chat-new svg {
	width: 17px;
	height: 17px;
}

.jta-chat-new:hover,
.jta-chat-new:focus-visible {
	border-color: rgb(255 221 62 / 65%);
	background: #292929;
	outline: none;
}

.jta-chat-new:active {
	transform: scale(.985);
}

.jta-chat-search {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0 14px 15px;
}

.jta-chat-search > span {
	position: absolute;
	left: 13px;
	color: #929292;
	pointer-events: none;
}

.jta-chat-search svg {
	width: 17px;
	height: 17px;
}

.jta-chat-search input {
	width: 100%;
	height: 39px;
	padding: 0 13px 0 39px;
	border: 1px solid transparent;
	border-radius: 10px;
	outline: 0;
	background: #1b1b1b;
	color: #f3f3f3;
}

.jta-chat-search input::placeholder {
	color: #858585;
}

.jta-chat-search input:focus {
	border-color: rgb(255 221 62 / 55%);
	background: #222;
	box-shadow: 0 0 0 3px rgb(255 221 62 / 9%);
}

.jta-chat-history {
	padding: 0 9px 18px;
}

.jta-chat-history h2 {
	margin: 17px 10px 5px;
	color: #8d8d8d;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .055em;
	text-transform: uppercase;
}

.jta-chat-history ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jta-chat-history li {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 40px;
	align-items: center;
	margin: 1px 0;
}

.jta-chat-history li a {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	gap: 1px;
	min-width: 0;
	min-height: 42px;
	padding: 6px 10px;
	border-radius: 9px;
	color: #d6d6d6;
	text-decoration: none;
}

.jta-chat-history li a:hover,
.jta-chat-history li a:focus-visible {
	background: #202020;
	color: var(--jta-white);
	outline: none;
}

.jta-chat-history li a.is-active {
	background: #292929;
	color: var(--jta-white);
}

.jta-chat-history li a.is-active::before {
	position: absolute;
	left: 0;
	width: 3px;
	height: 24px;
	border-radius: 0 4px 4px 0;
	background: var(--jta-yellow);
	content: "";
}

.jta-chat-history [data-history-title] {
	min-width: 0;
	overflow: hidden;
	font-size: 13.5px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jta-chat-history li a small {
	color: #777;
	font-size: 10px;
	white-space: nowrap;
}

.jta-chat-unread-summary {
	margin: 4px 14px 8px;
	padding: 10px 12px;
	border: 1px solid #786c22;
	border-radius: 10px;
	background: #302b13;
	color: #ffe45a;
	font-size: 12px;
	line-height: 1.4;
}

.jta-chat-history .has-unread > a {
	border-left: 3px solid var(--jta-yellow);
	background: #242218;
	color: #fff;
}

.jta-chat-history .has-unread [data-history-title] {
	font-weight: 800;
}

.jta-chat-history-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 2px;
}

.jta-chat-unread-count {
	display: inline-block;
	flex: none;
	padding: 2px 7px;
	border-radius: 5px;
	background: var(--jta-yellow);
	color: #171717;
	font-size: 10px;
	font-weight: 850;
	line-height: 1.5;
	white-space: nowrap;
}

.jta-chat-archive-link [data-archive-unread] {
	margin-left: auto;
}

.jta-chat-menu-button {
	position: relative;
}

.jta-chat-nav-unread {
	position: absolute;
	top: -1px;
	right: -4px;
	min-width: 19px;
	padding: 1px 4px;
	border: 2px solid var(--jta-paper);
	border-radius: 12px;
	background: var(--jta-yellow);
	color: #111;
	font-size: 10px;
	font-weight: 850;
	line-height: 15px;
}

.jta-chat-history-empty {
	padding: 24px 13px;
	color: #858585;
	font-size: 13px;
}

.jta-chat-sidebar-foot {
	padding: 9px 9px max(10px, env(safe-area-inset-bottom));
	border-top: 1px solid rgb(255 255 255 / 7%);
}

.jta-chat-archive-link,
.jta-chat-account {
	display: flex;
	align-items: center;
	min-height: 45px;
	padding: 0 10px;
	border-radius: 10px;
	color: #cfcfcf;
	text-decoration: none;
}

.jta-chat-archive-link {
	gap: 12px;
	font-size: 13px;
}

.jta-chat-archive-link svg {
	width: 18px;
	height: 18px;
}

.jta-chat-account {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	gap: 10px;
	margin-top: 2px;
}

.jta-chat-account:hover,
.jta-chat-account:focus-visible,
.jta-chat-archive-link:hover,
.jta-chat-archive-link:focus-visible {
	background: #202020;
	color: var(--jta-white);
	outline: none;
}

.jta-chat-account > span:nth-child(2) {
	display: grid;
	min-width: 0;
}

.jta-chat-account strong,
.jta-chat-account small {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jta-chat-account strong {
	font-size: 12.5px;
}

.jta-chat-account small {
	color: #777;
	font-size: 10px;
}

.jta-chat-account > svg {
	width: 15px;
	height: 15px;
	color: #676767;
}

.jta-chat-avatar {
	display: grid;
	width: 32px;
	height: 32px;
	place-items: center;
	border-radius: 50%;
	background: var(--jta-yellow);
	color: var(--jta-black);
	font-size: 12px;
	font-weight: 800;
}

.jta-chat-main {
	position: relative;
	display: grid;
	min-width: 0;
	min-height: 0;
	grid-template-rows: minmax(0, 1fr) auto;
	background: var(--jta-paper);
}

/* The Note title remains available to assistive technology, not a duplicate toolbar. */
.jta-chat-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Small-screen navigation only; no full-width header or reserved desktop row. */
.jta-chat-mobile-navigation { display: none; }

.jta-chat-icon-button {
	display: grid;
	width: 38px;
	height: 38px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.jta-chat-icon-button:hover,
.jta-chat-icon-button:focus-visible {
	background: rgb(0 0 0 / 6%);
	outline: none;
}

.jta-chat-sidebar .jta-chat-icon-button:hover,
.jta-chat-sidebar .jta-chat-icon-button:focus-visible {
	background: rgb(255 255 255 / 8%);
}

.jta-chat-menu-button,
.jta-chat-sidebar-close {
	display: none;
}

.jta-chat-note-actions {
	position: relative;
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
}

.jta-chat-menu-button {
	grid-column: 1;
	grid-row: 1;
}



.jta-chat-note-menu {
	z-index: 25;
	position: absolute;
	top: 44px;
	right: 0;
	width: 180px;
	padding: 6px;
	border: 1px solid var(--jta-line);
	border-radius: 12px;
	background: var(--jta-white);
	box-shadow: 0 16px 45px rgb(0 0 0 / 14%);
}

.jta-chat-note-menu button {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 10px;
	min-height: 38px;
	padding: 0 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--jta-ink);
	font-size: 13px;
	cursor: pointer;
}

.jta-chat-note-menu button:hover,
.jta-chat-note-menu button:focus-visible {
	background: var(--jta-paper);
	outline: none;
}

.jta-chat-note-menu svg {
	width: 17px;
	height: 17px;
}

/* Expand inside the scrolling list so options never disappear beyond its edges. */
.jta-chat-history .jta-chat-note-actions {
	display: contents;
}

.jta-chat-history [data-note-menu-button] {
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	width: 40px;
	height: 42px;
	color: #b8b8b8;
}

.jta-chat-history [data-note-menu-button]:hover,
.jta-chat-history [data-note-menu-button]:focus-visible,
.jta-chat-history [data-note-menu-button][aria-expanded="true"] {
	background: #292929;
	color: var(--jta-yellow);
}

.jta-chat-history .jta-chat-note-menu {
	position: static;
	grid-column: 1 / -1;
	width: auto;
	margin: 2px 4px 8px;
	border-color: #393939;
	background: #252525;
	box-shadow: none;
}

.jta-chat-history .jta-chat-note-menu button {
	min-height: 42px;
	color: #eee;
}

.jta-chat-history .jta-chat-note-menu button:hover,
.jta-chat-history .jta-chat-note-menu button:focus-visible {
	background: #353535;
}

.jta-chat-note-menu button:disabled {
	opacity: .55;
	cursor: wait;
}

.jta-chat-archived-badge {
	display: inline-block;
	margin-top: 3px;
	padding: 1px 7px;
	border-radius: 5px;
	background: #e9e9e5;
	color: #62625d;
	font-size: 11px;
}

.jta-chat-stage {
	min-height: 0;
	overflow-y: auto;
	scroll-behavior: smooth;
}

.jta-chat-thread {
	width: min(100%, var(--jta-content));
	margin: 0 auto;
	padding: 32px 24px 44px;
}

.jta-chat-presence {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 28px;
	padding: 13px 15px;
	border: 1px solid #eee4a4;
	border-radius: 14px;
	background: var(--jta-yellow-soft);
}

.jta-chat-presence .jta-chat-ai-mark {
	width: 44px;
	height: 34px;
	flex: 0 0 44px;
	border-radius: 10px;
	font-size: 10px;
}

.jta-chat-presence strong {
	display: block;
	font-size: 12.5px;
}

.jta-chat-presence p {
	margin: 1px 0 0;
	color: #6f6733;
	font-size: 11px;
}

.jta-chat-message {
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	gap: 15px;
	padding: 22px 0;
	border-bottom: 1px solid var(--jta-line);
}

.jta-chat-message:last-child {
	border-bottom: 0;
}

.jta-chat-message-avatar,
.jta-chat-ai-mark {
	display: grid;
	width: 38px;
	height: 38px;
	place-items: center;
	border-radius: 11px;
	background: var(--jta-black);
	color: var(--jta-white);
	font-size: 13px;
	font-weight: 800;
}

.jta-chat-message.is-jtai .jta-chat-message-avatar,
.jta-chat-ai-mark {
	background: var(--jta-yellow);
	color: var(--jta-black);
}

.jta-chat-message.is-jtai .jta-chat-message-avatar,
.jta-chat-ai-mark {
	font-size: 10px;
	letter-spacing: -.035em;
}

.jta-chat-message.is-service .jta-chat-message-avatar {
	background: var(--jta-black);
	color: var(--jta-yellow);
}

.jta-chat-message.is-self .jta-chat-message-avatar {
	border-radius: 50%;
	background: #e8e8e3;
	color: #4c4c4c;
}

.jta-chat-message.is-team .jta-chat-message-avatar {
	background: var(--jta-black);
	box-shadow: inset 0 0 0 2px var(--jta-yellow);
}

.jta-chat-message-content {
	min-width: 0;
	padding-top: 1px;
}

.jta-chat-message.is-unread .jta-chat-message-content {
	box-shadow: -7px 0 0 -4px #d2b600;
	background: linear-gradient(90deg, #fff8d5, transparent 85%);
}

.jta-chat-message-content header .jta-chat-item-unread {
	background: var(--jta-yellow);
	color: #171717;
}

.jta-chat-unread-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0 24px;
	color: #685800;
	font-size: 12px;
	font-weight: 800;
}

.jta-chat-unread-divider::before,
.jta-chat-unread-divider::after {
	height: 2px;
	flex: 1;
	background: #dac02b;
	content: "";
}

.jta-chat-unread-divider span {
	padding: 5px 12px;
	border-radius: 8px;
	background: var(--jta-yellow-soft);
}

.jta-chat-jump-unread {
	display: flex;
	width: min(100%, 780px);
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 auto 10px;
	padding: 10px 15px;
	border: 1px solid #d9bd21;
	border-radius: 12px;
	background: var(--jta-yellow);
	color: #171717;
	font-size: 12px;
	cursor: pointer;
}

.jta-chat-jump-unread:focus-visible {
	outline: 3px solid #8e7910;
	outline-offset: 3px;
}

.jta-chat-jump-unread span {
	font-weight: 650;
}

.jta-chat-message-content header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-height: 22px;
}

.jta-chat-message-content header strong {
	font-size: 13.5px;
}

.jta-chat-message-content header span {
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--jta-yellow-soft);
	color: #70672c;
	font-size: 9px;
	font-weight: 750;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.jta-chat-message-content time {
	margin-left: auto;
	color: #979797;
	font-size: 10px;
}

.jta-chat-message-body {
	max-width: 720px;
	color: #262626;
	font-size: 15px;
	line-height: 1.68;
}

.jta-chat-message-body > :first-child {
	margin-top: 5px;
}

.jta-chat-message-body > :last-child {
	margin-bottom: 0;
}

.jta-chat-message-body a {
	color: #3630bf;
	text-underline-offset: 2px;
}

.jta-chat-no-shared-items {
	padding: 72px 12px;
	text-align: center;
}

.jta-chat-no-shared-items h2 {
	margin: 0 0 8px;
	font-size: 24px;
	letter-spacing: -.03em;
}

.jta-chat-no-shared-items p {
	max-width: 510px;
	margin: 0 auto;
	color: var(--jta-muted);
}

.jta-chat-empty {
	display: flex;
	width: min(100% - 40px, 700px);
	height: 100%;
	min-height: 420px;
	margin: 0 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px 0 64px;
	text-align: center;
}

.jta-chat-kicker {
	margin: 0 0 8px;
	color: #817620;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: none;
}

.jta-chat-empty h1 {
	margin: 0;
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 680;
	line-height: 1.08;
	letter-spacing: -.055em;
}

.jta-chat-empty h1 a {
	color: inherit;
	text-decoration-color: #c5ad16;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.jta-chat-empty h1 a:hover,
.jta-chat-empty h1 a:focus-visible {
	color: #756800;
	outline: none;
	text-decoration-color: var(--jta-yellow);
}

.jta-chat-empty > p:not(.jta-chat-kicker) {
	max-width: 590px;
	margin: 13px auto 0;
	color: var(--jta-muted);
	font-size: 15px;
}

.jta-chat-composer-wrap {
	position: relative;
	z-index: 8;
	padding: 10px max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
	background: linear-gradient(to bottom, rgb(247 247 245 / 0%), var(--jta-paper) 18%, var(--jta-paper) 100%);
}

.jta-chat-composer {
	position: relative;
	display: flex;
	width: min(100%, 780px);
	align-items: flex-end;
	gap: 10px;
	margin: 0 auto;
	padding: 10px 10px 10px 18px;
	border: 1px solid #dcdcd6;
	border-radius: 20px;
	background: var(--jta-white);
	box-shadow: 0 9px 30px rgb(0 0 0 / 8%);
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.jta-chat-composer:focus-within {
	border-color: #cabb4c;
	box-shadow: 0 10px 34px rgb(0 0 0 / 9%), 0 0 0 3px rgb(255 221 62 / 11%);
}

.jta-chat-composer textarea {
	width: 100%;
	align-self: center;
	max-height: 190px;
	min-height: 38px;
	padding: 7px 0;
	resize: none;
	overflow-y: auto;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--jta-ink);
	font-size: 15px;
	line-height: 24px;
}

.jta-chat-composer textarea::placeholder {
	color: #999;
}

.jta-chat-composer button[type="submit"] {
	display: grid;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 12px;
	background: var(--jta-yellow);
	color: var(--jta-black);
	cursor: pointer;
	transition: filter 150ms ease, transform 150ms ease;
}

.jta-chat-composer button[type="submit"]:hover,
.jta-chat-composer button[type="submit"]:focus-visible {
	filter: brightness(.96);
	outline: 2px solid #bda900;
	outline-offset: 2px;
}

.jta-chat-composer button[type="submit"]:disabled {
	opacity: .45;
	cursor: wait;
}

.jta-chat-composer button[type="submit"]:active {
	transform: scale(.96);
}

.jta-chat-composer button svg {
	width: 19px;
	height: 19px;
}

.jta-chat-disclosure {
	max-width: 780px;
	margin: 8px auto 0;
	color: #8b8b8b;
	font-size: 11px;
	line-height: 1.4;
	text-align: center;
}

.jta-chat-disclosure a {
	color: #62625d;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.jta-chat-disclosure a:hover {
	color: var(--jta-ink);
}

.jta-chat-disclosure a:focus-visible {
	outline: 2px solid #7c7020;
	outline-offset: 3px;
}

.jta-chat-policy-links {
	display: inline-flex;
	gap: 12px;
	margin-left: 9px;
}

.jta-chat-view-only {
	display: flex;
	width: min(100%, 780px);
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 52px;
	margin: 0 auto;
	border: 1px solid var(--jta-line);
	border-radius: 16px;
	background: #ededeb;
	color: #6e6e6e;
	font-size: 13px;
}

.jta-chat-view-only svg {
	width: 17px;
	height: 17px;
}

.jta-chat-toast {
	position: fixed;
	z-index: 100;
	top: 18px;
	left: 50%;
	max-width: min(430px, calc(100vw - 32px));
	padding: 11px 16px;
	transform: translateX(-50%);
	border: 1px solid #dfdfda;
	border-radius: 12px;
	background: var(--jta-white);
	box-shadow: 0 14px 40px rgb(0 0 0 / 16%);
	font-size: 13px;
	animation: jtaChatToast 180ms ease-out;
}

.jta-chat-toast.is-error {
	border-color: #efc2c2;
	color: #a52222;
}

.jta-chat-modal {
	position: fixed;
	z-index: 120;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgb(0 0 0 / 48%);
	backdrop-filter: blur(4px);
}

.jta-chat-modal-card {
	width: min(100%, 430px);
	padding: 22px;
	border: 1px solid var(--jta-line);
	border-radius: 18px;
	background: var(--jta-white);
	box-shadow: 0 24px 80px rgb(0 0 0 / 25%);
}

.jta-chat-modal-card h2 {
	margin: 0 0 14px;
	font-size: 19px;
	letter-spacing: -.025em;
}

.jta-chat-modal-card p {
	margin: 0 0 14px;
	color: #63635f;
	font-size: 13px;
}

.jta-chat-modal-card .jta-chat-rename-error {
	margin: 10px 0 0;
	color: #a52222;
}

.jta-chat-modal-card input {
	width: 100%;
	height: 46px;
	padding: 0 13px;
	border: 1px solid #d6d6d0;
	border-radius: 11px;
	outline: none;
}

.jta-chat-modal-card input:focus {
	border-color: #bba900;
	box-shadow: 0 0 0 3px rgb(255 221 62 / 18%);
}

.jta-chat-modal-card > div {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 17px;
}

.jta-chat-modal-card button {
	min-height: 39px;
	padding: 0 15px;
	border: 1px solid var(--jta-line);
	border-radius: 10px;
	background: var(--jta-white);
	color: var(--jta-ink);
	font-weight: 650;
	cursor: pointer;
}

.jta-chat-modal-card button[data-save] {
	border-color: var(--jta-yellow);
	background: var(--jta-yellow);
}

.jta-chat-modal-card button:hover,
.jta-chat-modal-card button:focus-visible {
	outline: 2px solid #c1ae0f;
	outline-offset: 2px;
}

@keyframes jtaChatToast {
	from { opacity: 0; transform: translate(-50%, -8px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}

.jta-chat-welcome {
	display: grid;
	height: 100dvh;
	min-height: 600px;
	grid-template-rows: auto 1fr;
	padding: max(24px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
	overflow: hidden;
	background:
		radial-gradient(circle at 50% 20%, rgb(255 221 62 / 16%), transparent 31%),
		linear-gradient(135deg, #0d0d0d, #171717 55%, #101010);
	color: var(--jta-white);
}

.jta-chat-welcome-centre {
	display: flex;
	width: min(100%, 760px);
	margin: auto;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.jta-chat-welcome-centre h1 {
	margin: 0;
	color: var(--jta-yellow);
	font-size: clamp(34px, 5.2vw, 62px);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -.035em;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.jta-chat-welcome-centre > p {
	max-width: 580px;
	margin: 24px auto 0;
	color: #bdbdbd;
	font-size: 16px;
	text-wrap: balance;
}

.jta-chat-sign-in {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 50px;
	margin-top: 32px;
	padding: 0 21px;
	border-radius: 14px;
	background: var(--jta-yellow);
	color: var(--jta-black);
	font-weight: 760;
	text-decoration: none;
	transition: transform 150ms ease, box-shadow 150ms ease;
}

.jta-chat-sign-in:hover,
.jta-chat-sign-in:focus-visible {
	transform: translateY(-1px);
	outline: 2px solid var(--jta-white);
	outline-offset: 3px;
	box-shadow: 0 12px 30px rgb(255 221 62 / 20%);
}

.jta-chat-sign-in svg {
	width: 18px;
	height: 18px;
}

.jta-chat-fatal {
	display: flex;
	height: 100dvh;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 30px;
	text-align: center;
}

.jta-chat-fatal h1 {
	margin: 20px 0 8px;
}

.jta-chat-fatal p {
	max-width: 520px;
	margin: 0;
	color: var(--jta-muted);
}

.jta-chat-scrim {
	display: none;
}

.jta-thread-objects-chat {
	display: grid;
	gap: 12px;
	margin-top: 14px;
}

.jta-thread-object {
	margin: 0;
}

.jta-thread-object.is-image img,
.jta-thread-object.is-video video {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 540px;
	border-radius: 14px;
	background: #eef0f1;
}

.jta-thread-object figcaption {
	margin-top: 7px;
	color: var(--jta-muted);
	font-size: 12px;
}

.jta-thread-object.is-audio audio {
	display: block;
	width: 100%;
	margin-top: 8px;
}

.jta-thread-object.is-link,
.jta-thread-object.is-structured {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: 3px 9px;
	padding: 13px;
	border: 1px solid var(--jta-line);
	border-radius: 12px;
	background: #fafafa;
	color: var(--jta-ink);
	text-decoration: none;
}

.jta-thread-object.is-link:hover {
	border-color: #c7af21;
	background: #fffdf2;
}

.jta-thread-object.is-link > span,
.jta-thread-object.is-structured > span {
	grid-row: 1 / 3;
	color: #8a7700;
	font-size: 20px;
}

.jta-thread-object.is-link small,
.jta-thread-object.is-structured small {
	color: var(--jta-muted);
	font-size: 11px;
}

@media (max-width: 820px) {
	.jta-chat-app {
		display: block;
	}

	.jta-chat-sidebar {
		position: fixed;
		inset: 0 auto 0 0;
		width: min(88vw, 310px);
		transform: translateX(-104%);
		visibility: hidden;
		transition: transform 200ms ease;
	}

	.jta-chat-app.is-sidebar-open .jta-chat-sidebar {
		transform: translateX(0);
		visibility: visible;
	}

	.jta-chat-scrim {
		position: fixed;
		z-index: 15;
		inset: 0;
		display: block;
		visibility: hidden;
		background: rgb(0 0 0 / 44%);
		opacity: 0;
		transition: opacity 200ms ease, visibility 200ms ease;
	}

	.jta-chat-app.is-sidebar-open .jta-chat-scrim {
		visibility: visible;
		opacity: 1;
	}

	.jta-chat-menu-button,
	.jta-chat-sidebar-close {
		display: grid;
	}

	.jta-chat-main {
		height: 100dvh;
	}

	.jta-chat-mobile-navigation {
		display: block;
		position: absolute;
		z-index: 12;
		top: max(8px, env(safe-area-inset-top));
		left: max(10px, env(safe-area-inset-left));
	}

	.jta-chat-mobile-navigation .jta-chat-menu-button {
		width: 42px;
		height: 42px;
		border: 1px solid var(--jta-line);
		background: var(--jta-paper);
		box-shadow: 0 2px 7px rgb(0 0 0 / 5%);
	}

	.jta-chat-sidebar-head { gap: 7px; }
	.jta-chat-sidebar-close { flex: 0 0 28px; width: 28px; height: 36px; }

	.jta-chat-thread {
		padding: calc(60px + env(safe-area-inset-top)) 17px 36px;
	}

	.jta-chat-presence {
		align-items: flex-start;
	}

	.jta-chat-message {
		grid-template-columns: 34px minmax(0, 1fr);
		gap: 12px;
		padding: 19px 0;
	}

	.jta-chat-message-avatar {
		width: 34px;
		height: 34px;
		border-radius: 10px;
		font-size: 11px;
	}

	.jta-chat-message-content header {
		flex-wrap: wrap;
	}

	.jta-chat-message-content time {
		width: 100%;
		margin-left: 0;
	}

	.jta-chat-composer-wrap {
		padding-right: 12px;
		padding-left: 12px;
	}
}

@media (max-width: 560px) {

	.jta-chat-presence p {
		display: none;
	}

	.jta-chat-empty {
		min-height: 400px;
		padding-bottom: 36px;
	}

	.jta-chat-empty h1 {
		font-size: 34px;
	}

	.jta-chat-welcome {
		padding-right: 20px;
		padding-left: 20px;
	}

	.jta-chat-welcome-centre > p {
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* Keep the app inside the visible viewport. Only its content panes scroll. */
body.jta-chat-body{height:100vh;height:100dvh;min-height:0;overflow:hidden}
.jta-chat-app{height:var(--jta-viewport-height,100dvh);min-height:0;max-height:var(--jta-viewport-height,100dvh);grid-template-rows:minmax(0,1fr)}
.jta-chat-sidebar{height:100%;min-height:0;overflow:clip}
.jta-chat-sidebar-head,.jta-chat-sidebar-foot{flex:none}
.jta-chat-sidebar-scroll {
	display:flex;
	flex:1 1 auto;
	flex-direction:column;
	min-height:0;
	overflow-x:hidden;
	overflow-y:auto;
	overscroll-behavior-y:contain;
	scrollbar-color:#626262 transparent;
	scrollbar-width:thin;
}
.jta-chat-sidebar-scroll > *{flex-shrink:0}
/* In a short window, let the header and account links share the same scroll. */
@media(max-height:480px){
	.jta-chat-sidebar{overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-color:#626262 transparent;scrollbar-width:thin}
	.jta-chat-sidebar-scroll{display:contents}
}
.jta-chat-main{height:100%;max-height:100%;overflow:hidden}
.jta-chat-stage{min-width:0;overflow-x:hidden;overscroll-behavior:contain}
.jta-chat-empty{height:auto;min-height:100%;padding:24px 0;overflow-wrap:anywhere}
.jta-chat-composer-wrap{min-height:0;max-height:min(60vh,360px);max-height:min(calc(var(--jta-viewport-height,100dvh) * .6),360px);overflow-y:auto;overscroll-behavior:contain}
.jta-chat-composer textarea{min-width:0;max-height:clamp(38px,20vh,190px)}
.jta-chat-message-body{overflow-wrap:anywhere;min-width:0}.jta-chat-message-body pre{max-width:100%;overflow:auto}
.jta-chat-welcome{height:var(--jta-viewport-height,100dvh);min-height:0;overflow-y:auto}
@media(max-width:820px){.jta-chat-main,.jta-chat-sidebar{height:var(--jta-viewport-height,100dvh)}.jta-chat-empty{min-height:100%;padding:18px 0}.jta-chat-composer-wrap{padding-bottom:max(8px,env(safe-area-inset-bottom))}}
@media(max-height:560px){.jta-chat-empty h1{font-size:clamp(24px,3.5vw,36px)}.jta-chat-empty>p:not(.jta-chat-kicker){font-size:13px}.jta-chat-sidebar-head{height:52px}.jta-chat-sidebar-foot{padding-top:4px}.jta-chat-composer-wrap{padding-top:6px}.jta-chat-welcome-centre{padding-top:16px;padding-bottom:16px}}

/* One compact tool row next to the message field; expanded controls stay in this workspace. */
.jta-chat-tools .jta-file-menu{margin:0}.jta-chat-tools .jta-file-menu>summary{display:flex;align-items:center;min-height:40px;box-sizing:border-box;padding:8px 12px;border:1px solid #DFDFDF;border-radius:10px;background:#fff;font:600 13px/1.5 Arial,Helvetica,sans-serif;cursor:pointer;list-style:none}.jta-chat-tools .jta-file-menu>summary::-webkit-details-marker{display:none}.jta-chat-tools .jta-file-menu[open]{flex:1 0 100%;order:9}.jta-chat-tools .jta-file-menu[open] .jta-file-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px;padding:12px;background:#fff;border:1px solid #DFDFDF;border-radius:12px}.jta-chat-tools .jta-file-menu>summary:hover{background:#F0F0F0;border-color:#929292}
.jta-chat-composer-wrap [data-chat-composer][hidden]{display:none!important}.jta-chat-composer-wrap[data-compose-mode=email]{max-height:75vh;max-height:calc(var(--jta-viewport-height,100dvh) * .75)}.jta-chat-composer-wrap[data-compose-mode=email] .jta-file-composer{display:none!important}.jta-compose-modes{display:flex;gap:2px;padding:3px;border-radius:12px;background:#DFDFDF}.jta-chat-composer-wrap .jta-compose-modes button{background:transparent;border-color:transparent}.jta-chat-composer-wrap .jta-compose-modes button[aria-pressed=true]{background:#000;color:#fff;border-color:#000}.jta-chat-composer-wrap .jta-compose-modes button[aria-pressed=false]:hover{background:#fff;color:#313131}
.jta-chat-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:780px;margin:0 auto 12px;font:14px/1.5 Arial,Helvetica,sans-serif;color:#313131}
.jta-chat-tools .jta-modes.is-toolbar,.jta-chat-tools .is-toolbar [data-mode-header],.jta-chat-tools .is-toolbar [data-mode-tools],.jta-chat-tools .jta-file-composer,.jta-chat-tools .jta-file-tools{display:contents}
.jta-chat-composer-wrap .jta-chat-tools button,.jta-chat-tools .jta-connections>summary,.jta-chat-tools .jta-tool-label{display:inline-flex;align-items:center;gap:7px;min-height:40px;margin:0;padding:8px 12px;border:1px solid #DFDFDF;border-radius:10px;background:#fff;color:#313131;font:600 13px/1.5 Arial,Helvetica,sans-serif;cursor:pointer;white-space:normal}
.jta-chat-composer-wrap .jta-chat-tools button:hover,.jta-chat-tools .jta-connections>summary:hover{background:#F0F0F0;border-color:#929292}.jta-chat-tools .jtm-mode-choice{background:#FFF9CC;border-color:#E8D65A;color:#313131}.jta-chat-tools .jtm-mute-toggle.is-muted{background:#FFF0D5;border-color:#D3A354;color:#765300}
.jta-chat-tools .jta-tool-label{cursor:default;background:#FFF9CC;border-color:#E8D65A}.jta-chat-tools svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7}
.jta-chat-tools .jta-connections{margin:0;padding:0;border:0;max-height:none;overflow:visible;background:transparent;color:#313131}.jta-chat-tools .jta-connections>summary{list-style:none}.jta-chat-tools .jta-connections>summary::-webkit-details-marker{display:none}.jta-chat-tools .jta-connections>summary:before{content:'+';font-size:18px;font-weight:400}.jta-chat-tools .jta-connections[open]{flex:1 0 100%;order:9}.jta-chat-tools .jta-connections[open]>summary:before{content:'−'}
.jta-chat-tools .jtm-toolbar-panel,.jta-chat-tools .jtc-content{flex:1 0 100%;order:10;background:#fff;border:1px solid #DFDFDF;border-radius:12px;padding:16px;max-height:42vh;overflow:auto;color:#313131}
.jta-chat-tools .jtm-toolbar-panel p{margin:0 0 12px;line-height:1.6}.jta-chat-tools .jtm-toolbar-panel .jtm-actions{margin:0}.jta-chat-tools [data-mode-status]:not(:empty){order:11;flex:1 0 100%;margin:0;padding:10px 12px;background:#FFF9CC;border-radius:10px}
.jta-chat-tools .jta-file-list{order:12;flex:1 0 100%;margin:0}.jta-chat-tools .jta-file-list:empty{display:none}.jta-chat-tools .jta-file-status{order:13;flex:1 0 100%}.jta-chat-tools .jta-file-tools>span{font-size:11px;color:#636363}.jta-chat-tools :focus-visible{outline:3px solid #000;outline-offset:2px}.jta-chat-tools [hidden]{display:none!important}
@media(max-width:600px){.jta-chat-tools{gap:6px;margin-bottom:8px}.jta-chat-composer-wrap .jta-chat-tools button,.jta-chat-tools .jta-connections>summary,.jta-chat-tools .jta-tool-label{padding:7px 9px;font-size:12px;min-height:40px}.jta-chat-tools .jta-file-tools>span{width:auto}.jta-chat-tools .jtm-toolbar-panel,.jta-chat-tools .jtc-content{padding:12px}}
:root { --jta-chat-progress-dot: #8c8029; }
.jta-chat-tools .jta-file-menu:not([open])>:not(summary){display:none!important}
.jta-chat-composer-wrap:has([data-start-modes] section:not([hidden])){max-height:min(82dvh,680px)}.jta-chat-tools .jta-start-modes .jtm-toolbar-panel{max-height:none}
.jta-start-modes{display:contents}.jta-mode-options{display:flex;flex-wrap:wrap;gap:8px}.jta-chat-tools .jta-mode-options a{display:inline-flex;align-items:center;gap:7px;padding:10px 12px;border:1px solid #ddd;border-radius:12px;background:#fff;color:#242424;text-decoration:none;font:inherit;font-weight:600}.jta-mode-options a:hover{background:#f4f4f4}.jta-mode-options a:focus-visible{outline:2px solid #222;outline-offset:3px}.jta-start-modes svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.jta-start-modes [data-start-email]{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:0 0 12px}.jta-start-modes [data-start-email] label{display:grid;gap:6px}.jta-start-modes [data-start-email] input{width:100%;min-width:0;box-sizing:border-box;border:1px solid #bdbdbd;border-radius:8px;padding:10px;font:inherit}.jta-start-modes [data-start-status]:empty{display:none}.jta-chat-tools .jta-start-modes button[type=submit]{background:#93b8f4;color:#fff;border-color:#93b8f4}.jta-chat-tools .jta-start-modes button[type=submit]:hover{background:#b01827;border-color:#b01827;color:#fff}@media(max-width:600px){.jta-start-modes [data-start-email]{grid-template-columns:1fr}.jta-start-modes .jtm-toolbar-panel{max-height:55vh}}
.jta-chat-progress { width: min(100%, var(--jta-content)); margin: 0 auto; padding: 0 24px 28px; display: flex; align-items: center; gap: 14px; color: #595959; font-size: 14px; box-sizing: border-box; }
.jta-chat-progress[hidden] { display: none !important; }
.jta-chat-progress-avatar { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 12px; background: #f8e25a; color: #111; font-size: 10px; font-weight: 800; }
.jta-chat-progress-dots { display: inline-flex; gap: 4px; flex-shrink: 0; }
.jta-chat-progress-dots i { width: 5px; height: 5px; background: var(--jta-chat-progress-dot); border-radius: 50%; animation: jta-chat-thinking 1.4s ease-in-out infinite; }
.jta-chat-progress-dots i:nth-child(2) { animation-delay: .16s; }
.jta-chat-progress-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes jta-chat-thinking { 0%, 70%, 100% { opacity: .35; } 35% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .jta-chat-progress-dots i { animation: none; opacity: .7; } }
@media (max-width: 820px) { .jta-chat-progress { padding-inline: 17px; gap: 10px; } .jta-chat-progress-avatar { flex-basis: 34px; height: 34px; } }

/* Email is a long form. Keep it inside its own reachable scroll area, even
   when the shared attachment-tooltip rule allows ordinary Chat to overflow. */
.jta-chat-body .jta-chat-main > .jta-chat-composer-wrap[data-compose-mode=email] {
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior-y: contain;
	scroll-padding-block: 16px;
	scrollbar-gutter: stable;
}
/* Allocate the remaining viewport, rather than letting the form extend past
   it on short screens or when a phone keyboard reduces the visible height.
   Reading view keeps its own measured transition and zero-height bar rows. */
.jta-chat-app:not(.is-reading-view):not(.is-reading-transition) .jta-chat-main:has(> .jta-chat-composer-wrap[data-compose-mode=email]) {
	grid-template-rows: auto minmax(0, 1fr) minmax(0, 3fr);
}

.jta-chat-reply-sms label:not([hidden]) {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	cursor: pointer;
}
.jta-chat-reply-sms input[type=checkbox] {
	margin: 0;
	width: 18px;
	height: 18px;
	accent-color: var(--jta-chat-text, #313131);
}
.jta-chat-reply-sms [role=status]:not(:empty) {
	display: block;
}
/* Keep desktop attachment labels on the same text baseline as the size limit. */
@media (min-width: 900px) {
	body.jta-chat-body .jta-chat-composer-wrap .jta-file-tools--direct {
		display: flex;
		align-items: center;
	}
	body.jta-chat-body .jta-chat-composer-wrap .jta-file-tools--direct button:is([data-file-choose], [data-file-record]) {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		width: auto;
		padding-inline: 12px;
	}
	body.jta-chat-body .jta-chat-composer-wrap .jta-file-tools--direct button:is([data-file-choose], [data-file-record]) .jta-attachment-label {
		position: static;
		clip-path: none;
		width: auto;
		height: auto;
		overflow: visible;
		margin: 0;
		font: 400 14px/21px Arial, Helvetica, sans-serif;
	}
}
