/* Knowledge Hub Directories: look and feel follows the Knowledge Hub theme.
   Colours come from Settings > KH Directories; the values below are the defaults. */
.khd, .khd-single, .khd-banner {
	--khd-primary: #e8450f;   /* orange: links, kicker lines, buttons */
	--khd-dark: #102f31;      /* dark teal: banner, details card */
	--khd-accent: #98c982;    /* green: card borders, offset shadows */
	--khd-ink: #102f31;
	--khd-text: #2c4244;
	--khd-muted: #6b7b78;
	--khd-line: #dde3d6;
	--khd-sage: #eef1e8;
	--khd-page: #fcfcf8;
	--khd-slab: "Roboto Slab", Georgia, "Times New Roman", serif;
	font-family: var(--khd-slab);
	box-sizing: border-box;
}
.khd *, .khd *::before, .khd *::after, .khd-single *, .khd-single *::before, .khd-single *::after, .khd-banner *, .khd-banner *::before, .khd-banner *::after { box-sizing: border-box; }
.khd, .khd-single { color: var(--khd-ink); background: var(--khd-page); }
.khd a, .khd-single a { color: var(--khd-primary); text-decoration: none; }
.khd a:hover, .khd-single a:hover { text-decoration: underline; }
.khd-page-main { display: block; background: var(--khd-page); }
.khd-ico { width: 1em; height: 1em; flex: 0 0 auto; vertical-align: -.15em; }
.khd-wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Banner ---------- */
.khd-banner { width: 100vw; margin-left: calc(50% - 50vw); background: var(--khd-dark); color: #fff; padding: 64px 24px 56px; }
.khd-banner__in { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.khd-eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--khd-primary); }
.khd-eyebrow::before { content: ""; width: 36px; height: 3px; background: var(--khd-primary); }
.khd-banner__title { margin: 0; color: #fff; font-family: var(--khd-slab); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; text-transform: uppercase; }
.khd-banner__sub { margin: 0; padding-left: 22px; border-left: 3px solid var(--khd-primary); color: #cfd9d6; font-size: 1.02rem; line-height: 1.5; max-width: 46ch; }

/* ---------- Directory layout ---------- */
.khd.directory-section { padding: 40px 0 72px; }
.khd-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: start; width: min(100% - 40px, 1180px); max-width: none; margin: 0 auto; padding: 0; }
.khd-sidebar { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-top: 4px solid var(--khd-primary); box-shadow: 9px 9px 0 var(--khd-accent);  scrollbar-width: thin; scrollbar-color: var(--khd-primary) transparent; }
.khd-toggle { display: none; }
form#khd-form-asset { padding: 40px 10px; }
form#khd-form-institution {
    padding: 40px 10px;
}
.khd-form__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--khd-line); }
.khd-refine { display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--khd-ink); }
.khd-refine .khd-ico { color: var(--khd-primary); font-size: 1.05rem; }
.khd .khd-clear { font-size: .72rem; font-weight: 700; color: var(--khd-primary); }
.khd-field { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.khd-field > label, .khd-field > legend { display: block; padding: 0; margin: 0 0 10px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--khd-ink); }
fieldset.khd-field > legend { font-size: .85rem; margin-bottom: 12px; }
.khd-search { position: relative; display: block; }
.khd-search .khd-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--khd-primary); font-size: 1.05rem; pointer-events: none; }
.khd-field input[type=search], .khd-field input[type=text], .khd-field select {
	width: 100%; padding: 11px 12px; border: 1px solid transparent; border-radius: 0; background: #e9ede0; font: inherit; font-size: .9rem; color: var(--khd-ink);
}
.khd-search input[type=search] { padding-left: 38px; }
.khd-field select {
	appearance: none; -webkit-appearance: none; -moz-appearance: none;
	background-color: #e9ede0; border-radius: 0; cursor: pointer; padding-right: 46px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8450f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 16px center; background-size: 16px;
}
.khd-field input:focus, .khd-field select:focus, .khd-btn:focus-visible { outline: 2px solid var(--khd-primary); outline-offset: 1px; }

