/* Directory views share the cabinet shell and its semantic theme tokens. */
:root {
  --canvas:#f2f3ed; --surface:#fff; --surface-raised:#e9ede4;
  --ink:#152c49; --muted:#5d6d78; --line:#d5dcd5;
  --accent:#d69e27; --accent-ink:#152c49;
  --paper:var(--canvas); --paper-light:var(--surface); --gold:var(--accent);
  --body:'IBM Plex Sans',system-ui,sans-serif;
  --display:'Space Grotesk','IBM Plex Sans',system-ui,sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,monospace;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--canvas); color:var(--ink); font:18px/1.55 var(--body); -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; color:inherit; }
button:disabled { cursor:default; opacity:.42; }
a { color:inherit; text-decoration:none; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
h1,h2,h3,p { margin:0; }
img { display:block; max-width:100%; }
[hidden] { display:none!important; }
.workspace,.main-column { min-width:0; }
body.directory-page main { width:100%; max-width:1380px; margin:auto; padding:40px clamp(22px,4vw,64px) 0; }
.page-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:0 0 30px; }
.directory-heading-actions { display:flex; align-items:center; gap:12px; flex:none; }
.eyebrow { display:block; font:600 14px/1.5 var(--body); letter-spacing:.04em; color:var(--muted); margin-bottom:10px; }
h1 { font:600 clamp(32px,3.5vw,44px)/1.15 var(--body); letter-spacing:-1.2px; overflow-wrap:anywhere; }
h2 { font-size:26px; line-height:1.25; }
h3 { font-size:22px; line-height:1.35; }
.title-period { color:var(--accent); }
.page-heading p { margin-top:12px; font-size:18px; color:var(--muted); max-width:600px; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:13px 20px; border:1px solid transparent; border-radius:12px; min-height:50px; font-size:16px; font-weight:600; line-height:1.4; transition:background .18s,border-color .18s,transform .18s; }
.button.primary,.button.gold { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.button.primary:hover,.button.gold:hover { filter:brightness(1.06); transform:translateY(-1px); }
.button.outlined { background:var(--surface); border-color:var(--line); color:var(--ink); }
.button.outlined:hover,.button.subtle:hover { border-color:var(--accent); }
.button.subtle { background:var(--surface-raised); color:var(--ink); }
.button.danger { background:var(--danger-bg,#f6e5e3); color:var(--danger,#a23832); }
.text-button { background:transparent; border:0; padding:10px 0; min-height:44px; font-size:16px; font-weight:500; text-align:left; }
.text-button:hover { text-decoration:underline; text-underline-offset:4px; }
.icon-button { width:48px; height:48px; flex:none; display:inline-grid; place-items:center; padding:0; font-size:26px; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:50%; }
.stat-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:24px; }
.stat-cell { min-width:0; padding:22px; background:var(--surface); border:1px solid var(--line); border-radius:16px; display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
.stat-number { font:600 34px/1.15 var(--body); letter-spacing:-1px; }
.stat-label { font-size:15px; line-height:1.4; color:var(--muted); }
.directory-tools { display:flex; gap:12px; }
.search-field { display:flex; align-items:center; gap:12px; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:0 16px; flex:1; min-width:0; }
.search-field>span { font:28px/1 var(--body); color:var(--muted); }
.search-field input { padding:14px 0; border:0; background:none; width:100%; outline:0; min-width:0; font-size:18px; }
.search-field:focus-within { outline:3px solid var(--accent); outline-offset:2px; }
.search-field input:focus-visible { outline:0; }
.search-field kbd { border:1px solid var(--line); font:14px var(--mono); padding:1px 6px; border-radius:5px; color:var(--muted); }
.view-switch { display:flex; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:4px; gap:4px; }
.view-switch button { min-width:46px; border:0; border-radius:9px; background:transparent; font-size:23px; line-height:1; padding:9px; }
.view-switch .active { background:var(--surface-raised); box-shadow:inset 0 0 0 1px var(--line); }
.advanced-filters { margin-top:16px; padding:22px; background:var(--surface); border:1px solid var(--line); border-radius:16px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.advanced-filters label { font-size:16px; font-weight:500; }
.advanced-filters select { margin-top:8px; }
.directory-subbar { margin:20px 0 0; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.status-tabs { display:flex; gap:6px; flex-wrap:wrap; min-width:0; }
.status-tabs button { font-size:15px; min-height:44px; padding:9px 15px; border-radius:24px; background:transparent; border:1px solid transparent; color:var(--muted); white-space:nowrap; }
.status-tabs button.active { color:var(--ink); background:var(--surface); border-color:var(--line); font-weight:600; }
.status-tabs button:hover { background:var(--surface-raised); }
.results-summary { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:16px 0 8px; min-height:44px; font-size:14px; color:var(--muted); }
.results-summary .text-button { font-size:14px; }
.carousel-frame { position:relative; overflow:hidden; overscroll-behavior-x:contain; padding:10px 0 16px; isolation:isolate; border-radius:18px; }
.carousel-stage { position:relative; height:404px; touch-action:pan-y; user-select:none; -webkit-user-select:none; }
.file-card { width:min(420px,calc(100% - 64px)); min-height:360px; height:auto; padding:22px 24px; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:22px; box-shadow:0 18px 46px -28px #08162655; display:grid; grid-template-columns:72px minmax(0,1fr); grid-template-rows:auto auto auto 1fr auto; gap:12px 16px; text-align:left; position:absolute; left:50%; top:0; transition:transform .32s cubic-bezier(.22,.75,.22,1),opacity .25s,border-color .2s; cursor:grab; overflow:hidden; touch-action:pan-y; }
.file-card::before { content:''; position:absolute; left:24px; right:24px; top:0; height:4px; border-radius:0 0 4px 4px; background:var(--accent); }
.file-card[data-status="alumni"]::before,.file-card[data-status="former"]::before { background:var(--muted); }
.file-card[data-leave="true"]::before { background:repeating-linear-gradient(45deg,var(--accent) 0,var(--accent) 6px,var(--surface-raised) 6px,var(--surface-raised) 12px); }
.file-card.center { box-shadow:0 22px 60px -30px #08162665; }
.file-card.center:hover { border-color:var(--accent); }
.is-dragging .file-card { transition:none; cursor:grabbing; }
.file-top { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.file-no { font-size:14px; color:var(--muted); }
.status-pill { display:inline-flex; align-items:center; padding:6px 10px; border-radius:8px; background:var(--success-bg,#e7efe3); color:var(--success,#365637); font-size:14px; line-height:1.4; white-space:nowrap; }
.status-pill.candidate,.status-pill.guest,.status-pill.leave { background:var(--warning-bg,#f5edd8); color:var(--warning,#72561e); }
.status-pill.alumni,.status-pill.former { background:var(--surface-raised); color:var(--muted); }
.file-portrait,.file-monogram { height:72px; width:72px; flex:none; border-radius:50%; }
.file-portrait { object-fit:cover; object-position:50% 30%; pointer-events:none; }
.file-monogram { font:600 32px/1 var(--body); display:flex; align-items:center; color:var(--ink); background:var(--surface-raised); justify-content:center; border:1px solid var(--line); }
.file-card>.file-portrait,.file-card>.file-monogram { grid-column:1; grid-row:2; align-self:center; }
.file-card h3 { grid-column:2; grid-row:2; align-self:center; font:600 28px/1.2 var(--body); letter-spacing:-.5px; overflow-wrap:anywhere; max-width:100%; }
.file-card .course-line { grid-column:1/-1; margin:0; font-size:16px; line-height:1.5; }
.file-card .faculty-line { grid-column:1/-1; align-self:start; font-size:18px; color:var(--muted); line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.file-card .file-bottom { grid-column:1/-1; padding-top:14px; display:flex; justify-content:space-between; gap:18px; border-top:1px solid var(--line); align-items:center; }
.file-bottom span { font-size:16px; max-width:340px; line-height:1.35; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.file-bottom strong { font-size:25px; font-weight:400; }
.carousel-controls { display:flex; align-items:center; justify-content:center; gap:24px; }
.carousel-controls button { width:50px; height:50px; background:var(--surface); color:var(--ink); border:1px solid var(--line); border-radius:50%; font-size:24px; }
.carousel-controls button:hover:not(:disabled) { border-color:var(--accent); }
.carousel-position { font-size:16px; min-width:85px; text-align:center; }
.carousel-hint { text-align:center; font-size:14px; color:var(--muted); margin:12px auto 0; max-width:430px; padding:0 16px; }
.directory-list { display:grid; gap:12px; padding-top:10px; }
.person-row { display:grid; grid-template-columns:56px minmax(160px,1fr) 170px 125px 25px; align-items:center; gap:18px; background:var(--surface); color:var(--ink); border:1px solid var(--line); padding:22px; border-radius:16px; text-align:left; transition:border-color .2s; }
.person-row:hover { border-color:var(--accent); }
.person-row.selected { border-left:4px solid var(--accent); }
.person-row .file-monogram,.person-row .file-portrait { width:56px; height:56px; font-size:22px; margin:0; }
.person-row strong { font-weight:600; font-size:18px; }
.person-row small { display:block; color:var(--muted); font-size:14px; margin-top:5px; }
.row-arrow { font-size:23px; justify-self:end; }
.table-wrap { width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:16px; margin-top:12px; }
.people-table { width:100%; border-collapse:collapse; font-size:16px; white-space:nowrap; background:var(--surface); }
.people-table th { background:var(--surface-raised); font-size:14px; text-align:left; font-weight:600; padding:18px; border-bottom:1px solid var(--line); }
.people-table th button { font:inherit; color:inherit; border:0; background:transparent; text-align:left; padding:0; min-height:30px; display:inline-flex; align-items:center; gap:8px; }
.people-table td { border-bottom:1px solid var(--line); padding:20px 18px; }
.people-table tbody tr:last-child td { border:0; }
.people-table tbody tr:hover { background:var(--surface-raised); }
.table-name { font-size:17px; font-weight:600; color:var(--ink); border:0; background:transparent; padding:0; text-align:left; min-height:36px; }
.table-name:hover { text-decoration:underline; text-underline-offset:4px; }
.empty-state { padding:64px 24px; text-align:center; border:1px dashed var(--line); border-radius:18px; margin-top:20px; background:var(--surface); }
.empty-symbol { font-size:44px; color:var(--muted); display:block; margin-bottom:14px; }
.empty-state h2 { font-size:26px; }
.empty-state p { max-width:490px; margin:14px auto 22px; font-size:18px; color:var(--muted); }
.section-note { background:var(--surface-raised); border-left:3px solid var(--accent); padding:22px 26px; border-radius:0 14px 14px 0; margin-bottom:28px; display:grid; gap:10px; font-size:18px; }
.section-note span { font-size:16px; color:var(--muted); }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:30px 0 20px; }
.section-heading h2 { font-size:26px; }
.section-heading>span { font-size:14px; color:var(--muted); }
.application-list { display:grid; gap:16px; }
.application-card { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:26px; display:grid; grid-template-columns:1fr auto; gap:20px; }
.application-card h3 { font-size:22px; }
.application-meta { font-size:16px; color:var(--muted); margin:8px 0 14px; }
.application-message { font-size:18px; line-height:1.65; max-width:740px; white-space:pre-wrap; overflow-wrap:anywhere; }
.application-actions { display:flex; flex-direction:column; gap:10px; align-items:stretch; min-width:165px; }
.archive-details { margin-top:32px; border-top:1px solid var(--line); padding-top:20px; }
.archive-details>summary { cursor:pointer; font-size:18px; font-weight:600; }
.archive-row { padding:20px 0; border-bottom:1px solid var(--line); display:flex; gap:20px; justify-content:space-between; align-items:center; font-size:18px; }
.archive-row small { display:block; font-size:14px; color:var(--muted); margin-top:6px; }
.settings-grid { display:grid; grid-template-columns:1fr; gap:24px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:30px; }
.panel h2 { font-size:26px; margin-bottom:12px; }
.panel>p { font-size:18px; color:var(--muted); margin-bottom:24px; }
.field-row,.staff-row { display:flex; align-items:center; justify-content:space-between; gap:24px; border-top:1px solid var(--line); padding:20px 0; font-size:18px; }
.field-row small,.staff-row small { display:block; color:var(--muted); font-size:14px; margin-top:6px; }
.field-tag { display:inline-block; font-size:14px; padding:5px 9px; background:var(--surface-raised); border-radius:7px; }
.calendar-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr); gap:24px; }
.calendar-month { background:var(--surface); border:1px solid var(--line); padding:28px; border-radius:18px; }
.month-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:28px; }
.month-heading h2 { font-size:24px; text-transform:capitalize; text-align:center; }
.month-days { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; }
.weekday { font-size:14px; color:var(--muted); text-align:center; padding-bottom:14px; }
.day { height:46px; display:grid; place-items:center; font-size:18px; position:relative; border:1px solid transparent; border-radius:10px; }
.day.outside { color:var(--muted); opacity:.55; }
.day.holiday { background:var(--warning-bg,#f5edd8); color:var(--warning,#72561e); }
.day.today { border:2px solid var(--accent); font-weight:600; }
.day.event-day::after { position:absolute; bottom:4px; content:''; height:5px; width:5px; background:var(--accent); border-radius:50%; }
.calendar-legend { display:flex; flex-wrap:wrap; gap:14px; font-size:14px; color:var(--muted); border-top:1px solid var(--line); padding-top:18px; margin-top:22px; }
.calendar-legend span { display:flex; align-items:center; gap:8px; }
.legend-mark { width:12px; height:12px; border-radius:3px; background:var(--warning-bg,#f5edd8); border:1px solid var(--accent); }
.period-item { padding:20px 0; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:16px; font-size:18px; }
.period-item small { font-size:14px; color:var(--muted); display:block; margin-top:6px; }
.period-item button { align-self:start; }
.period-item button:not(.text-button) { min-width:40px; min-height:44px; font-size:22px; background:transparent; border:0; }
.progression-box { margin-top:24px; }
.progression-box .large-date { font:600 34px/1.2 var(--body); letter-spacing:-.8px; margin:18px 0; }
.progression-box p { font-size:18px; color:var(--muted); line-height:1.7; margin-bottom:22px; max-width:850px; }
.page-footer { border-top:1px solid var(--line); padding:26px 0; margin-top:45px; display:flex; justify-content:space-between; gap:22px; color:var(--muted); font-size:14px; }
.access-state { margin:40px 0 90px; max-width:750px; padding:36px; background:var(--surface); border:1px solid var(--line); border-radius:20px; }
.access-state p { font-size:18px; color:var(--muted); max-width:560px; margin:24px 0; }
.skip-link { position:fixed; left:20px; top:-100px; z-index:999; background:var(--accent); color:var(--accent-ink); padding:14px; border-radius:10px; }
.skip-link:focus { top:15px; }
dialog { border:1px solid var(--line); background:var(--surface); color:var(--ink); padding:0; border-radius:22px; box-shadow:0 28px 100px #08152366; max-height:calc(100dvh - 48px); overscroll-behavior:contain; }
dialog::backdrop { background:#08152399; backdrop-filter:blur(6px); }
dialog[open] { animation:dialog-enter .23s ease-out; }
.detail-dialog { width:min(1040px,calc(100vw - 48px)); max-width:none; }
.form-dialog { width:min(740px,calc(100vw - 48px)); max-width:none; padding:32px; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:26px; }
.dialog-heading h2 { font-size:30px; line-height:1.2; overflow-wrap:anywhere; }
.detail-cover { background:var(--surface-raised); color:var(--ink); padding:32px 36px; position:relative; border-bottom:1px solid var(--line); }
.detail-cover::before { content:''; position:absolute; top:0; left:36px; right:36px; height:4px; background:var(--accent); }
.detail-topline { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:26px; }
.detail-person { display:flex; align-items:center; gap:24px; }
.detail-person h2 { font:600 clamp(28px,3vw,36px)/1.2 var(--body); letter-spacing:-.7px; overflow-wrap:anywhere; }
.detail-person .file-portrait,.detail-person .file-monogram { width:96px; height:96px; margin:0; font-size:36px; background:var(--surface); }
.detail-person p { font-size:18px; color:var(--muted); margin-top:12px; }
.detail-badges { display:flex; gap:9px; flex-wrap:wrap; margin-top:16px; }
.detail-content { padding:32px 36px; }
.detail-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:30px; }
.detail-toolbar>span { font-size:14px; color:var(--muted); }
.detail-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:32px; }
.detail-section { margin-bottom:32px; }
.detail-section h3 { font-size:22px; margin-bottom:18px; }
.data-pairs { display:grid; grid-template-columns:minmax(95px,.7fr) minmax(0,1fr); gap:14px 18px; font-size:18px; margin:0; }
.data-pairs dt { font-size:15px; color:var(--muted); }
.data-pairs dd { margin:0; overflow-wrap:anywhere; }
.timeline { display:grid; gap:20px; border-left:1px solid var(--line); padding-left:22px; }
.timeline-item { position:relative; font-size:18px; }
.timeline-item::before { content:''; position:absolute; width:7px; height:7px; border-radius:50%; background:var(--accent); left:-26px; top:9px; }
.timeline-item small { display:block; color:var(--muted); font-size:14px; margin-top:6px; }
.event-link { background:transparent; color:var(--ink); border:0; padding:0; text-align:left; font-size:18px; }
.event-link:hover { text-decoration:underline; text-underline-offset:4px; }
.detail-note { padding:20px; background:var(--surface-raised); border-radius:12px; margin-bottom:14px; font-size:18px; white-space:pre-wrap; overflow-wrap:anywhere; }
.detail-note small { display:block; color:var(--muted); font-size:14px; margin-top:12px; }
.minor-note { font-size:16px; color:var(--muted); line-height:1.65; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.form-grid .wide { grid-column:1/-1; }
label.field { display:grid; gap:9px; font-size:16px; font-weight:500; }
.field small { font-size:14px; line-height:1.5; color:var(--muted); font-weight:400; }
input,select,textarea { border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:10px; padding:13px 14px; width:100%; min-width:0; min-height:50px; font-size:18px; }
input::placeholder,textarea::placeholder { color:var(--muted); opacity:.85; }
input[type=checkbox] { width:22px; min-height:22px; accent-color:var(--accent); }
input[type=file] { font-size:16px; max-width:100%; }
textarea { min-height:120px; resize:vertical; }
.checkbox-field { display:flex; align-items:center; gap:12px; font-size:18px; }
.form-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; border-top:1px solid var(--line); padding-top:24px; margin-top:28px; }
.form-description { font-size:18px; color:var(--muted); margin:0 0 26px; line-height:1.65; }
.form-error { background:var(--danger-bg,#f6e5e3); color:var(--danger,#a23832); padding:16px 20px; font-size:16px; border-radius:12px; margin-top:20px; }
.inline-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:20px; }
.history-details { border-top:1px solid var(--line); padding-top:22px; margin-top:20px; }
.history-details summary { cursor:pointer; font-size:16px; font-weight:500; margin-bottom:20px; }
.field-value-row { padding:14px 0; border-bottom:1px solid var(--line); display:grid; gap:5px; font-size:18px; overflow-wrap:anywhere; }
.field-value-row span { color:var(--muted); font-size:14px; }
.field-value-row strong { font-weight:500; }
.pagination { display:flex; align-items:center; justify-content:center; gap:20px; margin:28px 0; font-size:16px; }
.toast { position:fixed; bottom:26px; left:50%; transform:translateX(-50%); z-index:300; max-width:min(680px,calc(100vw - 32px)); background:var(--ink); color:var(--surface); padding:16px 24px; border-radius:14px; box-shadow:0 12px 40px #07172933; font-size:16px; }
.toast.error { background:var(--danger,#a23832); color:#fff; }
.loading { padding:32px; color:var(--muted); font-size:18px; }
@keyframes dialog-enter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@media(max-width:1150px) {
  .stat-cell { padding:18px; }
  .calendar-grid { grid-template-columns:1fr; }
  .person-row { grid-template-columns:56px minmax(0,1fr) 115px 25px; }
  .person-row>.row-faculty { display:none; }
  .directory-tools { flex-wrap:wrap; }
  .search-field { flex-basis:100%; }
  .view-switch { margin-left:auto; }
  .advanced-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:700px) {
  body.directory-page main { padding:26px 20px 0; }
  .page-heading { align-items:flex-start; flex-direction:column; gap:20px; margin-bottom:24px; }
  .page-heading>.button { width:100%; }
  .directory-heading-actions { width:100%; }
  .directory-heading-actions .button { flex:1; }
  .page-heading p { font-size:18px; }
  .stat-strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .stat-cell { padding:18px; }
  .stat-number { font-size:30px; }
  .stat-label { font-size:14px; }
  .directory-subbar { align-items:flex-start; flex-direction:column; gap:6px; }
  .status-tabs { flex-wrap:nowrap; width:100%; overflow-x:auto; padding-bottom:6px; }
  .status-tabs button { padding:9px 13px; font-size:15px; }
  .results-summary { align-items:flex-start; flex-direction:column; gap:0; margin:8px 0; }
  .results-summary .text-button { min-height:38px; }
  .search-field kbd { display:none; }
  .search-field input { font-size:17px; }
  .advanced-filters { padding:20px; grid-template-columns:1fr; }
  .carousel-frame { margin-left:-10px; margin-right:-10px; padding-top:10px; }
  .carousel-stage { height:404px; }
  .file-card { width:min(420px,calc(100% - 48px)); min-height:360px; padding:20px; grid-template-columns:64px minmax(0,1fr); gap:12px 14px; border-radius:20px; }
  .file-card::before { left:20px; right:20px; }
  .file-top { gap:8px; }
  .file-no { font-size:14px; }
  .file-top .file-no { max-width:95px; line-height:1.35; }
  .file-top .status-pill { font-size:14px; padding:5px 8px; white-space:normal; text-align:right; }
  .file-card>.file-portrait,.file-card>.file-monogram { width:64px; height:64px; font-size:28px; }
  .file-card h3 { font-size:26px; }
  .person-row { grid-template-columns:48px minmax(0,1fr) 20px; padding:18px; gap:14px; }
  .person-row .file-monogram,.person-row .file-portrait { width:48px; height:48px; font-size:20px; }
  .person-row>.status-pill { grid-column:2; grid-row:2; justify-self:start; }
  .person-row>.row-arrow { grid-column:3; grid-row:1; }
  .person-row strong { font-size:18px; }
  .section-note { padding:20px; }
  .section-heading { align-items:flex-start; flex-direction:column; gap:8px; }
  .application-card { grid-template-columns:1fr; padding:22px; }
  .application-actions { flex-direction:row; flex-wrap:wrap; }
  .panel { padding:24px; }
  .calendar-month { padding:22px 16px; }
  .month-heading { gap:8px; }
  .month-heading h2 { font-size:20px; }
  .month-heading .icon-button { width:44px; height:44px; }
  .month-days { gap:3px; }
  .day { height:42px; font-size:17px; }
  .calendar-legend { font-size:14px; }
  .period-item,.field-row,.staff-row { align-items:flex-start; flex-wrap:wrap; gap:14px; }
  .period-item .inline-actions { gap:16px; }
  .page-footer { flex-direction:column; gap:8px; }
  .access-state { padding:26px; }
  .detail-dialog,.form-dialog { width:calc(100vw - 24px); max-height:calc(100dvh - 24px); border-radius:18px; }
  .detail-cover,.detail-content { padding:24px; }
  .detail-person { flex-direction:column; align-items:flex-start; gap:20px; }
  .detail-person h2 { font-size:30px; }
  .detail-person p { font-size:18px; }
  .detail-toolbar { align-items:flex-start; flex-direction:column; gap:18px; }
  .detail-columns { grid-template-columns:1fr; gap:0; }
  .data-pairs { grid-template-columns:minmax(90px,.65fr) minmax(0,1fr); gap:16px 12px; }
  .form-dialog { padding:24px; }
  .dialog-heading h2 { font-size:26px; }
  .form-grid { grid-template-columns:1fr; }
  .dialog-heading { gap:12px; }
  .form-actions { display:grid; grid-template-columns:1fr; }
  .form-actions .button { width:100%; }
  .pagination { gap:12px; flex-wrap:wrap; }
  .pagination .button { padding:12px 16px; }
  .archive-row { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { transition:none!important; animation:none!important; scroll-behavior:auto!important; }
}

/* разделы картотеки — видимая строка вкладок (боковая панель страницы скрыта оболочкой кабинета) */
.directory-tabs{display:flex;flex-wrap:wrap;gap:6px;border-bottom:1px solid var(--line);padding-bottom:12px;margin:0 0 22px}
.directory-tabs button{font:inherit;padding:10px 14px;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer;min-height:44px}
.directory-tabs button[aria-current]{background:var(--surface);color:var(--ink);box-shadow:inset 0 -3px var(--accent);font-weight:700}
.directory-tabs button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.directory-tabs .tab-count{display:inline-block;min-width:22px;padding:1px 7px;margin-left:4px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:12px;font-weight:700}
