/* TrhUah School member glossary — Glo4 three-pane interface. */

.wpcd-page,
.wpcd-dictionary,
.wpcd-single-wrap,
.wpcd-search-wrap,
.wpcd-login-required {
	--wpcd-navy: #2d6fa3;
	--wpcd-navy-deep: #173f67;
	--wpcd-accent: #43b8ff;
	--wpcd-ink: #1d3247;
	--wpcd-muted: #64748b;
	--wpcd-line: #dbe4ec;
	--wpcd-line-strong: #c7d4df;
	--wpcd-soft: #f3faf7;
	--wpcd-blue-soft: #edf7ff;
	--wpcd-white: #fff;
	--wpcd-danger: #b42318;
	--wpcd-radius: 20px;
	--wpcd-shadow: 0 18px 50px rgba(29, 50, 71, 0.08);
	box-sizing: border-box;
	color: var(--wpcd-ink);
	font-family: inherit;
}

.wpcd-page *,
.wpcd-dictionary *,
.wpcd-single-wrap *,
.wpcd-search-wrap *,
.wpcd-login-required * {
	box-sizing: border-box;
}

.wpcd-page {
	width: min(100% - 40px, 1340px);
	margin: 0 auto;
	padding: clamp(40px, 5vw, 76px) 0 clamp(64px, 8vw, 112px);
}

.wpcd-dictionary a,
.wpcd-single-wrap a,
.wpcd-search-wrap a,
.wpcd-login-required a {
	color: inherit;
}

.wpcd-dictionary button,
.wpcd-dictionary input,
.wpcd-dictionary select,
.wpcd-search-wrap button,
.wpcd-search-wrap input {
	font: inherit;
}

.wpcd-dictionary :where(a, button, input, select):focus-visible,
.wpcd-single-wrap :where(a, button):focus-visible,
.wpcd-search-wrap :where(a, button, input):focus-visible,
.wpcd-login-required :where(a, button):focus-visible {
	outline: 3px solid var(--wpcd-navy);
	outline-offset: 3px;
}

.wpcd-dictionary__header {
	display: grid;
	grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
	align-items: center;
	gap: 28px;
	margin-bottom: 24px;
}

.wpcd-dictionary__title {
	margin: 0;
	color: var(--wpcd-navy-deep);
	font-size: clamp(2rem, 3vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	line-height: 1.12;
}

.wpcd-search-form {
	display: grid;
	grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px) auto;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.wpcd-search-field {
	position: relative;
	min-width: 0;
}

.wpcd-search-icon {
	position: absolute;
	top: 50%;
	left: 18px;
	display: grid;
	width: 18px;
	height: 18px;
	place-items: center;
	transform: translateY(-50%);
	color: #718096;
	pointer-events: none;
}

.wpcd-search-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 2;
}

