*{box-sizing:border-box} :root{font-family:Arial,sans-serif;color:#1a2c3e;background:#f4f6f7} body{margin:0} .topbar{background:#122a41;color:white}.topbar-inner{max-width:1240px;padding:19px 32px;margin:auto;display:flex;justify-content:space-between;align-items:center}.brand{color:white;text-decoration:none;font-weight:700;font-size:15px;letter-spacing:.08em}.brand span{display:block;font-weight:400;font-size:11px;letter-spacing:.02em;color:#b2c1d0;margin-top:4px}.logout{border:1px solid #7d8ea0;color:white;background:transparent;padding:9px 18px;border-radius:5px;cursor:pointer}.shell{max-width:1240px;margin:auto;padding:28px 32px 80px}.intro{min-height:210px;display:flex;align-items:center;background:linear-gradient(90deg,rgba(10,39,53,.96),rgba(10,39,53,.65) 62%,rgba(10,39,53,.12)),url('/catalog-background.png') center 49%/cover;border-radius:8px;padding:32px 40px;color:#fff}.eyebrow{font-size:11px;letter-spacing:.14em;font-weight:700;color:#b2cae2;margin:0 0 12px}.intro h1{font-size:clamp(30px,4vw,42px);margin:0 0 10px;letter-spacing:-.025em}.intro-text{color:#cfd9e2;margin:0;line-height:1.5}.catalog{margin-top:38px}.toolbar{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:22px}.dark{color:#5b748c;margin-bottom:8px}.toolbar h2{font-size:24px;margin:0}.count{font-size:14px;color:#778492;font-weight:400;margin-left:6px}.controls{display:flex;gap:12px;align-items:center}.search input{font:inherit;font-size:14px;padding:12px 14px;width:300px;max-width:100%;border:1px solid #d0d6dc;border-radius:5px;background:white;color:#1a2c3e}.view-switch{display:flex;border:1px solid #d0d6dc;background:white;border-radius:5px;padding:3px}.view-switch button{border:0;background:transparent;padding:9px 12px;color:#596b7c;cursor:pointer;border-radius:3px}.view-switch button[aria-pressed=true]{background:#e6ecf2;color:#22486e;font-weight:700}.profiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.profile{min-width:0;min-height:142px;background:white;border:1px solid #e0e4e9;border-radius:6px;padding:22px;display:flex;align-items:center;gap:17px;color:inherit;text-decoration:none}.profile:hover{border-color:#8aa1b8;box-shadow:0 5px 18px #304a6312}.avatar{width:68px;height:68px;flex:none;border-radius:50%;object-fit:cover;background:#e7ecf1}.avatar-empty{display:grid;place-items:center;color:#557492;font-size:24px;font-weight:700}.profile-info{min-width:0;display:flex;flex-direction:column;gap:7px;line-height:1.35}.profile-info strong{font-size:16px;overflow-wrap:anywhere}.profile-info span{font-size:13px;color:#687582;overflow-wrap:anywhere}.profile-info small{font-size:12px;color:#829294}.arrow{align-self:flex-start;margin-left:auto;color:#909faf}.profiles.list{grid-template-columns:1fr;gap:8px}.list .profile{min-height:78px;padding:12px 18px}.list .avatar{width:52px;height:52px}.list .profile-info{flex:1;display:grid;grid-template-columns: minmax(160px,1fr) minmax(0,1fr) minmax(0,.6fr);align-items:center}.list .arrow{align-self:center}.empty{color:#687582;padding:26px 0}.profile[hidden],.empty[hidden]{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0} :focus-visible{outline:3px solid #739dc8;outline-offset:3px}@media(max-width:850px){.profiles{grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar{align-items:start;flex-direction:column}.controls{width:100%}.search{flex:1}.search input{width:100%}}@media(max-width:560px){.topbar-inner{padding:16px}.shell{padding:16px 16px 50px}.intro{min-height:185px;padding:26px 22px}.catalog{margin-top:30px}.profiles{grid-template-columns:1fr}.controls{align-items:stretch;flex-direction:column}.view-switch{align-self:start}.list .profile-info{display:flex}.brand{font-size:13px}.profile{min-height:110px}}

/* Row view uses explicit areas so missing summaries never shift fields. */
.profiles.list#profiles .profile[hidden] { display: none; }
.profiles.list .profile-head { grid-area: identity; }
.profiles.list .profile-summary { grid-area: summary; }
.profiles.list .profile-area { grid-area: details; }
.profiles.list#profiles .profile-link { grid-area: action; }

/* Centered reference treatment and prominent portraits. */
.intro.intro { justify-content:center; text-align:center; align-items:flex-start; background:linear-gradient(to top,rgba(0,0,0,.90) 0%,rgba(0,0,0,.55) 42%,rgba(0,0,0,0) 100%),url('/catalog-background.png') center top/cover; }
.intro.intro h1, .intro.intro .intro-text, .intro.intro .stream { text-shadow:0 2px 5px rgba(0,0,0,.95),0 4px 18px rgba(0,0,0,.85); }
.intro.intro { width:100vw; margin-left:calc(50% - 50vw); margin-top:-28px; border-radius:0; }
@media(max-width:560px) { .intro.intro { margin-top:-16px; } }
.hero-copy { width:100%; }
.intro h1 { margin:12px 0 8px; }
.profile-head .avatar { width:112px; height:112px; }
.profile-head .avatar-empty { font-size:38px; }
.list .profile-head .avatar { width:76px; height:76px; }
.list .profile-info { display:flex; }
@media(max-width:600px) { .profile-head .avatar { width:96px; height:96px; } .list .profile-head .avatar { width:76px; height:76px; } }

/* Catalog restoration: reference hero and information-rich cards */
.intro{min-height:340px;padding:34px;background:linear-gradient(90deg,rgba(2,15,32,.90),rgba(2,15,32,.55) 42%,rgba(2,15,32,.08)),url('/catalog-background.png') center 50%/cover}.hero-copy{position:relative}.stream{display:inline-block;border:1px solid #c3e0fd;border-radius:7px;padding:7px 12px;font-size:12px;letter-spacing:.13em;font-weight:800;color:#fff}.intro h1{font-size:clamp(40px,6vw,76px);line-height:.93;letter-spacing:-.045em;font-weight:900;margin:20px 0 14px;color:white;text-shadow:0 2px 18px #001326}.intro-text{font-size:clamp(18px,2vw,23px);font-weight:700;color:white}.intro-text span{color:#b0d5fa}.profiles{align-items:stretch;gap:18px}.profile{display:flex;flex-direction:column;align-items:stretch;gap:14px;padding:22px;min-height:250px;overflow-wrap:anywhere}.profile[hidden]{display:none}.profile-head{display:flex;align-items:center;gap:15px;min-width:0}.profile-info{display:flex;flex-direction:column;gap:5px;min-width:0}.profile-info strong{font-size:18px;line-height:1.25}.profile-info .specialization{font-size:14px;line-height:1.35;color:#3e658c}.profile-info small{font-size:13px;color:#6b7a8a}.profile-summary{font-size:14px;line-height:1.5;color:#435362}.profile-area{font-size:13px;line-height:1.4;color:#435362}.profile-area>span{display:block;font-size:10px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:#6f8193;margin-bottom:3px}.profile-link{margin-top:auto;padding-top:12px;border-top:1px solid #e6eaee;color:#185da1;font-weight:700;font-size:13px;display:flex;justify-content:space-between}.profiles.list .profile{min-height:0;display:grid;grid-template-columns:minmax(220px,1fr) minmax(200px,1.2fr) minmax(130px,.8fr);align-items:center}.profiles.list .profile-link{grid-column:2 / -1;margin:0;padding-top:8px}.profile:focus-visible,.logout:focus-visible,.view-switch button:focus-visible,.search input:focus-visible{outline:3px solid #0a7ff3;outline-offset:3px}@media(max-width:800px){.profiles.list .profile{grid-template-columns:1fr 1fr}.profiles.list .profile-link{grid-column:1/-1}}@media(max-width:600px){.intro{min-height:285px;padding:24px;background-position:58% center}.intro h1{font-size:clamp(36px,10vw,58px)}.profiles.list .profile{display:flex}.profile{min-height:0}.profiles.list .profile-link{width:100%}}

/* Match the shared theme while retaining the catalog palette. */
[data-bs-theme="dark"] { color-scheme: dark; background:#111c27; color:#ecf0f4; }
[data-bs-theme="dark"] body { background:#111c27; color:#ecf0f4; }
[data-bs-theme="dark"] .profile { background:#1f2f3e; border-color:#3d4f61; color:#f1f5f8; }
[data-bs-theme="dark"] .profile-info .specialization, [data-bs-theme="dark"] .profile-link { color:#aecdeb; }
[data-bs-theme="dark"] .profile-info small, [data-bs-theme="dark"] .profile-summary, [data-bs-theme="dark"] .profile-area, [data-bs-theme="dark"] .count, [data-bs-theme="dark"] .dark, [data-bs-theme="dark"] .profile-area>span { color:#c5cfd8; }
[data-bs-theme="dark"] .profile-link { border-color:#3d4f61; }
[data-bs-theme="dark"] .search input, [data-bs-theme="dark"] .view-switch { background:#1f2f3e; color:#f1f5f8; border-color:#5f7284; }
[data-bs-theme="dark"] .search input::placeholder { color:#bbc5ce; }
[data-bs-theme="dark"] .view-switch button { color:#dde4eb; }
[data-bs-theme="dark"] .view-switch button[aria-pressed=true] { background:#4a6279; color:#fff; }
.topbar-inner > a:not(.brand) { color:#fff; }

/* Aligned catalogue fields and shared profile page. */
.toolbar .controls{width:100%;justify-content:space-between}.search{min-width:0}.profiles:not(.list) .profile{display:grid;grid-template-rows:112px 5.25em 4.7em auto;align-content:start}.profiles:not(.list) .profile-head{overflow:hidden}.profiles:not(.list) .profile-info strong,.profiles:not(.list) .specialization,.profiles:not(.list) .profile-info small,.profiles:not(.list) .profile-summary,.profiles:not(.list) .profile-area{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.profiles:not(.list) .profile-info strong{-webkit-line-clamp:2}.profiles:not(.list) .specialization{-webkit-line-clamp:3}.profiles:not(.list) .profile-info small{-webkit-line-clamp:1}.profiles:not(.list) .profile-summary{-webkit-line-clamp:3}.profiles:not(.list) .profile-area{-webkit-line-clamp:3}.profiles:not(.list) .profile-link{align-self:end}.profile-breadcrumb{margin:26px 0 16px;color:#697989;font-size:14px;overflow-wrap:anywhere}.profile-breadcrumb a,.detail-content a{color:#185da1}.profile-detail{background:white;border:1px solid #e0e4e8;border-radius:8px;padding:32px;overflow-wrap:anywhere}.detail-header,.detail-identity,.detail-actions{display:flex;align-items:center;gap:22px}.detail-header{justify-content:space-between;border-bottom:1px solid #e6eaee;padding-bottom:28px}.detail-identity{min-width:0}.detail-avatar{width:112px;height:112px;object-fit:cover;border-radius:50%;flex:none}.detail-avatar-empty{display:grid;place-items:center;background:#e6ecf2;color:#22486e;font-size:38px}.detail-identity h2{font-size:clamp(24px,3vw,34px);line-height:1.15;margin:0}.detail-specialization{color:#3e658c;line-height:1.5;margin:8px 0 0}.detail-actions{flex-wrap:wrap;gap:10px}.detail-button{display:inline-block;border:1px solid #a8b6c3;border-radius:5px;padding:11px 15px;color:#22486e;text-decoration:none;font-weight:700;font-size:14px}.detail-button:hover{background:#ebeff4}.detail-content{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:42px;padding-top:30px}.detail-content h3{font-size:18px;margin:0 0 16px}.detail-about p{white-space:pre-wrap;line-height:1.7;margin:0}.detail-aside{background:#f5f6f8;border-radius:6px;padding:22px}.detail-field{margin:0 0 20px}.detail-field span{display:block;color:#6b7a8a;font-size:13px;margin-bottom:5px}.detail-field p,.detail-contacts p{margin:0;line-height:1.5}.detail-contacts{border-top:1px solid #e0e4e8;padding-top:20px}.detail-contacts ul{list-style:none;margin:0;padding:0;line-height:1.6}.detail-button:focus-visible{outline:3px solid #0a7ff3;outline-offset:3px}@media(max-width:700px){.detail-header{align-items:flex-start;flex-direction:column}.detail-content{grid-template-columns:1fr;gap:24px}.profile-detail{padding:22px}.detail-avatar{width:88px;height:88px}.detail-identity{gap:16px}.toolbar .controls{align-items:stretch;flex-direction:column}.search input{width:100%}.view-switch{align-self:flex-start}}

.profiles#profiles .profile[hidden]{display:none}

/* Partner identities beneath the catalogue slogan. */
.partner-logos { display:flex; align-items:center; justify-content:center; gap:clamp(8px, 2vw, 24px); margin:24px auto 0; }
.partner-logos img { display:block; width:min(220px, 42vw); height:auto; object-fit:contain; }
@media(max-width:560px) { .partner-logos { gap:8px; margin-top:20px; } .partner-logos img { width:min(42vw, 180px); } }

/* Catalogue controls and consistent grid/list alignment. */
.filter-toggle { position:relative; display:inline-grid; place-items:center; width:48px; height:48px; padding:0; margin-left:auto; border:1px solid var(--ms-outline); border-radius:var(--ms-shape-action); color:var(--ms-primary); background:#fff; cursor:pointer; }
.filter-toggle svg { width:28px; height:28px; }
.filter-toggle[aria-expanded="true"] { color:var(--ms-on-primary); background:var(--ms-primary); border-color:var(--ms-primary); }
.filter-active-count { position:absolute; top:-6px; right:-6px; display:grid; place-items:center; min-width:20px; height:20px; padding:0 4px; border-radius:999px; color:var(--ms-on-primary); background:var(--ms-primary); font:700 11px/1 sans-serif; }
.filter-active-count[hidden] { display:none; }
.filter-toggle:hover { background:var(--ms-secondary-container); }
.filter-toggle[aria-expanded="true"]:hover { background:var(--ms-primary); filter:brightness(1.12); }
.filter-toggle:focus-visible { outline:3px solid #0a7ff3; outline-offset:3px; }
.admin-member { min-width:0; display:flex; flex-direction:column; }
.admin-member[hidden] { display:none; }
.admin-member-controls { padding:12px 8px 8px; color:var(--ms-on-surface-variant); }
.admin-member-controls p { margin:0; font-size:13px; overflow-wrap:anywhere; }
.admin-profiles .profile-category-tags { max-height:52px; }
.admin-profiles .profile { flex:1; }
.profiles.admin-profiles.admin-profiles#profiles .profile { grid-template-rows:minmax(112px,auto) minmax(calc(var(--profile-text-size) * 6),auto) minmax(0,auto) 1fr; }
.toolbar .controls { justify-content:flex-start; flex-wrap:wrap; gap:12px; }
.toolbar .search { flex:1 1 280px; }
.toolbar .search input { width:100%; }
.sort { display:flex; align-items:center; gap:8px; color:#596b7c; font-size:13px; font-weight:700; }
.sort select { font:inherit; color:#1a2c3e; background:#fff; border:1px solid #d0d6dc; border-radius:5px; padding:11px 32px 11px 12px; }
.sort select:focus-visible { outline:3px solid #0a7ff3; outline-offset:3px; }
.toolbar .view-switch { margin-left:auto; }
.profiles { column-gap:20px; row-gap:26px; }
.profiles:not(.list) .profile { grid-template-rows: minmax(112px,auto) minmax(calc(var(--profile-text-size) * 6),auto) minmax(0,auto) 1fr; }
.profiles.list#profiles { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
.profiles.list#profiles .profile {
  display:grid; grid-template-columns:minmax(200px,23%) minmax(0,1fr) auto;
  grid-template-areas:"identity summary action" "identity details action";
  align-items:start; gap:0 20px; padding:20px 24px;
}
.profiles.list#profiles .profile-head { align-items:flex-start; gap:14px; }
.profiles.list#profiles .profile-head:not(:has(.specialization)) { align-items:center; }
.profiles.list#profiles .profile-info { align-items:flex-start; }
.profiles.list#profiles .avatar { width:64px; height:64px; }
.profiles.list#profiles .profile-link { border:0; padding:0; margin:0; }
.profiles.list#profiles .profile-area {
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.profiles.list#profiles .profile-summary + .profile-area {
  border-top:1px solid var(--ms-outline-variant);
  padding-top:12px; margin-top:12px;
}
[data-bs-theme="dark"] .sort { color:#dde4eb; }
[data-bs-theme="dark"] .sort select { color:#f1f5f8; background:#1f2f3e; border-color:#5f7284; }
@media (max-width:980px) {
  .profiles.list#profiles .profile {
    grid-template-columns:minmax(0,1fr) auto; gap:12px 16px;
    grid-template-areas:"identity action" "summary summary" "details details";
  }
  .profiles.list#profiles .profile-summary + .profile-area { margin-top:0; }
}
@media (max-width:650px) {
  .profiles.list#profiles .profile-area { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:560px) {
  .toolbar .controls { align-items:stretch; }
  .toolbar .search { flex-basis:100%; }
  .toolbar .view-switch { margin-left:auto; }
  .profiles { row-gap:22px; }
  .profiles.list#profiles .profile { padding:16px; }
  .profiles.list#profiles .profile-area { grid-template-columns:minmax(0,1fr); }
}
.topbar .topbar-inner > a.header-favorites:not(.brand) { flex:0 0 44px; width:44px; min-width:44px; height:44px; min-height:44px; padding:0; border-radius:50%; font-size:24px; }

/* Material 3 roles and component geometry for MentorSchool. */
:root {
  --ms-primary:#0051a1;
  --ms-on-primary:#fff;
  --ms-primary-container:#cfe5fb;
  --ms-secondary-container:#d9e4ef;
  --ms-on-secondary-container:#183149;
  --ms-surface:#f8fafc;
  --ms-surface-low:#f0f4f7;
  --ms-surface-lowest:#fff;
  --ms-on-surface:#1b2b3b;
  --tag-background:#e9eff5;
  --tag-text:#303030;
  --tag-border:#d5d5d5;
  --ms-on-surface-variant:#465462;
  --ms-outline:#6e7b88;
  --ms-outline-variant:#cfd7df;
  --ms-error:#862020;
  --ms-error-container:#ffdad6;
  --ms-gutter:clamp(16px,4vw,40px);
  --ms-touch:48px;
  --ms-shape-field:12px;
  --ms-shape-card:24px;
  --ms-shape-action:999px;
  font-family:"Segoe UI", system-ui, sans-serif;
  color:var(--ms-on-surface);
  background:var(--ms-surface);
}
body .shell { padding-inline:var(--ms-gutter); }
body .topbar { background:linear-gradient(135deg,#073c76,#061529); color:#fff; border-bottom:1px solid #24486a; }
.topbar .topbar-inner { min-height:64px; padding:8px var(--ms-gutter); gap:12px; }
.topbar .topbar-inner > .brand { margin-right:auto; }
.topbar .brand { display:flex; align-items:center; gap:8px; width:max-content; min-height:var(--ms-touch); color:#fff; }
.topbar .brand-logo { display:block; width:52px; height:auto; flex:none; }
.topbar .brand span { margin:0; white-space:nowrap; line-height:1.2; }
.topbar .brand .brand-name { color:inherit; font-size:16px; font-weight:750; letter-spacing:.025em; line-height:1.1; }
.topbar .brand .brand-stream { color:#cdd9e5; font-size:14px; font-weight:400; letter-spacing:.09em; }
.topbar .topbar-inner > a:not(.brand), .topbar .logout {
  display:inline-flex; align-items:center; justify-content:center; min-height:var(--ms-touch);
  border:1px solid var(--ms-outline); border-radius:var(--ms-shape-action);
  padding:0 18px; color:#fff; background:transparent;
  font-family:inherit; font-size:14px; font-weight:600; line-height:1.2; text-decoration:none;
}
.topbar .topbar-inner > a:not(.brand):hover,.topbar .logout:hover { background:#2e445a; }
.topbar :is(a,button):focus-visible { outline-color:var(--ms-primary-container); }
body :is(a,button,input,select,textarea,summary):focus-visible { outline:3px solid var(--ms-primary); outline-offset:3px; }
body .intro.intro { border-radius:var(--ms-shape-card); }
body .shell > .intro.intro { width:100%; min-height:0; margin:0; padding:clamp(20px,3.4vw,46px) var(--ms-gutter); }
body .intro h1 { font-size:clamp(30px,5.8vw,64px); line-height:1; }
.catalog { --catalog-panel-gap:clamp(28px,5vw,60px); margin-top:var(--catalog-panel-gap); }
.toolbar { padding:12px; margin-bottom:var(--catalog-panel-gap); background:#d9e4ef; background-image:linear-gradient(135deg,rgba(255,255,255,.45),rgba(255,255,255,0)); border-radius:20px; }
.toolbar .controls { display:grid; width:100%; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; }
.catalog-filters:not([hidden]) { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.toolbar .search input,.sort select {
  min-height:var(--ms-touch); border:1px solid var(--ms-outline);
  border-radius:var(--ms-shape-field); background:var(--ms-surface-lowest);
  color:var(--ms-on-surface); font-size:14px;
}
.toolbar .search input { padding-inline:16px; }
.area-filter { position:relative; }
.area-filter summary {
  display:flex; align-items:center; gap:6px; position:relative; min-height:var(--ms-touch);
  padding:0 38px 0 14px; border:1px solid var(--ms-outline); border-radius:var(--ms-shape-field);
  background:var(--ms-surface-lowest); font-size:14px; font-weight:600; cursor:pointer; list-style:none;
}
.area-filter summary::-webkit-details-marker { display:none; }
.area-filter summary::after {
  content:""; position:absolute; top:50%; right:16px; width:8px; height:8px;
  border-right:2px solid currentColor; border-bottom:2px solid currentColor;
  transform:translateY(-70%) rotate(45deg);
}
.area-filter[open] summary::after { transform:translateY(-30%) rotate(225deg); }
.area-filter-count:not([hidden]) { color:var(--ms-primary); }
.area-filter-panel {
  position:absolute; z-index:20; top:calc(100% + 6px); left:0; width:min(max(100%,350px),calc(100vw - 56px));
  max-height:min(440px,55vh); overflow:auto; padding:8px; border:1px solid var(--ms-outline-variant);
  border-radius:var(--ms-shape-field); background:var(--ms-surface-lowest); box-shadow:0 8px 28px #1e3b5726;
}
.area-filter:last-child .area-filter-panel { left:auto; right:0; }
.area-filter-panel label {
  display:flex; align-items:flex-start; gap:10px; min-height:48px; padding:10px 12px;
  border-radius:8px; font-size:14px; cursor:pointer;
}
.area-filter-panel label:hover { background:var(--ms-surface-low); }
.area-filter-panel label:has(input:checked) { background:var(--ms-secondary-container); }
.area-filter-panel input[type="checkbox"] { flex:0 0 18px; height:18px; margin:3px 0 0; accent-color:var(--ms-primary); }
.area-filter-panel label > span { min-width:0; overflow-wrap:anywhere; }
.area-option-hint { display:block; margin-top:3px; color:var(--ms-on-surface-variant); font-size:13px; line-height:1.4; }
.list-search { position:sticky; z-index:1; top:-8px; padding:6px; background:var(--ms-surface-lowest); }
.list-search input { width:100%; min-height:44px; padding:8px 12px; border:1px solid var(--ms-outline); border-radius:var(--ms-shape-field); background:var(--ms-surface-lowest); color:var(--ms-on-surface); font:inherit; }
.list-search-empty { margin:6px 12px; color:var(--ms-on-surface-variant); font-size:14px; }
[data-list-option][hidden] { display:none !important; }
.area-filter-actions { position:sticky; bottom:-8px; padding:6px 8px; background:var(--ms-surface-lowest); border-top:1px solid var(--ms-outline-variant); }
.area-filter-actions button {
  min-height:44px; padding:0 12px; border:0; border-radius:var(--ms-shape-action);
  color:var(--ms-primary); background:transparent; font:inherit; font-size:14px; cursor:pointer;
}
.area-filter-actions button:hover:not(:disabled) { background:var(--ms-secondary-container); }
.area-filter-actions button:disabled { opacity:.55; cursor:default; }
.sort { color:var(--ms-on-surface-variant); }
.toolbar .view-switch { display:inline-flex; padding:0; background:transparent; border:1px solid var(--ms-outline); border-radius:var(--ms-shape-action); }
.toolbar .view-switch button { margin:0; min-height:var(--ms-touch); min-width:70px; padding:0 12px; color:var(--ms-on-surface-variant); border-radius:var(--ms-shape-action); font-weight:600; font-family:inherit; }
.toolbar .view-switch button[aria-pressed=true] { background:var(--ms-secondary-container); color:var(--ms-on-secondary-container); }
.toolbar .view-switch button[aria-pressed=false]:hover { background:var(--ms-surface-lowest); }
.profiles#profiles .profile {
  --profile-text-size:14px;
  border:1px solid #c6dbee; border-radius:var(--ms-shape-card);
  background:var(--ms-surface-lowest); color:var(--ms-on-surface); box-shadow:none;
  transition:background-color .24s linear, border-color .24s linear, box-shadow .24s linear;
}
.profiles#profiles .profile:hover { background-color:var(--ms-surface-lowest); border-color:#9bbddd; transform:none; box-shadow:0 4px 14px rgba(39,103,160,.10); }
.profiles#profiles .profile-name {
  display:block; white-space:normal; overflow:visible; overflow-wrap:anywhere;
}
.profiles#profiles .specialization,
.profiles#profiles .profile-summary,
.profile-category dt,
.profile-tag { font-size:var(--profile-text-size); }
.profiles#profiles .profile-summary {
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:4;
  overflow:hidden; line-height:1.5;
}
.profiles:not(.list)#profiles .profile-summary { margin-top:6px; margin-bottom:4px; }
.profiles#profiles .profile-link { justify-content:flex-end; color:var(--ms-primary); }
.profiles:not(.list)#profiles .profile-head { grid-row:1; }
.profiles:not(.list)#profiles .profile-summary { grid-row:2; align-self:start; }
.profiles:not(.list)#profiles .profile-area { grid-row:3; align-self:start; }
.profiles:not(.list)#profiles .profile-link { grid-row:4; align-self:end; }

@supports (grid-template-rows:subgrid) {
  @media (min-width:561px) {
    /* The cards in each catalogue row share the same four content tracks. */
    .profiles:not(.list)#profiles .profile {
      grid-row:span 4;
      grid-template-rows:subgrid;
    }
  }
}
.profile-arrow {
  display:grid; place-items:center; position:relative;
  width:40px; height:40px; border-radius:50%;
  background:var(--ms-secondary-container);
  transition:color .2s linear, background-color .2s linear;
}
.profile-arrow::before {
  content:""; width:15px; height:2px; border-radius:1px; background:currentColor;
}
.profile-arrow::after {
  content:""; position:absolute; width:8px; height:8px;
  border-top:2px solid currentColor; border-right:2px solid currentColor;
  transform:translateX(3px) rotate(45deg);
}
.profile:hover .profile-arrow,.profile:focus-visible .profile-arrow {
  color:var(--ms-on-primary); background:var(--ms-primary);
}
.profiles#profiles .specialization,.profiles#profiles .profile-area { color:var(--ms-on-surface-variant); }
.profiles#profiles .avatar-empty,.detail-avatar-empty { color:var(--ms-on-secondary-container); background:var(--ms-secondary-container); }
.profiles#profiles .avatar-empty::before,
.detail-avatar-empty::before {
  content: "";
  width: 54%;
  aspect-ratio: 1;
  background: currentColor;
  opacity: .24;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-3.4 0-8 1.7-8 4.6V20h16v-1.4c0-2.9-4.6-4.6-8-4.6Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.detail-field .area-tag { display:inline-block; margin:2px 4px 2px 0; padding:3px 8px; border-radius:8px; color:var(--tag-text); font-size:12px; }
.profiles:not(.list)#profiles .profile-area,
.profiles.list#profiles .profile-area {
  display:grid; align-content:start; gap:12px; min-width:0; margin:0;
}
.profiles.list#profiles .profile-area { gap:14px 18px; }
.profiles.list#profiles .profile-category dt { margin-bottom:6px; }
.profiles.list#profiles .profile-category-tags { column-gap:6px; }
.profile-category { min-width:0; }
.profile-category dt { margin-bottom:8px; color:var(--ms-on-surface-variant); font-weight:700; }
.profile-category-tags {
  display:flex; flex-wrap:wrap; align-content:start; gap:4px; margin:0;
  max-height:52px; overflow:hidden;
}
.profile-tag {
  display:inline-block; height:24px; max-width:100%; min-width:0; padding:4px 8px; border-radius:8px;
  color:var(--tag-text); background:var(--tag-background);
  line-height:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.profile-tags-more { flex:none; }
.profile-tag[hidden] { display:none; }
.catalog .empty { padding:32px 16px; background:var(--ms-surface-low); border-radius:var(--ms-shape-card); color:var(--ms-on-surface-variant); }
.catalog .empty p { margin:0; }
.catalog .empty button {
  min-height:var(--ms-touch); margin-top:12px; padding:0 18px;
  color:var(--ms-primary); background:var(--ms-surface-lowest);
  border:1px solid var(--ms-outline); border-radius:var(--ms-shape-action);
  font:inherit; font-weight:600; cursor:pointer;
}
.catalog .empty button:hover { background:var(--ms-secondary-container); }
.sort select,.edit-ui .contact-kind-label select {
  appearance:none; padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b2b3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-size:18px; background-position:right 12px center;
}
@supports (appearance:base-select) {
  .sort select,.edit-ui .contact-kind-label select { appearance:base-select; background-image:none; padding-right:12px; align-items:center; }
  .sort select::picker(select),.edit-ui .contact-kind-label select::picker(select) {
    appearance:base-select; padding:6px; border:1px solid var(--ms-outline-variant);
    border-radius:12px; background:var(--ms-surface-lowest); box-shadow:0 8px 28px #1e3b5726;
  }
  .sort select option,.edit-ui .contact-kind-label select option { min-height:44px; padding:10px 12px; border-radius:8px; }
  .sort select option:checked,.edit-ui .contact-kind-label select option:checked { background:var(--ms-secondary-container); }
}
@media (max-width:700px) {
  .profiles:not(.list)#profiles .profile { min-height:0; }
  .toolbar .controls { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; }
  .toolbar .search { grid-column:1 / -1; }
  .catalog-filters:not([hidden]) { grid-template-columns:minmax(0,1fr); gap:8px; }
  .area-filter-panel { left:0; width:100%; }
  .toolbar .sort { display:grid; min-width:0; }
  .toolbar .sort select { width:100%; padding-left:8px; }
  .toolbar .view-switch { align-self:end; }
}
@media (max-width:560px) {
  .topbar .topbar-inner { flex-wrap:wrap; justify-content:flex-end; }
  .topbar .brand { width:100%; }
  .profiles:not(.list)#profiles .profile { grid-template-rows:auto auto auto auto; }
}
@media (max-width:360px) {
  .toolbar .view-switch button { min-width:57px; padding-inline:8px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition-duration:0s !important; animation-duration:0s !important; }
}


/* Subtle light from upper left; imagery and status colors remain unchanged. */
body .profiles#profiles .profile { background-image:linear-gradient(165deg,#eff8ff 0%,#f7fbff 48%,#edf5fb 100%); }
body .catalog .empty { background-image:linear-gradient(135deg,rgba(235,246,255,.65),rgba(198,222,243,.32)); }
/* A translucent layer gives hover a smooth, deeper blue at the bottom. */
body .profiles#profiles .profile { position:relative; isolation:isolate; }
body .profiles#profiles .profile::before { content:""; position:absolute; inset:0; z-index:0; border-radius:inherit; pointer-events:none; background:linear-gradient(165deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.15) 45%,rgba(237,246,253,.04) 60%,rgba(178,208,232,.06) 100%); opacity:0; transition:opacity .24s linear; }
body .profiles#profiles .profile:hover::before { opacity:1; }
body .profiles#profiles .profile > * { position:relative; z-index:1; }
body .profile-arrow, body .filter-toggle, body .area-filter summary { background-image:linear-gradient(135deg,rgba(255,255,255,.28),rgba(255,255,255,0)); }
.profile-card { position:relative; min-width:0; }
.profile-card[hidden] { display:none; }
.profile-card > .profile { height:100%; }
@media (min-width:561px) {
  /* The favourite control adds a wrapper, so the card is no longer a direct
     child of the catalogue grid and cannot inherit its subgrid tracks. */
  .profiles:not(.list)#profiles .profile-card > .profile {
    grid-row:auto;
    grid-template-rows:minmax(112px,auto) minmax(calc(var(--profile-text-size) * 6),auto) minmax(0,auto) 1fr;
  }
}
.profile-card .profile-head { padding-right:46px; }
.profile-card > .favorite-control { position:absolute; top:16px; right:16px; z-index:2; margin:0; }
.favorite-star,.header-favorites { display:inline-grid; place-items:center; width:44px; height:44px; border:1px solid #8ea7bd; border-radius:50%; background:#fff; color:#617b96; font-size:26px; line-height:1; text-decoration:none; cursor:pointer; }
.favorite-star.is-selected { color:#0755a3; background:#e9eff5; }
.favorite-star:focus-visible,.header-favorites:focus-visible { outline:3px solid #0755a3; outline-offset:3px; }
.header-favorites { margin-left:auto; flex:none; }
.favorites-filter { display:flex; align-items:center; gap:8px; padding:10px; }
.favorite-star { border:0; background:transparent; color:#0755a3; }
.favorite-star.is-selected { background:transparent; }
.favorite-star:hover { background:transparent; color:#00386f; }
.favorite-star:disabled { opacity:.55; cursor:wait; }
.favorite-control { position:relative; }
.favorite-feedback:not(:empty) { position:absolute; top:100%; right:0; z-index:5; width:max-content; max-width:220px; padding:6px 8px; border-radius:6px; background:#fff; color:#17324b; box-shadow:0 2px 8px #0003; font-size:12px; }
.topbar .topbar-inner > a.header-favorites:not(.brand) { border:0; background:transparent; }
.topbar .topbar-inner > a.header-favorites:not(.brand):hover { background:transparent; color:#cce5ff; }
.toolbar .sort-icon { position:relative; display:grid; place-items:center; width:48px; height:48px; padding:0; border:1px solid var(--ms-outline); border-radius:50%; background:#fff; color:var(--ms-primary); cursor:pointer; }
.sort-icon svg { width:28px; height:28px; transition:transform .2s linear; }
.sort-icon[value="desc"] svg { transform:rotate(180deg); }
.sort-icon:hover { background:var(--ms-secondary-container); }
.topbar .topbar-inner > a.header-admin-icon:not(.brand) { width:48px; min-width:48px; height:48px; padding:0; border-radius:50%; }
.header-admin-icon svg { width:23px; height:23px; }
.intro.intro { background-image:linear-gradient(to top,rgba(0,0,0,.90) 0%,rgba(0,0,0,.55) 42%,rgba(0,0,0,0) 100%),url('/catalog-background-optimized.webp?v=551f0da7463a8a676fa7'); }

/* The banner itself stays visible; only its foreground elements appear. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1, .hero-copy .intro-text, .partner-logos img { animation:page-appear .8s linear both; }
  .hero-copy h1 { animation-delay:.30s; }
  .hero-copy .intro-text { animation-delay:.55s; }
  .partner-logos img:first-child { animation-delay:.80s; }
  .partner-logos img:last-child { animation-delay:1s; }
  @keyframes page-appear { from { opacity:0; } to { opacity:1; } }
}

@media (max-width:560px) {
  .topbar .topbar-inner { flex-wrap:nowrap; justify-content:flex-end; gap:6px; }
  .topbar .brand { width:auto; min-width:0; }
  .topbar .brand .brand-name { font-size:clamp(12px,3.9vw,16px); }
  .topbar .brand .brand-stream { font-size:clamp(10px,3.1vw,14px); letter-spacing:.03em; }
  .topbar .topbar-inner > a:not(.brand), .topbar .logout { padding-inline:10px; }
  .topbar .topbar-inner > a.header-admin-icon:not(.brand) { flex:0 0 44px; width:44px; min-width:44px; height:44px; min-height:44px; padding:0; }
  .toolbar .controls { grid-template-columns:minmax(0,1fr) 44px 44px; align-items:center; gap:6px; }
  .toolbar .search { grid-column:auto; }
  .toolbar .sort-icon, .toolbar .filter-toggle { width:44px; height:44px; }
}

/* Favorites is a separate filter alongside sorting and the filter panel. */
.toolbar .controls:has(.favorites-switch) { grid-template-columns:minmax(0,1fr) 48px 48px 48px; }
.favorites-switch { display:grid; place-items:center; position:relative; width:48px; height:48px; border:1px solid var(--ms-outline); border-radius:50%; background:#fff; color:var(--ms-primary); cursor:pointer; }
.favorites-switch input { position:absolute; width:1px; height:1px; opacity:0; }
.favorites-switch svg { display:block; width:24px; height:24px; }
.favorites-switch:has(input:checked) { background:var(--ms-primary); color:#fff; border-color:var(--ms-primary); }
.favorites-switch:has(input:focus-visible) { outline:3px solid #0a7ff3; outline-offset:3px; }
@media (max-width:700px) { .toolbar .controls:has(.favorites-switch) { grid-template-columns:minmax(0,1fr) 44px 44px 44px; align-items:center; gap:6px; } .toolbar .controls:has(.favorites-switch) .search { grid-column:auto; } .favorites-switch { width:44px; height:44px; } }

.topbar .header-actions { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
.topbar .header-actions form { margin:0; }
.topbar .header-menu { position:relative; }
.topbar .header-menu > summary { display:none; }
.topbar .header-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:8px 14px; border:1px solid var(--ms-outline); border-radius:var(--ms-shape-action); background:transparent; color:#fff; font:600 14px/1.2 Arial,sans-serif; text-decoration:none; cursor:pointer; }
.topbar .header-action:hover { background:#2e445a; }
.topbar .header-action svg { width:20px; height:20px; flex:none; }
.topbar .header-label-short { display:none; }
.site-footer { margin-top:32px; padding:32px var(--ms-gutter); background:linear-gradient(135deg,#073c76,#061529); color:#fff; }
.site-footer-inner { max-width:1176px; margin:auto; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:24px; }
.site-footer-brand { display:flex; align-items:center; gap:8px; color:#fff; font-size:16px; font-weight:750; line-height:1.1; text-decoration:none; }
.site-footer-brand img { width:52px; height:auto; }
.site-footer-nav { display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.site-footer a { color:#fff; }
.site-footer p { margin:0; font-size:14px; line-height:1.5; }
.site-footer :is(a,button):focus-visible { outline:3px solid #a8d5ff; outline-offset:3px; }
@media(max-width:560px) { .site-footer-inner { align-items:flex-start; flex-direction:column; gap:18px; } .site-footer-nav { gap:12px 16px; } }
@media (max-width:700px) {
  .topbar .topbar-inner { flex-wrap:nowrap; justify-content:space-between; }
  .topbar .topbar-inner > .brand { width:auto; margin-right:auto; }
  .topbar .header-menu > summary { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--ms-outline); border-radius:50%; cursor:pointer; list-style:none; }
  .topbar .header-menu > summary::-webkit-details-marker { display:none; }
  .topbar .header-menu > summary svg { width:22px; height:22px; }
  .topbar .header-actions { position:absolute; right:0; top:calc(100% + 8px); z-index:30; min-width:240px; padding:8px; flex-direction:column; align-items:stretch; background:#0b2a4e; border:1px solid var(--ms-outline); border-radius:12px; box-shadow:0 4px 16px #0004; }
  .topbar .header-action { display:flex; width:100%; justify-content:flex-start; }
}

/* Preserve native details semantics and animate their popup content where supported. */
@supports selector(details::details-content) and (transition-behavior: allow-discrete) {
  :is(.area-filter, .choice-picker, .editor-select)::details-content {
    opacity:0;
    transition:opacity .2s linear, content-visibility .2s allow-discrete;
  }
  :is(.area-filter, .choice-picker, .editor-select)[open]::details-content { opacity:1; }
  @starting-style {
    :is(.area-filter, .choice-picker, .editor-select)[open]::details-content { opacity:0; }
  }
  @media (prefers-reduced-motion: reduce) {
    :is(.area-filter, .choice-picker, .editor-select)::details-content { transition:none; }
  }
}
