/*
 * Shared typography layer.
 *
 * Manrope is bundled under the SIL Open Font License (see
 * assets/fonts/manrope/OFL.txt). Keeping the font local makes the
 * private hub consistent offline and avoids sending page content to a font
 * provider. The system fallbacks preserve Vietnamese glyph coverage if the
 * webfont is still loading or unavailable.
 */
:root {
	--tvh-font-sans: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
	--tvh-font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
	--tvh-text: #17231f;
	--tvh-text-soft: #334a42;
	--tvh-muted: #52645d;
	--tvh-primary: #12675e;
	--tvh-primary-hover: #0d514a;
	--tvh-focus: 0 0 0 4px rgba(18, 103, 94, 0.24);
}

html,
body,
body button,
body input,
body select,
body textarea,
body optgroup {
	font-family: var(--tvh-font-sans);
}

body {
	color: var(--tvh-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.55;
	font-synthesis: weight style;
	font-feature-settings: "kern" 1, "liga" 1;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

body :where(button, input, select, textarea, optgroup) {
	font: inherit;
}

body :where(code, pre, kbd, samp) {
	font-family: var(--tvh-font-mono);
	font-stretch: normal;
}

body :where(h1, h2, h3, h4, h5, h6) {
	color: var(--tvh-text);
	font-family: var(--tvh-font-sans);
	font-stretch: 94%;
	font-weight: 750;
	line-height: 1.2;
	letter-spacing: -0.012em !important;
}

body :where(h1, h2) {
	font-weight: 800;
}

body :where(p, li, dd, dt, td) {
	font-weight: 500;
}

body :where(th, label, legend) {
	font-weight: 650;
}

body :where(a) {
	color: var(--tvh-primary);
	font-weight: 600;
}

body :where(a:hover, a:focus-visible) {
	color: var(--tvh-primary-hover);
}

body :where(button, [type="button"], [type="submit"], [role="button"], .tvh-button) {
	font-weight: 700;
}

body :where(input, select, textarea) {
	color: var(--tvh-text);
}

body :where(input, textarea)::placeholder {
	color: #566860;
	opacity: 1;
}

::selection {
	background: rgba(18, 103, 94, 0.2);
	color: var(--tvh-text);
}

/* Keep the login gate and its feedback readable against light surfaces. */
.tvh-login {
	color: var(--tvh-text);
}

.tvh-login__head h1 {
	color: var(--tvh-text);
	font-weight: 800;
	letter-spacing: -0.02em !important;
}

.tvh-login__form label {
	color: var(--tvh-text-soft);
}

.tvh-login__remember {
	color: var(--tvh-text-soft) !important;
}

.tvh-login__submit {
	background: var(--tvh-text);
}

.tvh-login__submit:hover,
.tvh-login__submit:focus-visible {
	background: var(--tvh-primary-hover);
}

.tvh-login__links a {
	color: var(--tvh-primary);
}

/* The chat surface has its own palette; align its quiet text with the
 * stronger contrast used by the rest of the application. */
.tvh-chat-workspace {
	--tvh-chat-ink: #19332e;
	--tvh-chat-muted: #52645d;
	--tvh-chat-line: #cbded9;
	--tvh-chat-teal: var(--tvh-primary);
	--tvh-chat-teal-dark: var(--tvh-primary-hover);
}

.tvh-chat-search .tvh-lucide,
.tvh-chat-panel__actions .tvh-icon-button,
.tvh-chat-message__action,
.tvh-chat-recent-list > a > .tvh-lucide,
.tvh-chat-today-link > .tvh-lucide,
.tvh-chat-thread-row__actions a,
.tvh-chat-thread-row__actions button,
.tvh-chat-active-filter > a,
.tvh-chat-active-filter b {
	color: #52645d;
}

.tvh-chat-thread em,
.tvh-chat-message__meta,
.tvh-chat-composer__tools,
.tvh-chat-save-note {
	color: #456359;
}

.tvh-chat-date,
.tvh-chat-privacy {
	color: #586b63;
}

@media (max-width: 782px) {
	body {
		font-size: 14px;
		line-height: 1.55;
	}
}