.wpcd-search-input,
.wpcd-category-select {
	width: 100%;
	min-height: 52px;
	border: 1px solid var(--wpcd-line-strong);
	border-radius: 12px;
	background: var(--wpcd-white);
	color: var(--wpcd-ink);
	font-size: 1rem;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.wpcd-search-input {
	box-sizing: border-box;
	padding: 12px 52px 12px 56px !important;
	appearance: none;
}

.wpcd-search-input::-webkit-search-decoration,
.wpcd-search-input::-webkit-search-cancel-button {
	appearance: none;
}

.wpcd-search-input::placeholder {
	color: #627486;
}

.wpcd-search-input:hover,
.wpcd-category-select:hover {
	border-color: #9fb4c6;
}

.wpcd-search-input:focus,
.wpcd-category-select:focus {
	border-color: var(--wpcd-navy);
	box-shadow: 0 0 0 4px rgba(67, 184, 255, 0.16);
	outline: 0;
}

.wpcd-search-clear {
	position: absolute;
	top: 50%;
	right: 9px;
	display: inline-grid;
	width: 36px;
	height: 36px;
	place-items: center;
	transform: translateY(-50%);
	border-radius: 50%;
	color: var(--wpcd-muted);
	font-size: 1.4rem;
	line-height: 1;
	text-decoration: none;
}

.wpcd-search-clear:hover {
	background: var(--wpcd-blue-soft);
	color: var(--wpcd-navy-deep);
}

.wpcd-category-select {
	padding: 10px 38px 10px 14px;
}

.wpcd-search-submit,
.wpcd-button,
.wpcd-more,
.wpcd-detail-back,
.wpcd-detail-list-button {
	display: inline-flex;
	min-height: 48px;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: var(--wpcd-navy);
	color: #fff;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.wpcd-search-submit:hover,
.wpcd-button:hover,
.wpcd-more:hover {
	background: var(--wpcd-navy-deep);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(45, 111, 163, 0.2);
}

.wpcd-dictionary__workspace {
	display: grid;
	grid-template-columns: 164px minmax(340px, 430px) minmax(0, 1fr);
	min-height: 680px;
	overflow: hidden;
	border: 1px solid var(--wpcd-line);
	border-radius: var(--wpcd-radius);
	background: var(--wpcd-white);
	box-shadow: var(--wpcd-shadow);
}

.wpcd-dictionary__controls {
	min-width: 0;
	border-right: 1px solid var(--wpcd-line);
	background: linear-gradient(180deg, #fbfdff 0%, #f7fbfd 100%);
}

.wpcd-language-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-bottom: 1px solid var(--wpcd-line);
}

.wpcd-language-tab {
	display: inline-flex;
	min-height: 64px;
	align-items: center;
	justify-content: center;
	padding: 10px 8px;
	border-bottom: 3px solid transparent;
	color: var(--wpcd-muted);
	font-size: 0.93rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.wpcd-language-tab:hover {
	background: var(--wpcd-blue-soft);
	color: var(--wpcd-navy);
}

.wpcd-language-tab.is-active,
.wpcd-language-tab[aria-selected='true'] {
	border-bottom-color: var(--wpcd-navy);
	background: #fff;
	color: var(--wpcd-navy-deep);
}

.wpcd-index {
	display: flex;
	max-height: 610px;
	flex-direction: column;
	gap: 2px;
	overflow-y: auto;
	padding: 12px 14px 18px;
	scrollbar-width: thin;
}

.wpcd-index[hidden] {
	display: none !important;
}

.wpcd-index-item {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: flex-start;
	padding: 8px 12px;
	border: 1px solid transparent;
	border-radius: 9px;
	color: var(--wpcd-muted);
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
}

.wpcd-index-item:hover {
	background: #edf5fb;
	color: var(--wpcd-navy-deep);
}

.wpcd-index-item.is-active,
.wpcd-index-item.active,
.wpcd-index-item[aria-current='true'] {
	border-color: #a8d5f1;
	background: #e3f2fd;
	color: #155d97;
}

.wpcd-index-item.is-disabled,
.wpcd-index-item[aria-disabled='true'] {
	color: #bac3cb;
	cursor: default;
}

.wpcd-index-item.is-unavailable:not(.is-disabled) {
	color: #64748b;
}

.wpcd-dictionary__results {
	min-width: 0;
	border-right: 1px solid var(--wpcd-line);
	background: #fff;
}

.wpcd-results-header {
	display: flex;
	min-height: 64px;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 22px;
	border-bottom: 1px solid var(--wpcd-line);
}

.wpcd-results-title {
	margin: 0;
	color: var(--wpcd-ink);
	font-size: 1rem;
	font-weight: 800;
}

.wpcd-results-title span,
.wpcd-results-total {
	color: var(--wpcd-muted);
	font-size: 0.85rem;
	font-weight: 500;
}

.wpcd-term-list {
	max-height: 616px;
	margin: 0;
	overflow-y: auto;
	padding: 0;
	list-style: none;
	scrollbar-color: #c6d1da transparent;
	scrollbar-width: thin;
}

.wpcd-term-list__item,
.wpcd-term-item {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #e8eef3;
}

.wpcd-term-row {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	min-height: 68px;
	align-items: center;
	gap: 8px 16px;
	padding: 13px 20px;
	border-left: 4px solid transparent;
	background: #fff;
	color: var(--wpcd-ink);
	text-decoration: none;
	transition: background-color 140ms ease, border-color 140ms ease;
}

.wpcd-term-row:hover {
	background: #f7fbfe;
	color: var(--wpcd-navy-deep);
}

.wpcd-term-row.is-current,
.wpcd-term-row.is-selected,
.wpcd-term-row[aria-current='true'] {
	border-left-color: var(--wpcd-accent);
	background: linear-gradient(90deg, #eaf6ff 0%, #f5faff 100%);
	color: #0e5e9e;
}

.wpcd-term-row__names,
.wpcd-term-names {
	display: flex;
	min-width: 0;
	align-items: baseline;
	gap: 5px;
}

.wpcd-term-row__names strong,
.wpcd-term-names strong {
	overflow: hidden;
	font-size: 1rem;
	font-weight: 800;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpcd-term-row__names span,
.wpcd-term-names span {
	overflow: hidden;
	color: #52677b;
	font-size: 0.88rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpcd-term-excerpt {
	display: -webkit-box;
	grid-column: 1;
	overflow: hidden;
	color: var(--wpcd-muted);
	font-size: 0.82rem;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
}

.wpcd-term-row__arrow,
.wpcd-row-arrow {
	grid-column: 2;
	grid-row: 1 / span 2;
	color: #9aabba;
	font-size: 1.8rem;
	font-weight: 300;
}

.wpcd-term-row:hover :is(.wpcd-term-row__arrow, .wpcd-row-arrow),
.wpcd-term-row[aria-current='true'] :is(.wpcd-term-row__arrow, .wpcd-row-arrow) {
	color: var(--wpcd-navy);
}

.wpcd-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px;
	border-top: 1px solid var(--wpcd-line);
}

.wpcd-page-previous,
.wpcd-more {
	min-height: 44px;
}

.wpcd-page-previous {
	padding: 10px 14px;
	border-radius: 10px;
	color: var(--wpcd-navy);
	font-weight: 700;
	text-decoration: none;
}

.wpcd-more[hidden] {
	display: none;
}

.wpcd-dictionary__detail {
	position: relative;
	min-width: 0;
	min-height: 680px;
	overflow-y: auto;
	background: #fff;
}

.wpcd-dictionary .wpcd-detail-back {
	display: none;
	margin: 16px 18px 0;
	border-color: var(--wpcd-line-strong);
	background: #fff;
	color: var(--wpcd-navy-deep);
}

.wpcd-detail-toolbar,
.wpcd-detail-text-size {
	display: none;
}

.wpcd-detail-text-size {
	align-items: center;
	gap: 2px;
	border: 1px solid var(--wpcd-line-strong);
	border-radius: 12px;
	background: #fff;
}

.wpcd-detail-text-size button {
	width: 44px;
	min-width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--wpcd-navy-deep);
	font-size: 1.4rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.wpcd-detail-text-size button:hover:not(:disabled) {
	background: var(--wpcd-blue-soft);
}

.wpcd-detail-text-size button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.wpcd-detail-text-size output {
	min-width: 42px;
	color: var(--wpcd-ink);
	font-size: 0.82rem;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	text-align: center;
}

.wpcd-dictionary .wpcd-detail-list-nav {
	display: none;
}

.wpcd-detail-content {
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(36px, 5vw, 68px) clamp(28px, 5vw, 64px) 56px;
}

.wpcd-detail-content.is-loading {
	opacity: 0.55;
}

.wpcd-detail-header,
.wpcd-single-header {
	margin-bottom: 24px;
}

.wpcd-detail-title,
.wpcd-single-title {
	margin: 0 0 10px;
	color: #13234d;
	font-size: clamp(1.8rem, 3vw, 2.7rem);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.24;
	overflow-wrap: anywhere;
}

/* Keep desktop detail headings aligned with the glossary reading scale.
 * Theme-wide H1 typography can otherwise override this component to 54.6px.
 */
@media (min-width: 768px) {
	.wpcd-detail-title,
	.wpcd-single-title {
		font-size: 40px !important;
	}
}

.wpcd-detail-title span,
.wpcd-single-title span,
.wpcd-term-english {
	font-weight: 750;
}

.wpcd-category {
	margin: 0;
}

.wpcd-category-badge,
.wpcd-detail-category {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-height: 32px;
	margin: 0;
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--wpcd-blue-soft);
	color: #1670b1;
	font-size: 0.88rem;
	font-weight: 750;
	overflow-wrap: anywhere;
}

.wpcd-detail-lead {
	margin: 0 0 22px;
	color: #40586d;
	font-size: 1.04rem;
	font-weight: 650;
	line-height: 1.75;
}

.wpcd-detail-definition,
.wpcd-detail-body,
.wpcd-single-content {
	color: #374b5f;
	font-size: 1rem;
	line-height: 1.95;
	overflow-wrap: anywhere;
}

.wpcd-detail-definition > :first-child,
.wpcd-detail-body > :first-child,
.wpcd-single-content > :first-child {
	margin-top: 0;
}

.wpcd-detail-definition :where(h2, h3, h4),
.wpcd-detail-body :where(h2, h3, h4),
.wpcd-single-content :where(h2, h3, h4) {
	margin: 1.8em 0 0.6em;
	color: var(--wpcd-ink);
	line-height: 1.4;
}

.wpcd-detail-definition p,
.wpcd-detail-body p,
.wpcd-single-content p {
	margin: 0 0 1.25em;
}

.wpcd-detail-definition :where(strong, b),
.wpcd-detail-body :where(strong, b),
.wpcd-single-content :where(strong, b) {
	color: inherit;
	font-weight: 700;
}

.wpcd-detail-term-wrap {
	position: relative;
	display: inline;
}

.wpcd-detail-term-link {
	border-radius: 0.16em;
	color: #2d6fa3;
	font-weight: 650;
	touch-action: manipulation;
	text-decoration-line: underline;
	text-decoration-color: #43b8ff;
	text-decoration-style: dotted;
	text-decoration-thickness: 0.12em;
	text-underline-offset: 0.18em;
	transition: color 140ms ease, background-color 140ms ease;
}

.wpcd-detail-term-link:hover,
.wpcd-detail-term-wrap.is-open .wpcd-detail-term-link {
	background: #edf7ff;
	color: #173f67;
}

.wpcd-detail-term-link:focus-visible {
	outline: 3px solid #2d6fa3;
	outline-offset: 3px;
}

.wpcd-detail-term-tooltip {
	position: fixed;
	z-index: 100000;
	display: block;
	box-sizing: border-box;
	width: min(20rem, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	padding: 0.75rem 0.875rem;
	border: 1px solid rgb(255 255 255 / 18%);
	border-radius: 0.7rem;
	background: #1d3247;
	box-shadow: 0 14px 36px rgb(29 50 71 / 28%);
	color: #fff;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 450;
	line-height: 1.55;
	text-align: left;
	pointer-events: none;
	overflow: auto;
	overscroll-behavior: contain;
	user-select: text;
}

.wpcd-detail-term-tooltip[hidden] {
	display: none !important;
}

.wpcd-detail-term-tooltip .wpcd-tooltip-tap-hint {
	display: block;
	margin-top: 0.55rem;
	padding-top: 0.45rem;
	border-top: 1px solid rgb(255 255 255 / 25%);
	color: #dcefff;
	font-size: 0.8rem;
}

.wpcd-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	margin: 22px 0;
}

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

.wpcd-table-wrap th,
.wpcd-table-wrap td {
	padding: 10px 12px;
	border: 1px solid var(--wpcd-line);
	text-align: left;
	vertical-align: top;
}

.wpcd-related,
.wpcd-related-mount:not(:empty) {
	margin-top: 34px;
	padding-top: 24px;
	border-top: 1px solid var(--wpcd-line);
}

.wpcd-related h3,
.wpcd-related-mount h3 {
	margin: 0 0 12px;
	color: var(--wpcd-navy);
	font-size: 1rem;
}

.wpcd-related-list,
.wpcd-related-mount ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpcd-related a,
.wpcd-related-mount a {
	display: inline-flex;
	max-width: 100%;
	min-height: 40px;
	align-items: center;
	padding: 7px 12px;
	border: 1px solid var(--wpcd-line);
	border-radius: 999px;
	background: #fff;
	color: var(--wpcd-navy-deep);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.wpcd-related a:hover,
.wpcd-related-mount a:hover {
	border-color: var(--wpcd-accent);
	background: var(--wpcd-blue-soft);
}

.wpcd-empty-state,
.wpcd-error-state,
.wpcd-detail-empty,
.wpcd-empty-detail {
	margin: 0;
	padding: 28px 22px;
	color: var(--wpcd-muted);
	line-height: 1.7;
	text-align: center;
}

.wpcd-error-state {
	color: var(--wpcd-danger);
}

.wpcd-dictionary.is-loading .wpcd-results-header::after,
.wpcd-dictionary__detail[aria-busy='true']::after {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid #c8d6e2;
	border-top-color: var(--wpcd-navy);
	border-radius: 50%;
	animation: wpcd-spin 700ms linear infinite;
}

.wpcd-dictionary.is-loading .wpcd-results-header::after {
	margin-left: auto;
}

.wpcd-dictionary__detail[aria-busy='true']::after {
	position: absolute;
	top: 20px;
	right: 20px;
}

@keyframes wpcd-spin {
	to { transform: rotate(360deg); }
}

/* Canonical single term. */
.wpcd-single-wrap {
	width: min(100%, 900px);
	margin: 0 auto;
	padding: clamp(28px, 5vw, 64px);
	border: 1px solid var(--wpcd-line);
	border-radius: var(--wpcd-radius);
	background: #fff;
	box-shadow: var(--wpcd-shadow);
}

.wpcd-single-reader-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.wpcd-single-reader-toolbar.has-return {
	justify-content: space-between;
}

.wpcd-single-reader-toolbar.has-return,
.wpcd-single-wrap.is-text-size-ready .wpcd-single-reader-toolbar {
	margin-bottom: 24px;
}

.wpcd-single-return {
	margin: 0;
}

.wpcd-single-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--wpcd-line);
}

.wpcd-button--secondary {
	border-color: var(--wpcd-line-strong);
	background: #fff;
	color: var(--wpcd-navy-deep);
}

.wpcd-button--secondary:hover {
	background: var(--wpcd-blue-soft);
	color: var(--wpcd-navy-deep);
}

/* Compact legacy search shortcode. */
.wpcd-search-wrap[data-wpcd-quick-search] {
	position: relative;
	width: min(100%, 680px);
	margin: 24px 0;
}

.wpcd-quick-search-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.wpcd-quick-search-form .wpcd-search-input {
	padding-left: 16px;
}

.wpcd-search-results {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	left: 0;
	z-index: 30;
	display: none;
	max-height: 420px;
	overflow-y: auto;
	border: 1px solid var(--wpcd-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 16px 42px rgba(29, 50, 71, 0.16);
}

.wpcd-search-results.active {
	display: block;
}

.wpcd-search-result-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpcd-search-result-item,
.wpcd-quick-result {
	display: block;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #e8eef3;
	text-decoration: none;
}

.wpcd-search-result-item > a,
.wpcd-quick-result {
	display: grid;
	gap: 4px;
	padding: 13px 16px;
	text-decoration: none;
}

.wpcd-search-result-item > a:hover,
.wpcd-quick-result:hover {
	background: var(--wpcd-blue-soft);
}

.wpcd-search-result-item strong,
.wpcd-quick-result strong {
	color: var(--wpcd-ink);
}

.wpcd-search-result-item span,
.wpcd-quick-result span {
	display: -webkit-box;
	overflow: hidden;
	color: var(--wpcd-muted);
	font-size: 0.85rem;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
}

.wpcd-search-no-results,
.wpcd-search-error {
	margin: 0;
	padding: 14px 16px;
	color: var(--wpcd-muted);
	line-height: 1.55;
}

.wpcd-search-error {
	color: var(--wpcd-danger);
}

/* Member gate, also used when a shortcode is placed in Elementor. */
.wpcd-login-required {
	width: min(100% - 32px, 720px);
	margin: clamp(42px, 8vw, 96px) auto;
	padding: clamp(30px, 6vw, 56px);
	border: 1px solid var(--wpcd-line);
	border-radius: var(--wpcd-radius);
	background: linear-gradient(145deg, #fff 0%, var(--wpcd-soft) 100%);
	box-shadow: var(--wpcd-shadow);
	text-align: center;
}

.wpcd-login-required h1 {
	margin: 0 0 12px;
	color: var(--wpcd-navy-deep);
}

.wpcd-login-required p {
	margin: 12px 0;
	color: var(--wpcd-muted);
}

@media (max-width: 1199px) {
	.wpcd-page {
		width: min(100% - 32px, 1080px);
	}

	.wpcd-dictionary__header {
		grid-template-columns: 190px minmax(0, 1fr);
	}

	.wpcd-search-form {
		grid-template-columns: minmax(220px, 1fr) minmax(140px, 190px) auto;
	}

	.wpcd-dictionary__workspace {
		grid-template-columns: 148px minmax(300px, 40%) minmax(0, 1fr);
	}
}

@media (max-width: 959px) {
	.wpcd-dictionary__header {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.wpcd-dictionary__workspace {
		grid-template-columns: minmax(0, 42%) minmax(0, 58%);
	}

	.wpcd-dictionary__controls {
		grid-column: 1 / -1;
		border-right: 0;
		border-bottom: 1px solid var(--wpcd-line);
	}

	.wpcd-language-tabs {
		width: min(100%, 320px);
	}

	.wpcd-language-tab {
		min-height: 52px;
	}

	.wpcd-index {
		max-height: none;
		flex-direction: row;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 10px 14px 12px;
		scroll-snap-type: x proximity;
	}

	.wpcd-index-item {
		flex: 0 0 auto;
		justify-content: center;
		scroll-snap-align: start;
	}

	.wpcd-dictionary__results {
		border-right: 1px solid var(--wpcd-line);
	}

	.wpcd-term-list {
		max-height: 650px;
	}
}

@media (max-width: 767px) {
	.wpcd-page {
		width: min(100% - 24px, 680px);
		padding-top: 30px;
	}

	.wpcd-dictionary__title {
		font-size: 2rem;
	}

	.wpcd-search-form {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.wpcd-category-select {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.wpcd-search-submit {
		grid-column: 2;
		grid-row: 1;
		min-width: 70px;
	}

	.wpcd-dictionary__workspace {
		display: block;
		min-height: 0;
		border-radius: 16px;
	}

	.wpcd-language-tabs {
		width: 100%;
	}

	.wpcd-dictionary__results {
		border-right: 0;
	}

	.wpcd-term-list {
		max-height: none;
	}

	.wpcd-dictionary__detail {
		min-height: 520px;
		border-top: 1px solid var(--wpcd-line);
	}

	.wpcd-dictionary.is-enhanced .wpcd-dictionary__detail {
		display: none;
	}

	.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-dictionary__results {
		display: none;
	}

	.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-dictionary__detail {
		display: block;
	}

	.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-back {
		display: inline-flex;
	}

	.wpcd-detail-content {
		padding: 30px 20px 44px;
	}

	.wpcd-detail-title,
	.wpcd-single-title {
		font-size: 1.7rem;
	}

	.wpcd-single-wrap {
		padding: 26px 20px;
		border-radius: 16px;
	}
}

@media (max-width: 390px) {
	.wpcd-page {
		width: min(100% - 16px, 380px);
	}

	.wpcd-dictionary__header {
		margin-bottom: 16px;
	}

	.wpcd-search-form {
		grid-template-columns: minmax(0, 1fr);
	}

	.wpcd-search-submit,
	.wpcd-category-select {
		grid-column: 1;
	}

	.wpcd-search-submit {
		grid-row: 3;
	}

	.wpcd-term-row {
		padding-right: 14px;
		padding-left: 14px;
	}

	.wpcd-term-row__names,
	.wpcd-term-names {
		align-items: flex-start;
		flex-direction: column;
		gap: 1px;
	}
}

/* Full-width dictionary list and focused term reader. */
.wpcd-archive-page {
	width: 100%;
	max-width: none;
	padding: 0 0 clamp(64px, 8vw, 112px);
}

.wpcd-archive-wrap .wpcd-dictionary__header {
	display: block;
	margin: 0;
	padding: clamp(20px, calc(8vw + var(--wpcd-archive-hero-top, 96px) - 96px), var(--wpcd-archive-hero-top, 96px)) max(24px, calc((100vw - 1040px) / 2)) clamp(20px, calc(6vw + var(--wpcd-archive-hero-bottom, 72px) - 72px), var(--wpcd-archive-hero-bottom, 72px));
	background: linear-gradient(135deg, #eef8ff 0%, #f9fcff 58%, #e9f5ff 100%);
	text-align: center;
}

.wpcd-dictionary__heading {
	max-width: 780px;
	margin: 0 auto;
}

.wpcd-dictionary__eyebrow {
	margin: 0 0 12px;
	color: var(--wpcd-navy);
	font-size: 0.88rem;
	font-weight: 800;
	letter-spacing: 0.06em;
}

.wpcd-archive-wrap .wpcd-dictionary__title {
	font-size: min(var(--wpcd-archive-title-size, 72px), max(3rem, calc(6vw + var(--wpcd-archive-title-size, 72px) - 72px)));
	letter-spacing: -0.065em;
}

.wpcd-dictionary__description {
	margin: 18px auto 0;
	color: #40586d;
	font-size: clamp(1rem, 1.8vw, 1.18rem);
	line-height: 1.7;
}

.wpcd-archive-wrap .wpcd-search-form {
	position: relative;
	grid-template-columns: minmax(0, 1fr);
	max-width: 840px;
	margin: clamp(30px, 4vw, 42px) auto 0;
}

.wpcd-archive-wrap .wpcd-search-input {
	min-height: 82px;
	padding-left: 66px !important;
	border: 2px solid var(--wpcd-navy);
	border-radius: 13px;
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	box-shadow: 0 10px 24px rgba(45, 111, 163, 0.08);
}

.wpcd-archive-wrap .wpcd-search-icon {
	left: 25px;
	width: 26px;
	height: 26px;
}

.wpcd-archive-wrap .wpcd-search-submit {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

.wpcd-archive-wrap .wpcd-category-select {
	grid-column: 1;
	justify-self: end;
	width: min(100%, 210px);
	min-height: 38px;
	margin-top: 2px;
	border-color: transparent;
	background: transparent;
	color: var(--wpcd-muted);
	font-size: 0.86rem;
}

.wpcd-archive-wrap .wpcd-dictionary__workspace {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	width: min(100% - 48px, var(--wpcd-archive-content-width, 1240px));
	min-height: 0;
	margin: clamp(30px, 5vw, 54px) auto 0;
	overflow: visible;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Member-submitted term request. */
.wpcd-term-request {
	display: flex;
	justify-content: center;
	margin: -22px auto 0;
	padding: 0 20px;
}

.wpcd-term-request__open {
	min-height: 44px;
	padding: 9px 17px;
	border: 1px solid var(--wpcd-navy);
	border-radius: 999px;
	background: #fff;
	color: var(--wpcd-navy-deep);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 750;
	cursor: pointer;
	box-shadow: 0 5px 14px rgba(29, 50, 71, 0.08);
}

.wpcd-term-request__open:hover {
	background: var(--wpcd-navy);
	color: #fff;
}

.wpcd-term-request__open:focus-visible,
.wpcd-term-request__close:focus-visible,
.wpcd-term-request__cancel:focus-visible,
.wpcd-term-request__submit:focus-visible {
	outline: 3px solid var(--wpcd-accent);
	outline-offset: 3px;
}

.wpcd-term-request__dialog {
	position: fixed;
	inset: 0;
	z-index: 100010;
	display: grid;
	place-items: center;
	padding: 24px;
}

.wpcd-term-request__dialog[hidden] {
	display: none;
}

.wpcd-term-request__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 32, 50, 0.55);
}

.wpcd-term-request__panel {
	position: relative;
	width: min(100%, 560px);
	max-height: min(720px, calc(100dvh - 48px));
	overflow: auto;
	padding: clamp(28px, 5vw, 42px);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(15, 32, 50, 0.3);
}

.wpcd-term-request__panel h2 {
	margin: 0;
	color: var(--wpcd-navy-deep);
	font-size: clamp(1.45rem, 3vw, 1.85rem);
}

.wpcd-term-request__panel > p {
	margin: 10px 34px 24px 0;
	color: #52677a;
	line-height: 1.65;
}

.wpcd-term-request__panel form > p {
	margin: 0 0 18px;
}

.wpcd-term-request__panel label {
	display: block;
	margin-bottom: 8px;
	color: var(--wpcd-ink);
}

.wpcd-term-request__panel input,
.wpcd-term-request__panel textarea {
	width: 100%;
	border: 1px solid var(--wpcd-line-strong);
	border-radius: 10px;
	background: #fff;
	color: var(--wpcd-ink);
	font: inherit;
	line-height: 1.55;
}

.wpcd-term-request__panel input {
	min-height: 48px;
	padding: 10px 12px;
}

.wpcd-term-request__panel textarea {
	min-height: 132px;
	padding: 11px 12px;
	resize: vertical;
}

.wpcd-term-request__panel input:focus,
.wpcd-term-request__panel textarea:focus {
	border-color: var(--wpcd-navy);
	box-shadow: 0 0 0 4px rgba(67, 184, 255, 0.16);
	outline: 0;
}

.wpcd-term-request__close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: inline-grid;
	width: 38px;
	height: 38px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: #eef5fa;
	color: var(--wpcd-navy-deep);
	font-size: 1.65rem;
	line-height: 1;
	cursor: pointer;
}

.wpcd-term-request__status {
	min-height: 1.5em;
	margin-bottom: 16px !important;
	color: #246a4c;
	font-size: 0.94rem;
	font-weight: 650;
}

.wpcd-term-request__status.is-error {
	color: var(--wpcd-danger);
}

.wpcd-term-request__actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.wpcd-term-request__cancel,
.wpcd-term-request__submit {
	min-height: 46px;
	padding: 10px 16px;
	border-radius: 10px;
	font: inherit;
	font-weight: 750;
	cursor: pointer;
}

.wpcd-term-request__cancel {
	border: 1px solid var(--wpcd-line-strong);
	background: #fff;
	color: var(--wpcd-ink);
}

.wpcd-term-request__submit {
	border: 1px solid var(--wpcd-navy);
	background: var(--wpcd-navy);
	color: #fff;
}

.wpcd-term-request__submit:disabled {
	cursor: wait;
	opacity: 0.65;
}

.wpcd-archive-wrap .wpcd-dictionary__controls {
	border: 0;
	background: transparent;
}

.wpcd-archive-wrap .wpcd-language-tabs {
	width: min(100%, 460px);
	margin: 0 auto 30px;
	border: 2px solid var(--wpcd-navy);
	border-radius: 14px;
	overflow: hidden;
}

.wpcd-archive-wrap .wpcd-language-tab {
	min-height: 54px;
	border: 0;
	color: var(--wpcd-navy);
	font-size: 1rem;
}

.wpcd-archive-wrap .wpcd-language-tab.is-active,
.wpcd-archive-wrap .wpcd-language-tab[aria-selected='true'] {
	background: var(--wpcd-navy);
	color: #fff;
}

.wpcd-archive-wrap .wpcd-index {
	display: grid;
	grid-template-columns: repeat(14, minmax(44px, 1fr));
	max-height: none;
	gap: 2px;
	overflow: visible;
	padding: 6px;
	border: 1px solid var(--wpcd-line-strong);
	border-radius: 11px;
	background: #fff;
}

.wpcd-archive-wrap .wpcd-index-item {
	justify-content: center;
	padding: 8px 4px;
	border-radius: 8px;
	font-size: 1rem;
}

.wpcd-archive-wrap .wpcd-dictionary__results {
	margin-top: 32px;
	border: 0;
}

.wpcd-archive-wrap .wpcd-results-header {
	min-height: 58px;
	padding: 0 16px 14px;
	border-bottom: 2px solid var(--wpcd-line);
}

.wpcd-archive-wrap .wpcd-term-list {
	max-height: none;
	overflow: visible;
}

.wpcd-archive-wrap .wpcd-term-row {
	grid-template-columns: minmax(260px, 31%) minmax(0, 1fr) auto;
	min-height: calc(72px + var(--wpcd-archive-row-spacing, 20px) + var(--wpcd-archive-row-spacing, 20px));
	gap: 14px 34px;
	padding: var(--wpcd-archive-row-spacing, 20px) 16px;
	border-left: 0;
	border-bottom: 1px solid var(--wpcd-line);
}

.wpcd-archive-wrap .wpcd-term-row.is-current,
.wpcd-archive-wrap .wpcd-term-row.is-selected,
.wpcd-archive-wrap .wpcd-term-row[aria-current='true'] {
	border-left: 0;
	background: #f3f9fe;
}

.wpcd-archive-wrap .wpcd-term-names {
	display: grid;
	grid-column: 1;
	gap: 5px;
}

.wpcd-archive-wrap .wpcd-term-row__names strong,
.wpcd-archive-wrap .wpcd-term-names strong {
	overflow: visible;
	font-size: clamp(1.02rem, 1.8vw, 1.26rem);
	text-overflow: clip;
	white-space: normal;
}

.wpcd-archive-wrap .wpcd-term-category {
	color: var(--wpcd-navy);
	font-size: 0.88rem;
	font-weight: 750;
}

.wpcd-archive-wrap .wpcd-term-excerpt {
	display: -webkit-box;
	grid-column: 2;
	overflow: hidden;
	font-size: 0.98rem;
	line-height: 1.75;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.wpcd-archive-wrap .wpcd-row-arrow {
	grid-column: 3;
	grid-row: 1;
}

.wpcd-dictionary.is-enhanced .wpcd-dictionary__detail {
	display: none;
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-dictionary__detail {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: block;
	min-height: 100dvh;
	overflow-y: auto;
	border: 0;
	background: #fff;
	animation: wpcd-detail-enter 220ms ease-out;
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-toolbar {
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 72px;
	padding: 12px max(20px, calc((100vw - 1160px) / 2));
	border-bottom: 1px solid var(--wpcd-line);
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(10px);
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-back {
	position: static;
	display: inline-flex;
	margin: 0;
	border-color: var(--wpcd-line-strong);
	background: rgba(255, 255, 255, 0.94);
	color: var(--wpcd-navy-deep);
	box-shadow: 0 8px 24px rgba(29, 50, 71, 0.1);
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-text-size,
.wpcd-single-wrap.is-text-size-ready .wpcd-detail-text-size {
	display: flex;
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-body,
.wpcd-single-wrap.is-text-size-ready .wpcd-single-content {
	font-size: var(--wpcd-detail-font-size, 1rem);
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-body :where(div, p, ul, ol, li, blockquote, th, td, dt, dd, pre, code, span, strong, em, a),
.wpcd-single-wrap.is-text-size-ready .wpcd-single-content :where(div, p, ul, ol, li, blockquote, th, td, dt, dd, pre, code, span, strong, em, a) {
	font-size: inherit !important;
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-content {
	width: min(100% - 48px, var(--wpcd-archive-detail-width, 1040px));
	max-width: none;
	margin: 0 auto;
	padding: 44px 0 132px;
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-list-nav {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
	display: flex;
	justify-content: center;
	padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--wpcd-line);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 -8px 24px rgba(29, 50, 71, 0.1);
	backdrop-filter: blur(10px);
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-list-button {
	border-color: var(--wpcd-line-strong);
	background: #fff;
	color: var(--wpcd-navy-deep);
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-list-button:hover {
	border-color: var(--wpcd-accent);
	background: var(--wpcd-blue-soft);
	color: var(--wpcd-navy-deep);
}

.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-title {
	font-size: clamp(2rem, 4vw, 3.5rem);
}

@keyframes wpcd-detail-enter {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
	.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-dictionary__detail {
		width: 100vw;
		max-width: 100vw;
		overflow-x: hidden;
		overscroll-behavior-x: contain;
	}

	.wpcd-detail-article,
	.wpcd-detail-body,
	.wpcd-single-content {
		min-width: 0;
		max-width: 100%;
	}

	.wpcd-detail-body *,
	.wpcd-single-content * {
		min-width: 0 !important;
		max-width: 100% !important;
	}

	.wpcd-detail-body :where(figure, img, video, iframe, object, embed, svg, canvas),
	.wpcd-single-content :where(figure, img, video, iframe, object, embed, svg, canvas) {
		max-width: 100% !important;
	}

	.wpcd-detail-body :where(img, video, svg, canvas),
	.wpcd-single-content :where(img, video, svg, canvas) {
		height: auto;
	}

	.wpcd-detail-body :where(pre, code),
	.wpcd-single-content :where(pre, code) {
		white-space: pre-wrap;
		overflow-wrap: anywhere;
	}

	.wpcd-detail-body .wpcd-table-wrap,
	.wpcd-single-content .wpcd-table-wrap {
		overflow-x: visible;
	}

	.wpcd-detail-body table,
	.wpcd-single-content table {
		display: block;
		width: 100% !important;
		max-width: 100% !important;
	}

	.wpcd-detail-body :where(thead, tbody, tfoot, tr, th, td),
	.wpcd-single-content :where(thead, tbody, tfoot, tr, th, td) {
		display: block;
		width: 100% !important;
		max-width: 100%;
		overflow-wrap: anywhere;
	}

	.wpcd-term-request {
		margin-top: -14px;
	}

	.wpcd-term-request__dialog {
		align-items: end;
		padding: 12px;
	}

	.wpcd-term-request__panel {
		max-height: calc(100dvh - 24px);
		padding: 28px 22px;
		border-radius: 16px;
	}

	.wpcd-archive-wrap .wpcd-dictionary__header {
		padding: min(var(--wpcd-archive-hero-top, 96px), 44px) 20px min(var(--wpcd-archive-hero-bottom, 72px), 34px);
	}

	.wpcd-archive-wrap .wpcd-dictionary__title {
		font-size: min(var(--wpcd-archive-title-size, 72px), 48px);
	}

	.wpcd-archive-wrap .wpcd-search-input {
		min-height: 66px;
		padding-left: 56px !important;
	}

	.wpcd-archive-wrap .wpcd-search-icon {
		left: 20px;
		width: 22px;
		height: 22px;
	}

	.wpcd-archive-wrap .wpcd-dictionary__workspace {
		width: min(100% - 24px, 680px);
	}

	.wpcd-archive-wrap .wpcd-index {
		display: flex;
		overflow-x: auto;
		padding: 6px;
	}

	.wpcd-archive-wrap .wpcd-index-item {
		flex: 0 0 44px;
	}

	.wpcd-archive-wrap .wpcd-term-row {
		grid-template-columns: minmax(0, 1fr) auto;
		min-height: 0;
		gap: 8px 12px;
		padding: min(var(--wpcd-archive-row-spacing, 20px), 18px) 8px;
	}

	.wpcd-archive-wrap .wpcd-term-names,
	.wpcd-archive-wrap .wpcd-term-excerpt {
		grid-column: 1;
	}

	.wpcd-archive-wrap .wpcd-term-excerpt {
		font-size: 0.92rem;
	}

	.wpcd-archive-wrap .wpcd-row-arrow {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-toolbar {
		min-height: 64px;
		padding: 8px 12px;
	}

	.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-back {
		min-height: 44px;
		padding: 8px 10px;
		font-size: 0.9rem;
	}

	.wpcd-dictionary.is-enhanced.is-detail-open .wpcd-detail-content {
		width: calc(100% - 32px);
		max-width: 680px;
		min-width: 0;
		padding: 32px 0 124px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wpcd-dictionary *,
	.wpcd-single-wrap *,
	.wpcd-search-wrap * {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media print {
	.wpcd-dictionary__controls,
	.wpcd-dictionary__results,
	.wpcd-detail-back,
	.wpcd-detail-text-size,
	.wpcd-detail-list-nav,
	.wpcd-search-form {
		display: none !important;
	}

	.wpcd-dictionary__workspace {
		display: block;
		border: 0;
		box-shadow: none;
	}

	.wpcd-dictionary__detail {
		display: block !important;
	}
}
