/* Catalogue-only layout. Shared author details and other screens are unaffected. */
#authors-view { --ink: var(--color-text); --muted: var(--color-text-secondary); --line: var(--color-border); --soft: var(--color-background); --surface: var(--color-surface); color:var(--ink); background:var(--soft); font-family:var(--font-body); }
#authors-view [hidden] { display:none !important; }
#authors-view .authors-shell { container-type:inline-size; container-name:authors-page; min-width:0; padding-bottom:32px; }
#authors-view h1 { margin:0 0 32px; font-family:var(--font-head); font-size:var(--type-page-size); line-height:var(--type-page-line); font-weight:var(--weight-bold); letter-spacing:var(--tracking-page); }
#authors-view button, #authors-view input, #authors-view select { font-family:inherit; font-size:var(--type-body-size); line-height:var(--type-body-line); }
#authors-view :is(.authors-facet-chip, .authors-facet-trigger, .authors-sort, .authors-sort select, select.ds-field, .catalog-select) {
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
}
#authors-view button { cursor:pointer; }
#authors-view :is(button,input,select):focus-visible { outline: var(--focus-ring); outline-offset:3px; }
#authors-view :is(.authors-facet-chip,.authors-sort,select.ds-field):focus-visible,
#authors-view .authors-sort:focus-within,
#authors-view .authors-facet:has([aria-expanded="true"]) .authors-facet-chip { outline:none; }
#authors-view #authors-count { color:var(--muted); white-space:nowrap; font-size:var(--type-lead-size); line-height:var(--type-lead-line); font-weight:var(--weight-regular); }
#authors-view .authors-clear { white-space:nowrap; }
/* Status tabs sit with the title; facets are soft filled pills. */
#authors-view .authors-filters { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:24px; }
#authors-view .authors-facets { display:flex; align-items:center; flex-wrap:wrap; gap:10px; min-width:0; flex:1 1 auto; padding-left:0; border-left:0; }
#authors-view .authors-sort-wrap { display:flex; align-items:center; gap:10px; min-width:0; max-width:100%; margin-left:auto; padding-left:0; border-left:0; }
#authors-view .authors-all-filters svg {
  width:20px; height:20px; flex:0 0 20px;
  fill:currentColor; stroke:none;
}
#authors-view .authors-sort svg { width:16px; height:16px; flex-shrink:0; color:var(--color-icon-control, #454545); fill:currentColor; stroke:none; }
#authors-view .authors-facet { position:relative; min-width:0; max-width:100%; }
#authors-view .authors-badge { padding:0; border-radius:0; background:transparent; color:inherit; font-size:inherit; line-height:inherit; }
#authors-view .authors-facet-trigger { display:flex; align-items:center; gap:8px; white-space:nowrap; }
#authors-view .authors-facet-trigger svg { width:16px; height:16px; flex-shrink:0; margin-left:2px; color:var(--color-icon-control, #454545); fill:currentColor; stroke:none; }
#authors-view .authors-selected-chip svg { width:16px; height:16px; flex-shrink:0; fill:currentColor; stroke:none; }
#authors-view .authors-facet-clear { flex-shrink:0; width:32px; height:32px; margin-right:4px; border:0; border-radius: var(--radius-round); background:transparent; color:var(--ink); }
#authors-view .authors-popover { position:absolute; right:0; top:calc(100% + 8px); z-index:25; width:min(400px,calc(100vw - 64px)); padding:16px; border:0; border-radius: var(--radius-layer); background:var(--surface); box-shadow: var(--ui-popup-shadow, var(--shadow-raised)); }
#authors-view .authors-popover h2 { margin:0 0 12px; font-size:var(--type-section-size); line-height:var(--type-section-line); font-weight:var(--weight-semibold); }
#authors-view .authors-option-search { width:100%;       }
#authors-view .authors-options { max-height:300px; overflow-y:auto; margin-top:8px; }
#authors-view .authors-option { display:grid; grid-template-columns:20px minmax(0,1fr) auto; align-items:start; gap:10px; padding:8px 0; color:var(--ink); font-size:var(--type-body-size); line-height:var(--type-body-line); cursor:pointer; }
#authors-view .authors-option input { width:18px; height:18px; margin:1px 0; accent-color:var(--ink); }
#authors-view .authors-option-count { color:var(--muted); }
#authors-view .authors-popover-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); color:var(--muted); font-size:var(--type-caption-size); line-height:var(--type-caption-line); }
#authors-view .authors-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; align-items:stretch; padding-top:0; }
#authors-view .authors-empty { padding:24px; border:1px solid var(--line); border-radius: var(--radius-panel); background:var(--surface); display:grid; gap:16px; justify-items:start; }
#authors-view .authors-empty .ds-btn { margin:0; }
#authors-view .authors-more { display:block; width:100%; margin-top:24px; }
@container authors-page (max-width:903px) {
  #authors-view .authors-facets { padding-left:0; border-left:0; }
  #authors-view .authors-popover { left:0; right:auto; width:min(360px,calc(100vw - 64px)); }
  #authors-view .authors-facet { position:static; }
  #authors-view .authors-filters { position:relative; }
}
html:has(#authors-view.is-active), body:has(#authors-view.is-active) { min-width:0; background: var(--color-background); }
.app-shell:has(#authors-view.is-active) { height:auto; min-height:100dvh; overflow:visible; }

/* Reference composition; retain the Book Universe palette and type tokens. */
#authors-view .authors-header { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:28px; }
#authors-view .authors-heading { display:flex; align-items:center; gap:28px; flex:1 1 auto; min-width:0; flex-wrap:wrap; }
#authors-view .authors-heading h1 { margin:0; flex:0 0 auto; }
#authors-view #authors-count {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
/* Status tabs: канон в controls.css. Здесь только раскладка в шапке. */
#authors-view .authors-statuses {
  flex:1 1 auto;
  margin-top:24px;
  margin-bottom:8px;
}
#authors-view .authors-filters { gap:10px; margin-bottom:24px; }

#authors-view .authors-facet-trigger { display:flex; align-items:center; gap:8px; white-space:nowrap; }
#authors-view .authors-facet-trigger svg { width:16px; height:16px; flex-shrink:0; margin-left:2px; color:var(--color-icon-control, #454545); fill:currentColor; stroke:none; }
#authors-view .authors-selected-chip svg { width:16px; height:16px; flex-shrink:0; fill:currentColor; stroke:none; }


#authors-view .authors-selection { display:flex; align-items:center; gap:12px; margin-bottom:16px; color:var(--muted); font-size:var(--type-body-size); line-height:var(--type-body-line); }
#authors-view .authors-selected { display:flex; flex:1; flex-wrap:wrap; gap:8px; min-width:0; }
#authors-view .authors-selected-chip { display:flex; align-items:center; gap:10px;       text-align:left; }
#authors-view .authors-selected-chip svg { color:var(--muted); }
#authors-view .authors-selection > .authors-clear { margin-left:auto; }
#authors-view .authors-popover { left:0; right:auto; width:min(380px,calc(100vw - 32px)); padding:16px; max-height:calc(100dvh - 160px); overflow:auto; }
#authors-view .authors-option-search-wrap { display:flex; align-items:center; gap:10px;    }
#authors-view .authors-option-search-wrap svg { width:20px; height:20px; flex-shrink:0; color:var(--muted); fill:currentColor; stroke:none; }
#authors-view .authors-option-search {      min-width:0; }

#authors-view .authors-options { max-height:360px; overscroll-behavior:contain; }
#authors-view .authors-option { align-items:center; padding:8px; border-radius: var(--radius-sm); gap:8px; }
#authors-view .authors-option.is-selected { background:var(--soft); }
#authors-view .authors-option:hover { background:var(--soft); }
#authors-view .authors-option-group + .authors-option-group { border-top:1px solid var(--line); margin-top:12px; padding-top:12px; }
#authors-view .authors-option-group h3 { font-size:var(--type-body-size); line-height:var(--type-body-line); font-weight:var(--weight-semibold); margin:0 0 6px 8px; }
#authors-view .authors-heat-chips { display:flex; flex-wrap:wrap; gap:8px; }
#authors-view .authors-heat-chip { width:var(--control-height); min-width:var(--control-height); }

#authors-view .authors-options-empty { margin:8px 0 0; color:var(--muted); }
#authors-view .authors-evidence { font-size:var(--type-caption-size); line-height:var(--type-caption-line); color:var(--muted); margin:12px 0; }
#authors-view .authors-evidence summary { cursor:pointer; text-decoration:none; }
#authors-view .authors-evidence ul { padding-left:20px; max-height:160px; overflow:auto; }
@container authors-page (max-width:903px) {
  #authors-view .authors-header { flex-wrap:wrap; gap:20px; margin-bottom:24px; }
  #authors-view .authors-facet { position:relative; }
  #authors-view .authors-selection { flex-wrap:wrap; }
  #authors-view .authors-selected { flex-basis:calc(100% - 100px); }
}

@media (min-width:1280px) {
  #authors-view .authors-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px; }
}
@media (min-width:960px) and (max-width:1279px) {
  #authors-view .authors-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
}
@media (min-width:641px) and (max-width:959px) {
  #authors-view .authors-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
}
@media (max-width:640px) {
  #authors-view .authors-grid { grid-template-columns:minmax(0,1fr); gap:12px; }
  #authors-view .ds-author-card--portrait { padding:20px; }
  #authors-view .ds-author-card-banner { margin:-20px -20px 0; }
}
