/**
 * lib_tisdesign — base layer
 *
 * Typography, focus and accessible utilities.
 * Everything is scoped to .tis-scope so the layer never restyles the whole
 * administration or a third-party template. Consumers opt in explicitly.
 *
 * @package  lib_tisdesign
 * @license  GNU General Public License version 2 or later
 */

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url("../fonts/montserrat-latin-500-700.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "PT Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/pt-sans-latin-400.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "PT Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/pt-sans-latin-700.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "PT Sans";
	font-style: italic;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/pt-sans-latin-400-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.tis-scope {
	box-sizing: border-box;
	color: var(--tis-ink);
	font-family: var(--tis-font-body);
	font-size: var(--tis-fs-base);
	line-height: var(--tis-lh-base);
	-webkit-font-smoothing: antialiased;
}

.tis-scope *,
.tis-scope *::before,
.tis-scope *::after {
	box-sizing: inherit;
}

.tis-scope :where(h1, h2, h3, h4) {
	margin: 0;
	color: var(--tis-ink);
	font-family: var(--tis-font-display);
	font-weight: 700;
	line-height: var(--tis-lh-tight);
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.tis-scope :where(h1) {
	font-size: var(--tis-fs-3xl);
}

.tis-scope :where(h2) {
	font-size: var(--tis-fs-2xl);
}

.tis-scope :where(h3) {
	font-size: var(--tis-fs-lg);
}

.tis-scope :where(p) {
	margin: 0;
}

.tis-scope :where(a) {
	color: var(--tis-teal-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.tis-scope :where(a:hover) {
	text-decoration-thickness: 2px;
}

/* Single, consistent focus ring for keyboard users. */
.tis-scope :where(:focus-visible) {
	border-radius: var(--tis-radius-s);
	outline: 3px solid var(--tis-focus);
	outline-offset: 2px;
}

.tis-scope :where(button, input, select, textarea) {
	color: inherit;
	font: inherit;
}

.tis-scope :where(img, svg) {
	max-width: 100%;
}

.tis-scope :where(img) {
	height: auto;
}

.tis-scope :where(table) {
	border-collapse: collapse;
}

/* Hidden content still announced by assistive technology. */
.tis-vh {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Visible on keyboard focus only. */
.tis-skip-link {
	position: absolute;
	top: var(--tis-space-2);
	left: var(--tis-space-4);
	z-index: var(--tis-z-toast);
	padding: var(--tis-space-2) var(--tis-space-4);
	background: var(--tis-surface);
	border-radius: var(--tis-radius-m);
	box-shadow: var(--tis-shadow-md);
	transform: translateY(-200%);
	transition: transform var(--tis-transition);
}

.tis-skip-link:focus,
.tis-skip-link:focus-visible {
	transform: translateY(0);
}

.tis-num {
	font-variant-numeric: tabular-nums;
}

.tis-muted {
	color: var(--tis-ink-2);
}

.tis-small {
	font-size: var(--tis-fs-sm);
}

.tis-scope [hidden] {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.tis-scope *,
	.tis-scope *::before,
	.tis-scope *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
