/* Same column order and compact department sections as IT Portal's phonebook. */
.results-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; margin:20px 3px; }
.results-toolbar .stats { flex:1; min-width:220px; margin:0; padding-right:12px; flex-wrap:wrap; }
.directory-view { display:inline-flex; align-items:center; gap:4px; padding:4px; border:1px solid var(--line); border-radius:13px; background:var(--surface2); }
.directory-view button { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:8px 13px; border:0; border-radius:9px; background:transparent; color:var(--muted); cursor:pointer; font-size:13px; line-height:1.35; }
.directory-view button[aria-pressed=true] { color:#fff; background:var(--primary); box-shadow:0 2px 7px #00000012; }
.directory-view button:not([aria-pressed=true]):hover { background:var(--soft); color:var(--text); }
.directory-view svg { width:16px; height:16px; flex-shrink:0; }
.directory-view button:focus-visible,.ct-link:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
.table-scroll-hint { display:none; }
.table-scroll-hint[hidden] { display:none; }
.ct-section { --ct-heading-fill:rgba(15,23,42,.018); --ct-row-hover:rgba(37,99,235,.045); --ct-divider:rgba(15,23,42,.07); margin:24px 0; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:linear-gradient(180deg,#fff,#f8fafc); box-shadow:var(--shadow); }
body.dark-theme .ct-section { --ct-heading-fill:rgba(255,255,255,.015); --ct-row-hover:rgba(255,255,255,.025); --ct-divider:var(--line); background:var(--surface); border-color:var(--line); box-shadow:var(--shadow); }
.ct-department { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px clamp(16px,1.3vw,24px); border-bottom:1px solid var(--ct-divider); background:transparent; }
.ct-department h2 { margin:0; font-size:15px; font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
.ct-department > span { flex-shrink:0; color:var(--muted); font-size:12px; font-variant-numeric:tabular-nums; }
.ct-scroll { overflow-x:auto; scrollbar-width:thin; scrollbar-color:var(--muted) transparent; }
.ct-scroll:focus-visible { outline:2px solid var(--primary); outline-offset:-2px; }
.ct-table { width:100%; max-width:100%; min-width:1000px; border-collapse:collapse; table-layout:fixed; font-size:14px; background:transparent; }
.ct-table th,.ct-table td { padding:12px clamp(6px,.55vw,12px); text-align:left; vertical-align:top; overflow-wrap:anywhere; line-height:1.5; }
.ct-table th:first-child,.ct-table td:first-child { padding-left:clamp(16px,1.3vw,24px); }
.ct-table th:last-child,.ct-table td:last-child { padding-right:clamp(16px,1.3vw,24px); }
.ct-table thead th { height:44px; vertical-align:middle; color:var(--muted); font-size:12px; font-weight:600; line-height:1.35; background:var(--ct-heading-fill); border-bottom:1px solid var(--ct-divider); overflow-wrap:normal; }
.ct-table tbody tr { border-bottom:1px solid var(--ct-divider); transition:background 120ms ease; }
.ct-table tbody tr:last-child { border-bottom:0; }
.ct-table tbody tr:hover,.ct-table tbody tr:focus-within { background:var(--ct-row-hover); }
.ct-table .ct-name,.ct-table .ct-internal { font-weight:600; }
.ct-table .ct-position { color:var(--muted); font-size:13px; }
.ct-table .ct-internal { color:var(--primary); }
body.dark-theme .ct-table .ct-internal { color:#93c5fd; }
.ct-table .ct-room,.ct-table td:nth-child(4),.ct-table td:nth-child(5),.ct-table td:nth-child(6) { font-variant-numeric:tabular-nums; }
.ct-link { color:inherit; text-decoration:none; text-underline-offset:3px; }
.ct-link:hover { color:var(--primary); text-decoration:underline; }
body.dark-theme .ct-link:hover { color:#93c5fd; }
@media (max-width:640px) {
 .results-toolbar { align-items:stretch; gap:12px; }
 .results-toolbar .stats { width:100%; flex-basis:100%; padding-right:0; }
 .directory-view { display:flex; }
 .directory-view button { flex:1; min-height:40px; padding-inline:16px; }
 .ct-department { align-items:flex-start; }
 .ct-department h2 { font-size:14px; }
 .ct-table { font-size:13px; }
 .ct-section { border-radius:13px; }
}
@media screen and (max-width:1039px) {
 .ct-scroll { overflow:visible; min-width:0; }
 .ct-table { display:block; min-width:0; width:100%; max-width:100%; table-layout:auto; font-size:14px; }
 .ct-table colgroup { display:none; }
 /* Keep column headings available to assistive technology. */
 .ct-table thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
 .ct-table tbody { display:block; width:100%; }
 .ct-table tbody tr { display:flex; flex-direction:column; gap:8px; min-width:0; padding:16px; }
 .ct-table tbody tr > *, .ct-table tbody tr > :first-child, .ct-table tbody tr > :last-child { min-width:0; max-width:100%; padding:0; }
 .ct-table tbody td { display:grid; grid-template-columns:88px minmax(0,1fr); align-items:center; gap:10px; font-size:14px; }
 .ct-table tbody td[data-label]::before { content:attr(data-label); color:var(--muted); font-size:11px; font-weight:400; line-height:1.4; }
 .ct-table tbody .ct-name { order:-2; display:block; font-size:16px; line-height:1.4; }
 .ct-table tbody .ct-position { order:-1; display:block; padding-bottom:6px; color:var(--muted); font-size:13px; }
 .ct-table .ct-link { min-width:0; overflow-wrap:anywhere; }
 .ct-table .cm-number { width:100%; min-width:0; }
 .ct-table .cm-eye { width:40px; height:40px; }
 .ct-department { flex-wrap:wrap; gap:6px 12px; }
 .ct-department h2 { flex:1 1 200px; }
}
@media print { .results-toolbar,.table-scroll-hint { display:none!important; } }
@media (prefers-reduced-motion:reduce) { .ct-table tbody tr { transition:none; } }
