/* Public lab directory */
.lab-directory {
  --dir-ink: #162f29;
  --dir-green: #285844;
  --dir-muted: #50645b;
  --dir-line: #dbe4da;
  --dir-pale: #f1f5ed;
  color: var(--dir-ink);
}
.lab-directory *, .lab-directory *::before, .lab-directory *::after { box-sizing: border-box; }
.lab-directory :is(h1,h2,h3,p,figure,dl,dd) { margin: 0; }
.lab-directory a:focus-visible, .lab-directory button:focus-visible, .lab-directory select:focus-visible, .lab-directory input:focus-visible { outline: 3px solid #2b7254; outline-offset: 3px; }
.dir-hero {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  overflow: hidden; isolation: isolate; background: #eef3e9;
  border: 1px solid #d9e3d4; border-radius: 19px;
}
.dir-hero-copy { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: clamp(28px,4.3vw,67px); }
.lab-directory .dir-eyebrow {
  display: flex; align-items: center; gap: 9px; font-size: .73rem; font-weight: 750;
  letter-spacing: .12em; text-transform: uppercase; line-height: 1.5; color: #426447;
}
.dir-eyebrow::before { content: ""; width: 22px; height: 2px; display: block; background: #65905b; flex-shrink: 0; }
.lab-directory .dir-hero h1 {
  margin: 18px 0 16px; color: #173b2d; font: 500 clamp(2.7rem,4.65vw,4.8rem)/1.02 "STIX Two Text", "Source Serif 4", Georgia, serif;
  letter-spacing: -.055em; text-wrap: balance; overflow-wrap: anywhere;
}
.lab-directory .dir-intro { max-width: 59ch; font-size: clamp(.98rem,1.22vw,1.1rem); line-height: 1.62; color: #455d4e; white-space: pre-line; overflow-wrap: anywhere; }
.dir-hero-visual { position: relative; min-height: 340px; overflow: hidden; align-self: stretch; background: #cddab9; }
.dir-hero-visual img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; min-height: 100%; object-fit: cover; }
.dir-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.25rem; margin-top: 23px; }
.lab-directory :is(.dir-button,.dir-link) { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.lab-directory .dir-button { padding: .65rem 1.05rem; border: 1px solid #264f3e; border-radius: 7px; background: #285740; color: #fff; min-height: 42px; }
.lab-directory .dir-button:hover { color: #fff; background: #193d2e; }
.lab-directory .dir-link { color: #24593c; }
.lab-directory .dir-link:hover { text-decoration: underline; text-underline-offset: .22em; }
.dir-arrow { font-size: 1.08em; font-weight: 500; line-height: 1; }
.dir-section { margin-top: clamp(32px,5vw,64px); scroll-margin-top: 24px; }
.dir-heading { display: flex; gap: 15px 30px; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.lab-directory .dir-heading h2, .lab-directory .dir-page-title { font: 500 clamp(2rem,3.2vw,3.3rem)/1.1 "STIX Two Text", "Source Serif 4", Georgia, serif; letter-spacing: -.045em; }
.lab-directory .dir-page-title { margin: 14px 0 12px; }
.lab-directory .dir-sub { max-width: 73ch; color: var(--dir-muted); line-height: 1.58; margin-top: 6px; }
.dir-stats { display: flex; gap: 25px; flex-wrap: wrap; flex-shrink: 0; padding: 5px 0; }
.dir-stats div { display: flex; flex-direction: column; align-items: flex-start; }
.dir-stats dt { color: var(--dir-muted); font-size: .84rem; }
.dir-stats dd { font-size: 1.65rem; font-weight: 650; letter-spacing: -.05em; line-height: 1.1; order: -1; }
.dir-search { display: flex; gap: .7rem; flex-wrap: wrap; padding: 14px; border: 1px solid var(--dir-line); background: #f6f8f4; border-radius: 10px; align-items: flex-end; margin: 0 0 13px; }
.dir-search label { display: flex; flex-direction: column; gap: .3rem; color: #476153; font-size: .8rem; font-weight: 650; min-width: 110px; }
.dir-search .dir-query { flex: 1 1 220px; }
.dir-search :is(input,select) { display: block; width: 100%; height: 42px; border: 1px solid #cbd9ca; border-radius: 6px; color: #20382b; background-color: #fff; padding: .45rem .65rem; font: inherit; font-size: .94rem; font-weight: 400; }
.dir-search .dir-button { font-size: .9rem; }
.dir-search .dir-link { min-height: 42px; }
.dir-board { border: 1px solid var(--dir-line); border-radius: 12px; overflow: hidden; background: #fff; }
.dir-board table { width: 100%; border-collapse: collapse; margin: 0; font-size: .95rem; }
.dir-board thead { color: #5f7367; background: #f8faf6; }
.dir-board :is(th,td) { text-align: left; vertical-align: middle; border: 0; border-bottom: 1px solid var(--dir-line); padding: .95rem 1.1rem; }
.dir-board th { font-size: .73rem; font-weight: 700; letter-spacing: .065em; text-transform: uppercase; }
.dir-board tbody tr:last-child td { border-bottom: 0; }
.dir-board .dir-person { font-weight: 650; }
.dir-board tbody td { overflow-wrap: anywhere; }
.lab-directory .dir-person, .lab-directory .dir-work-link { color: #24533e; text-decoration: none; }
.lab-directory .dir-person:hover, .lab-directory .dir-work-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.dir-degree { display: inline-block; background: #edf4ec; color: #345b3e; font-size: .78rem; font-weight: 650; padding: 4px 8px; border-radius: 5px; line-height: 1.3; }
.dir-course { display: block; color: var(--dir-muted); font-size: .85rem; padding-top: 5px; }
.dir-result-count { color: var(--dir-muted); font-size: .88rem; margin: 0 0 9px !important; }
.dir-empty { padding: clamp(27px,5vw,54px) 22px; text-align: center; background: #fbfcf9; }
.dir-empty > .dir-empty-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #4a7350; background: #e6eee0; margin: 0 auto 10px; }
.dir-empty svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lab-directory .dir-empty h3 { font-size: 1.23rem; font-weight: 650; line-height: 1.4; }
.lab-directory .dir-empty p { max-width: 54ch; margin: 5px auto 0; color: var(--dir-muted); }
.lab-directory .dir-empty .dir-link { margin-top: 12px; }
.dir-paging { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; margin-top: 14px; font-size: .93rem; }
.dir-pagehead { padding: clamp(12px,3vw,35px) 0 12px; }
.dir-back { margin-bottom: 20px; font-size: .9rem !important; }
.dir-profile { display: grid; grid-template-columns: minmax(0,2fr) minmax(220px,1fr); gap: clamp(18px,4vw,50px); align-items: start; }
.dir-profile-summary { padding: clamp(24px,4vw,45px); border: 1px solid var(--dir-line); border-radius: 12px; background: #f1f6ec; }
.dir-profile-summary .dir-page-title { overflow-wrap: anywhere; }
.dir-profile-summary .dir-affiliation { font-size: 1.12rem; line-height: 1.45; color: #46614b; overflow-wrap: anywhere; }
.dir-profile-summary .dir-bio { color: var(--dir-muted); line-height: 1.65; margin-top: 15px; max-width: 70ch; white-space: pre-line; overflow-wrap: anywhere; }
.dir-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; border-top: 2px solid #719467; padding: 18px 0; }
.dir-contact h2 { font-size: 1.1rem; font-weight: 650; }
.dir-contact .dir-link { margin-top: 5px; }
.dir-project-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dir-project-item { border: 1px solid var(--dir-line); background: #fff; border-radius: 10px; padding: clamp(18px,3vw,28px); overflow-wrap: anywhere; }
.dir-project-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; color: var(--dir-muted); font-size: .83rem; }
.lab-directory .dir-project-item h3 { font-size: 1.28rem; line-height: 1.35; font-weight: 650; margin: 10px 0 4px; }
.lab-directory .dir-project-item p { color: var(--dir-muted); line-height: 1.6; margin-top: 5px; }
.dir-sort-menu { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 12px 0 20px; }
.dir-sort-menu a { color: var(--dir-green); text-decoration: none; border: 1px solid var(--dir-line); border-radius: 7px; padding: 7px 12px; background: #fff; font-size: .9rem; }
.dir-sort-menu a[aria-current="page"] { background: #285740; color: #fff; border-color: #285740; }
.dir-ranking-values { font-variant-numeric: tabular-nums; font-weight: 650; }
.dir-about { max-width: 82ch; }
.dir-about-text { margin-top: 18px !important; line-height: 1.7; font-size: 1.065rem; white-space: pre-line; color: #324c3e; overflow-wrap: anywhere; }
.dir-about .dir-about-links { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--dir-line); }
.dir-about-links h2 { font-size: 1.12rem; }
.dir-about-links ul { padding-left: 1.2em; line-height: 1.85; }
@media (max-width: 800px) {
  .dir-hero-copy { padding: 30px; }
  .dir-hero-visual { min-height: 295px; }
  .dir-heading { align-items: flex-start; flex-wrap: wrap; }
  .dir-stats { gap: 21px; }
}
@media (max-width: 640px) {
  .dir-hero { grid-template-columns: 1fr; }
  .dir-hero-copy { padding: 25px 21px; }
  .dir-hero-visual { min-height: 0; height: clamp(180px,50vw,290px); }
  .dir-heading { gap: 10px; }
  .dir-stats { gap: 18px; }
  .dir-stats div { flex-direction: row-reverse; gap: 6px; align-items: baseline; }
  .dir-stats dd { font-size: 1.14rem; }
  .dir-search { gap: .5rem; }
  .dir-search .dir-query { flex-basis: 100%; }
  .dir-search label:not(.dir-query) { flex: 1; }
  .dir-members-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dir-members-table, .dir-members-table tbody, .dir-members-table tr, .dir-members-table td { display: block; width: 100%; }
  .dir-board .dir-members-table tr { padding: 12px 15px; border-bottom: 1px solid var(--dir-line); }
  .dir-board .dir-members-table tr:last-child { border-bottom: 0; }
  .dir-board .dir-members-table td { border: 0; padding: 3px 0; }
  .dir-members-table td[data-label]::before { content: attr(data-label) " · "; color: var(--dir-muted); font-size: .82rem; }
  .dir-profile { grid-template-columns: 1fr; }
  .dir-rank-table :is(th,td) { padding: .6rem; }
}
@media (max-width: 385px) {
  .dir-rank-table :is(th,td) { padding: .5rem .35rem; }
  .dir-sort-menu a { padding: 7px 9px; }
}
.dir-hero-visual figcaption { position: absolute; right: 12px; bottom: 10px; left: auto; max-width: calc(100% - 24px); padding: 4px 8px; border-radius: 4px; background: rgba(24, 41, 27, .78); color: #fff; font-size: .72rem; line-height: 1.4; }

.dir-board .dir-person { display: inline-flex; align-items: center; gap: .65rem; max-width: 100%; }
.dir-person > span, .dir-profile-identity { min-width: 0; overflow-wrap: anywhere; }
.dir-student-avatar { display: block; flex: 0 0 auto; object-fit: contain; background-color: #fff; border: 1px solid var(--dir-line); border-radius: 12%; }
.dir-list-avatar { width: 42px; height: 42px; }
.dir-profile-heading { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(14px, 2vw, 26px); }
.dir-profile-identity { flex: 1 1 200px; }
.dir-profile-avatar { width: clamp(88px, 12vw, 128px); height: clamp(88px, 12vw, 128px); }
.dir-profile-own { grid-template-columns: minmax(0,1fr); }
.dir-profile-own .dir-profile-heading { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px clamp(16px, 3vw, 32px); }
.dir-profile-own .dir-profile-avatar { grid-column: 1; grid-row: 1 / 3; }
.dir-profile-own .dir-profile-identity, .dir-owner-actions { grid-column: 2; }
.dir-owner-actions { display: flex; flex-wrap: wrap; margin: -4px; }
.dir-owner-actions .dir-button { min-height: 44px; margin: 4px; }
.lab-directory .dir-photo-action { background: #fff; border-color: #a9bfab; color: var(--dir-green); }
.lab-directory .dir-photo-action:hover { background: #e6efe2; color: var(--dir-green); }
@media (max-width: 540px) {
  .dir-profile-own .dir-profile-avatar { grid-row: 1; width: 74px; height: 74px; }
  .dir-profile-own .dir-profile-summary { padding: 18px; }
  .dir-owner-actions { grid-column: 1 / -1; }
  .dir-owner-actions .dir-button { padding-inline: .72rem; font-size: .9rem; }
}
.dir-profile-links { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--dir-line); }
.dir-profile-links h2 { font-size: 1rem; line-height: 1.4; }
.dir-profile-links ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: .55rem 0 0; padding: 0; }
.dir-profile-links li { max-width: 100%; }
.dir-profile-links a { display: inline-flex; align-items: center; gap: .4em; max-width: 100%; min-height: 36px; padding: .35rem .65rem; border: 1px solid #c6d6c4; border-radius: 6px; background: #fff; color: var(--dir-green); font-size: .91rem; font-weight: 650; line-height: 1.4; text-decoration: none; }
.dir-profile-links a:hover, .dir-profile-links a:focus-visible { text-decoration: underline; text-underline-offset: .16em; }
.dir-profile-links a span:first-child { overflow-wrap: anywhere; }
.lab-directory .dir-member-role { display: block; margin-top: .2rem; font-weight: 550; color: var(--dir-muted); line-height: 1.4; }
.dir-project-name { display: block; margin-bottom: .28rem; }
.dir-no-field { color: var(--dir-muted); }
.dir-profile-own .dir-profile-heading:not(:has(.dir-profile-avatar)) { grid-template-columns: minmax(0,1fr); }
.dir-profile-own .dir-profile-heading:not(:has(.dir-profile-avatar)) > * { grid-column: 1; }
.dir-news-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(230px,.45fr); align-items: start; gap: clamp(25px,5vw,70px); margin-top: 22px; }
.dir-news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dir-line); }
.dir-news-list li { padding: 1rem 0; border-bottom: 1px solid var(--dir-line); }
.dir-news-list time { display: block; color: var(--dir-muted); font-size: .85rem; margin-bottom: .25rem; }
.dir-news-list h3 { font-size: 1.2rem; line-height: 1.4; }
.lab-directory .dir-news-archive { margin-top: 1rem; }
.dir-news-subscribe { display: grid; justify-items: start; gap: .9rem; padding: clamp(18px,3vw,30px); background: var(--dir-pale); border: 1px solid var(--dir-line); border-radius: 12px; }
.dir-news-subscribe p { color: var(--dir-muted); }
.foot-inner > div:last-child { flex-wrap: wrap; }
.foot-inner strong a { font-size: inherit; }
@media (max-width: 680px) {
  .dir-news-layout { grid-template-columns: minmax(0,1fr); }
  .dir-news-subscribe { grid-row: 1; }
  .dir-members-table td:has(> .dir-no-field:only-child) { display: none; }
}

.lab-showcase { --showcase-image-height: clamp(160px, 19vw, 218px); display: grid; gap: clamp(32px, 4vw, 52px); }
.showcase-group { min-width: 0; }
.showcase-heading { align-items: center; margin-bottom: 16px; }
.showcase-heading .dir-link { font-size: .9rem; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.7vw, 22px); }
.showcase-previous .showcase-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.showcase-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--dir-line); border-radius: 11px; background: #fff; }
.showcase-image { display: block; flex: none; width: 100%; height: var(--showcase-image-height); overflow: hidden; background: #edf2e9; cursor: zoom-in; }
.showcase-image:focus-visible { outline-offset: -3px !important; }
.showcase-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.showcase-image img[src="assets/showcase/sunbot.jpg"] { object-position: left top; }
.showcase-copy { padding: clamp(16px, 1.7vw, 24px); display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.lab-directory .showcase-copy h3 { color: var(--dir-ink); font: 550 clamp(1.25rem, 1.6vw, 1.55rem)/1.18 "STIX Two Text", Georgia, serif; letter-spacing: -.025em; overflow-wrap: anywhere; }
.lab-directory .showcase-copy p { margin-block: 9px 0; color: var(--dir-muted); font-size: .93rem; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }
.showcase-demo { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: .38em; min-height: 40px; color: var(--dir-green); font-size: .92rem; line-height: 1.35; font-weight: 700; text-underline-offset: .2em; }
@media (max-width: 1050px) {
  .showcase-previous .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .lab-showcase { --showcase-image-height: clamp(160px, 52vw, 272px); }
  .showcase-grid, .showcase-previous .showcase-grid { grid-template-columns: minmax(0, 1fr); }
}