/* One-choice list with counts */
.khd-radios { display: flex; flex-direction: column; gap: 4px; }
.khd-radio { display: flex; align-items: center; gap: 12px; padding: 6px 0; font-size: .86rem; cursor: pointer; line-height: 1.3; color: var(--khd-text); }
.khd-radio input { appearance: none; -webkit-appearance: none; flex: 0 0 16px; width: 16px; height: 16px; margin: 0; border: 1.5px solid #9aa6a2; border-radius: 50%; background: #fff; cursor: pointer; }
.khd-radio input:checked {

    background: var(--orange);
    border-color: #82b972;
    border: 3.5px solid #82b972;
}
.khd-radio input:focus:not(:focus-visible),
.khd-radio input:active,
.khd-radio input:checked {
	outline: none !important;
	box-shadow: none !important;
}
.khd-radio span { flex: 1; }
.khd-radio em { font-style: normal; font-size: .78rem; color: var(--khd-muted); }
.khd-radio:has(input:checked) { font-weight: 700; color: var(--khd-ink); }
.khd-radio:has(input:checked) em { color: var(--khd-ink); font-weight: 700; }

/* Preserve hidden detail rows even when the theme gives dl children a display rule. */
.khd-dl > div[hidden], .khd-dl [hidden] { display: none !important; }

/* Theme tree: round checkboxes, bold parent, indented children */
.khd-tree.is-scroll { max-height: 300px; overflow: auto; padding-right: 4px; }
.khd-tree__group { margin-bottom: 4px; }
.khd-tree__kids { margin-left: 18px; }
.khd-tick { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; cursor: pointer; line-height: 1.35; }
.khd-tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.khd-tick__box { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; border: 1.5px solid #8a948f; border-radius: 50%; background: #fff; transition: background .15s, border-color .15s; display: inline-block; }
.khd-tick:hover .khd-tick__box { border-color: var(--khd-primary); }
.khd-tick input:checked + .khd-tick__box {
    /* background: var(--khd-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; */
    border-color: var(--khd-primary);
    background: var(--orange);
    border-color: #82b972;
    border: 3.5px solid #82b972;
}
.khd-tick input:indeterminate + .khd-tick__box { background: #fff linear-gradient(var(--khd-primary), var(--khd-primary)) center / 10px 2.5px no-repeat; border-color: var(--khd-primary); }
.khd-tick input:focus-visible + .khd-tick__box { outline: 2px solid var(--khd-primary); outline-offset: 2px; }
.khd-tick__label { flex: 1; font-size: .88rem; color: var(--khd-text); }
.khd-tick.is-parent .khd-tick__label { font-weight: 700; color: var(--khd-ink); }

.khd-matching { padding: 16px 20px; background: var(--khd-dark); color: #fff; display: flex; align-items: baseline; gap: 10px; position: sticky; bottom: 0; }
.khd-matching strong { color: var(--khd-primary); font-size: 1.7rem; font-weight: 700; line-height: 1; }
.khd-matching span { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.khd-btn { appearance: none; display: inline-flex; align-items: center; gap: 10px; border: 0; background: var(--khd-primary); color: #fff !important; padding: 13px 24px; border-radius: 999px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; text-decoration: none !important; }
.khd-btn:hover { filter: brightness(.92); }
.khd-btn .khd-ico { font-size: 1.05em; }

/* ---------- Results ---------- */
.khd-results.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
.khd-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--khd-line); }
.khd-shown { margin: 0; color: var(--khd-text); font-size: 1rem; }
.khd-shown strong { color: var(--khd-primary); font-size: 1.6rem; font-weight: 500; margin-right: 4px; }
.khd-pageof { font-size: .85rem; color: var(--khd-ink); }
.khd-empty { padding: 40px 0; color: var(--khd-muted); }

.khd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.khd-card { position: relative; display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.khd-card__body { position: relative; padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.khd-card__title { margin: 0; font-family: var(--khd-slab); font-weight: 400; font-size: 1.12rem; line-height: 1.3; }
.khd-card__title a { color: var(--khd-ink) !important; }
.khd-card__title a:hover { color: var(--khd-primary) !important; text-decoration: none !important; }
.khd-link { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: .95rem; }
.khd-link--caps { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.khd-card:hover .khd-link .khd-ico { transform: translateX(3px); }
.khd-link .khd-ico { transition: transform .15s; }

/* asset card */
.khd-card--asset { border: 1px solid #e6e2d6; border-bottom: 3px solid var(--khd-accent); }
.khd-thumb { display: block; background: radial-gradient(circle at 50% 40%, #efeadc, #e2dbc6); }
.khd-thumb__in { display: flex; align-items: center; justify-content: center; height: 225px; padding: 12px; }
.khd-thumb img { max-height: 100%; width: auto; max-width: 62%; object-fit: contain; box-shadow: 0 10px 24px rgba(40, 36, 20, .22); background: #fff; }
.khd-thumb__ph { display: block; width: 110px; height: 150px; background: #fff; box-shadow: 0 10px 24px rgba(40, 36, 20, .18); }

/* expert card */
.khd-card--expert { border: 1px solid var(--khd-line); border-top: 3px solid var(--khd-accent); padding-top: 22px; }
.khd-arc { position: absolute; top: -48px; right: -48px; width: 110px; height: 110px; border: 1.5px solid var(--khd-accent); border-radius: 50%; }
.khd-avatar-wrap { position: relative; margin: 0 22px; width: 84px; }
.khd-avatar { display: block; width: 84px; height: 84px; background: var(--khd-sage); overflow: hidden; }
.khd-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.khd-dot { position: absolute; right: -9px; bottom: -9px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #fff; }
.khd-dot--0 { background: var(--khd-primary); }
.khd-dot--1 { background: var(--khd-accent); }
.khd-dot--2 { background: var(--khd-dark); }
.khd-role { margin: 0; font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--khd-ink); line-height: 1.4; }
.khd-card--expert .khd-card__title { font-size: 1.3rem; }
.khd-inst, .khd-where { margin: 0; display: flex; align-items: flex-start; gap: 8px; color: var(--khd-text); font-size: .78rem; }
.khd-inst .khd-ico, .khd-where .khd-ico { margin-top: 2px; color: var(--khd-muted); }

/* institution card */
.khd-card--institution { border: 1px solid var(--khd-line); padding-top: 20px; }
.khd-quarter { position: absolute; top: -78px; right: -78px; width: 190px; height: 190px; border-radius: 50%; }
.khd-q--0 { background: #bcdca9; }
.khd-q--1 { background: #f8cbbb; }
.khd-q--2 { background: #dcedcf; }
.khd-tag { position: absolute; top: 14px; right: 14px; z-index: 1; background: #fff; border: 1px solid var(--khd-line); padding: 3px 8px; font-size: .56rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--khd-ink); }
.khd-logo { position: relative; display: flex; align-items: center; justify-content: flex-start; width: 84px; height: 76px; margin: 0 22px; }
.khd-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.khd-index { margin: 0; font-size: .6rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--khd-ink); }
.khd-card--institution .khd-card__title { font-size: 1.22rem; }
.khd-avatar__ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 60px; font-size: 1.8rem; font-weight: 700; color: var(--khd-primary); background: var(--khd-sage); }

.khd-pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 34px; }
.khd-page { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--khd-line); background: #fff; color: var(--khd-ink) !important; font-weight: 500; text-decoration: none !important; }
a.khd-page:hover { border-color: var(--khd-primary); color: var(--khd-primary) !important; }
.khd-page.is-current { background: var(--khd-primary); border-color: var(--khd-primary); color: #fff !important; }
.khd-gap { color: var(--khd-muted); padding: 0 4px; }

/* ---------- Single pages ---------- */
.khd-single { padding: 0 0 72px; color: var(--khd-text); }
.khd-single h1, .khd-single h2 { font-family: var(--khd-slab); color: var(--khd-ink); }
.khd-hero { width: 100vw; margin-left: calc(50% - 50vw); background: var(--khd-sage); padding: 56px 0; }
.khd-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: center; }
.khd-single .khd-backlink { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--khd-primary); }
.khd-dash { display: inline-block; width: 34px; height: 2px; background: var(--khd-primary); }
.khd-kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--khd-primary); }
.khd-hero h1 { margin: 0 0 18px; font-weight: 400; font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.2; }
.khd-iconmeta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 20px; font-size: .78rem; font-weight: 700; color: var(--khd-ink); }
.khd-iconmeta span { display: inline-flex; align-items: center; gap: 8px; }
.khd-iconmeta .khd-ico { color: var(--khd-primary); font-size: 1rem; }
.khd-hero__cover { justify-self: end; }
.khd-hero__cover img { display: block; max-width: 280px; width: 100%; height: auto; box-shadow: 0 22px 44px rgba(16, 47, 49, .22); background: #fff; }
.khd-framed { background: #fff; border-top: 4px solid var(--khd-primary); box-shadow: 10px 10px 0 var(--khd-accent); padding: 34px; display: flex; align-items: center; justify-content: center; min-height: 170px; }
.khd-framed img { max-width: 100%; max-height: 140px; width: auto; height: auto; display: block; }
.khd-body { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 64px; padding-top: 56px; align-items: start; }
.khd-body__main h2 { margin: 0 0 18px; font-size: 1.15rem; font-weight: 700; }
.khd-body__main .khd-h2--big { font-size: 2.1rem; font-weight: 500; margin-bottom: 22px; }
.khd-prose { line-height: 1.85; font-size: 1.02rem; color: var(--khd-text); }
.khd-prose p { margin: 0 0 1.1em; }
.khd-prose a { text-decoration: underline; }
.khd-lede { margin: 0 0 24px; font-size: 1.12rem; line-height: 1.6; color: var(--khd-ink); }
.khd-by { color: var(--khd-muted); font-size: .88rem; margin-top: 8px; }
.khd-darkcard { background: var(--khd-dark); color: #fff; border-top: 4px solid var(--khd-primary); padding: 26px 26px 30px; }
.khd-darkcard__title { margin: 0 0 14px; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--khd-accent); }
.khd-dl { margin: 0; }
.khd-dl dt { margin: 0; }
.khd-dl dd { margin: 0; overflow-wrap: anywhere; }
.khd-dl--rows > div { display: flex; justify-content: space-between; gap: 18px; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); font-size: .85rem; }
.khd-dl--rows dt { color: #c8d4d1; }
.khd-dl--rows dd { font-weight: 700; text-align: right; color: #fff; }
.khd-dl--rows a { color: #fff !important; }
.khd-darkcard .khd-btn { margin-top: 22px; }
.khd-dl--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px 28px; margin: 26px 0; padding-top: 22px; border-top: 1px solid var(--khd-line); }
.khd-dl--grid dt { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--khd-muted); margin-bottom: 2px; }

/* expert profile */
.khd-single__top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 0 18px; }
.khd-single .khd-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .7rem; color: var(--khd-muted); }
.khd-single .khd-crumbs a { color: var(--khd-ink); }
.khd-share { display: flex; gap: 16px; }
.khd-share a { font-size: .68rem; font-weight: 700; color: var(--khd-primary) !important; }
.khd-profile { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 26px; align-items: center; padding-bottom: 28px; }
.khd-profile__photo { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; background: var(--khd-sage); }
.khd-profile__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.khd-profile h1 { margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.15; }
.khd-profile__role { margin: 0 0 4px; font-size: .88rem; color: var(--khd-text); }
.khd-org { margin: 0 0 12px; font-size: .78rem; color: var(--khd-muted); }
.khd-sep { margin: 0 10px; }
.khd-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.khd-chip { display: inline-block; border-radius: 999px; padding: 5px 14px; font-size: .68rem; font-weight: 700; }
.khd-chip--soft { background: #eceee8; color: var(--khd-ink); }
.khd-chip--link { background: #fff; border: 1.5px solid var(--khd-primary); color: var(--khd-primary) !important; }
.khd-rule { border-top: 1px solid var(--khd-line); }
.khd-box--details { background: var(--khd-sage); border-right: 5px solid var(--khd-primary); border-bottom: 5px solid var(--khd-primary); padding: 22px 24px; }
.khd-box__title { margin: 0 0 14px; font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--khd-muted); }
.khd-box--details dt { font-size: .66rem; font-style: italic; color: var(--khd-muted); margin-top: 12px; }
.khd-box--details dd { font-size: .8rem; font-weight: 700; color: var(--khd-ink); }

/* institution single */
.khd-body--inst { grid-template-columns: 280px minmax(0, 1fr); gap: 56px; }
.khd-tile { background: var(--khd-dark); color: #fff; padding: 28px 24px; min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; transform: rotate(-3deg); box-shadow: 0 14px 30px rgba(16, 47, 49, .2); }
.khd-tile .khd-ico { width: 48px; height: 48px; color: var(--khd-accent); }
.khd-tile p { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.35; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.khd-layout { grid-template-columns: 1fr; }
	.khd-sidebar { position: static; max-height: none; }
	.khd-toggle { display: block; width: 100%; padding: 12px; border: 1px solid var(--khd-line); background: #fff; font: inherit; font-weight: 700; text-align: left; cursor: pointer; margin-bottom: 14px; }
	.khd-sidebar .khd-form { display: none; }
	.khd-sidebar.is-open .khd-form { display: block; }
	.khd-banner__in { grid-template-columns: 1fr; gap: 22px; }
	.khd-hero__grid, .khd-body, .khd-body--inst { grid-template-columns: 1fr; gap: 32px; }
	.khd-hero__cover { justify-self: start; }
	.khd-tile { transform: none; min-height: 180px; }
}
@media (max-width: 640px) {
	.khd-grid { grid-template-columns: 1fr; }
	.khd-profile { grid-template-columns: 1fr; }
	.khd-banner { padding: 44px 20px 36px; }
}

/* ---------- Breadcrumb under the banner (the theme's .kh-breadcrumb styles take over when present) ---------- */
:where(.khd-banner + .kh-breadcrumb) { background: var(--khd-page, #fcfcf8); border-bottom: 1px solid #dde3d6; font-size: .85rem; }
:where(.khd-banner + .kh-breadcrumb .site-container) { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
:where(.khd-banner + .kh-breadcrumb .kh-breadcrumb__list) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 14px 0; }
:where(.khd-banner + .kh-breadcrumb a) { display: inline-flex; align-items: center; gap: 6px; color: #102f31; text-decoration: none; }
:where(.khd-banner + .kh-breadcrumb svg) { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:where(.khd-banner + .kh-breadcrumb .kh-breadcrumb__current) { font-weight: 700; color: #e8450f; }

/* ---------- Featured flag + gallery ---------- */
.khd-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 8px; }
.khd-gallery img { width: 100%; height: auto; display: block; border: 1px solid var(--khd-line); background: #fff; }

/* ---------- Accordion: parent -> children (Theme, Institution type) ---------- */
.khd-tree__group { border-bottom: 1px solid var(--khd-line); margin-bottom: 0; }
.khd-tree__group:last-child { border-bottom: 0; }
.khd-tree__head { display: flex; align-items: flex-start; gap: 12px; }
.khd-tree__head .khd-tick { flex: 0 0 auto; }
.khd-tree__toggle { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: var(--khd-ink); line-height: 1.35; }
.khd-tree__toggle .khd-tick__label { flex: 1; font-weight: 700; color: var(--khd-ink); font-size: .88rem; }
.khd-tree__toggle:hover .khd-tick__label { color: var(--khd-primary); }
.khd-tree__toggle:focus-visible { outline: 2px solid var(--khd-primary); outline-offset: 2px; }
.khd-tree__toggle .khd-ico { flex: 0 0 18px; width: 18px; height: 18px; margin-right: 6px; color: var(--khd-primary); transition: transform .2s ease; }
.khd-tree__group.is-open > .khd-tree__head .khd-ico { transform: rotate(180deg); }
.khd-tree__kids { display: none; margin: 0 0 8px 16px; padding-left: 14px; border-left: 2px solid var(--khd-accent); }
.khd-tree__group.is-open > .khd-tree__kids { display: block; }
.khd-tree__group > .khd-tick.is-parent { padding-right: 6px; }
.khd-tree__kids .khd-tick { padding: 6px 0; }

/* ---------- Custom dropdown (replaces the browser's default select) ---------- */
.khd-select { position: relative; }
.khd-select__native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; border: 0; }
.khd-select__btn { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 44px; padding: 10px 14px; background: #e9ede0; border: 1px solid transparent; border-radius: 0; font: inherit; font-size: .9rem; color: var(--khd-ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.khd-select__btn:hover { border-color: var(--khd-accent); }
.khd-select__btn:focus-visible { outline: 2px solid var(--khd-primary); outline-offset: 1px; }
.khd-select.is-open .khd-select__btn { background: #fff; border-color: var(--khd-primary); }
.khd-select__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.khd-select__btn.is-placeholder .khd-select__value { color: var(--khd-muted); }
.khd-select__btn .khd-ico { flex: 0 0 18px; width: 18px; height: 18px; margin-right: 4px; color: var(--khd-primary); transition: transform .2s ease; }
.khd-select.is-open .khd-select__btn .khd-ico { transform: rotate(180deg); }
/* The menu floats above the page (fixed), so the scrolling sidebar never clips it. */
.khd-select__menu { position: fixed; z-index: 99999; display: flex; flex-direction: column; overflow: hidden; background: #fff; border-top: 3px solid var(--khd-primary); box-shadow: 0 18px 40px rgba(16, 47, 49, .22), 0 2px 6px rgba(16, 47, 49, .08); font-family: var(--khd-slab, inherit); }
.khd-select__menu[hidden] { display: none; }
.khd-select.is-up .khd-select__menu { border-top: 0; border-bottom: 3px solid var(--khd-primary); }
.khd-select__search { flex: 0 0 auto; padding: 10px; border-bottom: 1px solid var(--khd-line); background: #fff; }
.khd-select__search input { width: 100%; padding: 9px 12px; border: 1px solid transparent; background: #e9ede0; font: inherit; font-size: .86rem; color: var(--khd-ink); border-radius: 0; }
.khd-select__search input:focus { outline: 2px solid var(--khd-primary); outline-offset: 0; background: #fff; }
.khd-select__menu ul { flex: 1 1 auto; min-height: 0; margin: 0; padding: 6px 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--khd-primary) transparent; }
.khd-select__menu li { position: relative; padding: 10px 42px 10px 16px; font-size: .88rem; line-height: 1.3; color: var(--khd-text); cursor: pointer; }
.khd-select__menu li[hidden] { display: none; }
.khd-select__menu li.is-active { background: var(--khd-sage); color: var(--khd-ink); }
.khd-select__menu li.is-selected { font-weight: 700; color: var(--khd-ink); }
.khd-select__menu li.is-selected::after { content: ""; position: absolute; right: 16px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8450f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.khd-select__empty { margin: 0; padding: 14px 16px; font-size: .86rem; color: var(--khd-muted); }
.khd-matching { z-index: 1; }
