/* finesse · register=product · A=existing-cool-blue · B=system-CJK · C=library-profile-ledger
 * D=feedback-only · E=business-data · SOUL=4 SPECTACLE=1 DENSITY=7
 * profile-density=compact-pilot; other workspaces retain their approved scale */
.screen[data-screen="talent"]:has(:is([data-subsection="talent-library"],[data-subsection="talent-new"],[data-subsection="talent-detail"],[data-subsection="talent-cooperation"],[data-subsection="talent-cooperation-detail"]).active) > .module-bar { display: none; }
.talent-library-workspace > .grid { display: block; }
.talent-library-workspace .panel-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.workspace-library-actions.module-actions { display: flex; max-width: none; margin: 0; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.workspace-library-actions .btn { font-size: 12px; white-space: nowrap; min-height: 36px; }
.workspace-library-actions .file-picker { max-width: 250px; }
#talentFilters.workspace-library-filters { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; padding: 16px; }
#talentFilters.workspace-library-filters .field { min-width: 0; }
#talentFilters.workspace-library-filters label { font-size: 12px; line-height: 1.4; }
.workspace-filter-main { display: grid; grid-template-columns: minmax(0,1.6fr) repeat(3,minmax(0,1fr)); gap: 12px; }
#talentFilters .workspace-filter-main .field { width: auto; flex: none; grid-column: auto; }
.workspace-filter-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding-block: 8px; }
.workspace-filter-advanced summary, .workspace-record-context > summary { cursor: pointer; min-height: 44px; align-content: center; font-size: 13px; color: var(--muted); }
.workspace-filter-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.workspace-filter-footer > span { margin-right: auto; font-size: 12px; }
.talent-library-workspace .talent-summary-table { width: 100%; min-width: 0; table-layout: fixed; }
.talent-library-workspace .talent-summary-table th, .talent-library-workspace .talent-summary-table td { position: static; white-space: normal; overflow-wrap: anywhere; font-size: 13px; padding: 14px 10px; min-width: 0; }
.talent-library-workspace .talent-summary-table th:first-child { width: 22%; }
.talent-library-workspace .talent-summary-table th:nth-child(2) { width: 15%; }
.talent-library-workspace .talent-summary-table th:nth-child(3) { width: 11%; }
.talent-library-workspace .talent-main { min-width: 0; }
.talent-library-workspace .entity-link { white-space: normal; overflow-wrap: anywhere; text-align: left; font-size: 14px; }
.talent-library-workspace .talent-account-link { min-width: 0; font-size: 12px; }
.workspace-secondary { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.workspace-number { text-align: right; font-variant-numeric: tabular-nums; }
.workspace-expanded > td { background: var(--surface-2); }
.workspace-field-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.workspace-field { min-width: 0; display: grid; gap: 6px; align-content: start; }
.workspace-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.workspace-field > span[data-no-i18n] { overflow-wrap: anywhere; font-size: 14px; }
.workspace-wide { grid-column: span 2; }
.workspace-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; padding-bottom: 8px; }
.workspace-tabs .btn { min-height: 44px; background: transparent; border-color: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.workspace-tabs [aria-selected="true"] { color: var(--primary); background: var(--primary-soft); border-color: var(--line); }
.talent-profile-workspace .profile-sheet { padding: 0; }
.talent-profile-workspace .profile-sheet-title { padding: 4px 0 18px; border: 0; background: transparent; }
.talent-profile-workspace .profile-sheet-title h3 { font-size: 24px; overflow-wrap: anywhere; min-width: 0; }
.talent-profile-workspace .profile-sheet-section { background: transparent; border: 0; border-radius: 0; margin: 0; padding: 0 0 20px; }
.talent-profile-workspace .profile-sheet-section h4 { background: transparent; padding: 12px 0; color: var(--ink); font-size: 14px; border: 0; }
.talent-profile-workspace .sheet-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; border: 0; }
.talent-profile-workspace .sheet-field { display: grid; grid-template-columns: minmax(0,1fr); border: 0; background: transparent; gap: 6px; min-width: 0; }
.talent-profile-workspace .sheet-field.wide { grid-column: span 2; }
.talent-profile-workspace .sheet-field.full { grid-column: 1 / -1; }
.talent-profile-workspace .sheet-field > label { padding: 0; justify-content: flex-start; background: transparent; font-size: 12px; text-align: left; border: 0; }
.talent-profile-workspace .sheet-field input, .talent-profile-workspace .sheet-field select { border: 1px solid var(--line); border-radius: 7px; background: var(--surface); width: 100%; min-width: 0; min-height: 40px; font-size: 14px; padding: 8px 10px; }
.talent-profile-workspace .sheet-field input:disabled { background: var(--surface-2); }
.talent-profile-workspace .sheet-field > span { padding: 10px; min-height: 40px; }
:is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table { min-width: 0; width: 100%; table-layout: fixed; }
:is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table :is(th,td) { position: static; padding: 10px 8px; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
:is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table th:nth-child(1) { width: 70px; }
:is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table th:nth-child(2) { width: 140px; }
:is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table th:nth-child(3) { width: 32%; }
:is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table th:last-child { width: 80px; }
:is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table input[type="checkbox"] { min-height: 22px; width: 22px; }
.talent-profile-workspace .form-actions, .cooperation-workspace .form-actions { padding: 14px 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.workspace-draft-note { margin-right: auto; font-size: 12px; }
.workspace-history-list { display: grid; gap: 12px; }
.workspace-history-card { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.workspace-history-card > summary { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto; align-items: center; gap: 14px; cursor: pointer; padding: 16px; font-size: 13px; }
.workspace-history-card > summary strong { overflow-wrap: anywhere; }
.workspace-history-card > summary small { display: block; color: var(--muted); margin-top: 5px; }
.workspace-history-card > summary > span:last-child { color: var(--primary); white-space: nowrap; }
.workspace-history-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px; }
.workspace-history-progress { margin: 12px 16px 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.workspace-record-editor { padding: 16px; }
.workspace-record-editor section + section { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.workspace-record-editor h4 { margin: 0 0 12px; font-size: 14px; }
.workspace-record-editor.is-dirty { background: color-mix(in oklch,var(--primary-soft) 35%,var(--surface)); }
.workspace-record-editor :is(input,select) { min-width: 0; width: 100%; max-width: none; min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; background: var(--surface); font: inherit; font-size: 14px; }
.workspace-record-editor input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.workspace-record-editor .post-link-control { min-width: 0; }
.workspace-record-editor :is(input,select):disabled { background: var(--surface-2); }
.workspace-record-editor :is(input,select):focus-visible, .workspace-tabs .btn:focus-visible, .workspace-history-card > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cooperation-workspace > .section-band { margin: 0 0 16px; }
.cooperation-workspace .workspace-record-editor { padding: 16px 0; }
.cooperation-workspace .detail-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.cooperation-workspace .profile-field strong { overflow-wrap: anywhere; }
.cooperation-workspace .workspace-record-context table { min-width: 0; table-layout: fixed; }
.cooperation-workspace .workspace-record-context td { white-space: normal; overflow-wrap: anywhere; }
.cooperation-workspace .workspace-record-context a { overflow-wrap: anywhere; }
.cooperation-ledger-workspace .toolbar { grid-template-columns: minmax(0,2fr) minmax(0,1fr) auto; align-items: end; }
.cooperation-ledger-workspace table { min-width: 0; width: 100%; table-layout: fixed; }
.cooperation-ledger-workspace th, .cooperation-ledger-workspace td { position: static; white-space: normal; overflow-wrap: anywhere; padding: 14px 10px; font-size: 13px; }
.cooperation-ledger-workspace th:first-child { width: 20%; }
.cooperation-ledger-workspace .link-button { white-space: normal; overflow-wrap: anywhere; text-align: left; }
[data-subsection="talent-new"] > .panel { max-width: 1100px; margin: 0 auto; }
[data-subsection="talent-new"] .panel-head { flex-wrap: wrap; gap: 12px; }
:is(.talent-library-workspace,.talent-profile-workspace,.cooperation-workspace,.cooperation-ledger-workspace) .btn { white-space: nowrap; }
@media (max-width: 1180px) {
  .workspace-filter-main, .workspace-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .talent-profile-workspace .sheet-fields, .workspace-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1000px) {
  .talent-library-workspace .talent-summary-table, .talent-library-workspace #talents,
  .cooperation-ledger-workspace table, .cooperation-ledger-workspace tbody { display: block; }
  .talent-library-workspace .talent-summary-table thead, .cooperation-ledger-workspace thead { display: none; }
  .talent-library-workspace tr[data-talent-row], .cooperation-ledger-workspace tbody tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; gap: 10px; border-bottom: 1px solid var(--line); }
  .talent-library-workspace tr[data-talent-row] > td, .cooperation-ledger-workspace tbody td { display: block; padding: 0; border: 0; background: transparent; }
  [data-cell-label]::before { content: attr(data-cell-label); display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
  .workspace-number { text-align: left; }
  .workspace-expanded, .workspace-expanded > td { display: block; }
}
@media (max-width: 760px) {
  .workspace-library-actions.module-actions { justify-content: flex-start; flex-basis: 100%; }
  :is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table,
  :is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table tbody { display: block; }
  :is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table thead { display: none; }
  :is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px; border-bottom: 1px solid var(--line); }
  :is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table td { display: block; min-width: 0; border: 0; }
  :is(.talent-profile-workspace,[data-subsection="talent-new"]) .account-table td:nth-child(3) { grid-column: 1 / -1; }
  .cooperation-workspace .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-history-card > summary { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
}
@media (max-width: 420px) {
  .workspace-filter-main, .workspace-filter-grid, .workspace-field-grid, .talent-profile-workspace .sheet-fields,
  .cooperation-workspace .detail-grid, .cooperation-ledger-workspace .toolbar { grid-template-columns: minmax(0,1fr); }
  .workspace-wide, .talent-profile-workspace .sheet-field.wide { grid-column: auto; }
  .workspace-filter-footer > span { flex-basis: 100%; }
  .workspace-tabs .btn { padding-inline: 8px; font-size: 12px; }
}

/* Scope the density pilot to the active profile, including its surrounding shell. */
.app:has(.screen.active [data-subsection="talent-detail"].active) {
  --profile-control-height: 32px;
  --profile-gutter: 16px;
  --profile-row-gap: 8px;
  --profile-text-size: 13px;
  --profile-caption-size: 12px;
  --profile-title-size: 20px;
  font-size: var(--profile-text-size);
}
.app:has(.screen.active [data-subsection="talent-detail"].active) .nav-btn { font-size: var(--profile-text-size); }
.app:has(.screen.active [data-subsection="talent-detail"].active) .top-title h2 { font-size: var(--profile-title-size); }
.app:has(.screen.active [data-subsection="talent-detail"].active) .top { min-height: 64px; padding-block: 8px; }
[data-subsection="talent-detail"] .panel-head { min-height: 48px; padding-block: 8px; }
[data-subsection="talent-detail"] .btn { font-size: var(--profile-text-size); min-height: var(--profile-control-height); padding-block: 5px; line-height: 1.4; white-space: nowrap; }
.talent-profile-workspace { font-size: var(--profile-text-size, 13px); line-height: 1.45; padding-top: 12px; }
.talent-profile-workspace .profile-sheet { gap: var(--profile-row-gap); }
.talent-profile-workspace .profile-sheet-title { padding-bottom: var(--profile-row-gap); align-items: flex-start; }
.talent-profile-workspace .profile-sheet-title > div { min-width: 0; }
.talent-profile-workspace .profile-sheet-title h3 { font-size: var(--profile-title-size); line-height: 1.35; }
.talent-profile-workspace .profile-sheet-title > .status { flex-shrink: 0; white-space: nowrap; }
.talent-profile-workspace .workspace-tabs { margin-bottom: var(--profile-row-gap); }
.talent-profile-workspace .workspace-tabs .btn { min-height: var(--profile-control-height); padding-block: 5px; }
.talent-profile-workspace .profile-sheet-section { padding-bottom: var(--profile-gutter); }
.talent-profile-workspace .profile-sheet-section h4 { padding-block: 8px; font-weight: 600; }
.talent-profile-workspace .sheet-fields { padding: 8px 0; gap: var(--profile-row-gap) var(--profile-gutter); }
.talent-profile-workspace .sheet-field { margin: 0; gap: 4px; }
.talent-profile-workspace .sheet-field > label { font-weight: 600; line-height: 1.4; }
.talent-profile-workspace .sheet-field :is(input:not([type="checkbox"]), select),
.talent-profile-workspace .account-table :is(input:not([type="checkbox"]), select),
.talent-profile-workspace .workspace-record-editor :is(input,select) {
  min-height: var(--profile-control-height);
  padding-block: 5px;
  font-size: var(--profile-text-size);
  line-height: 1.4;
}
/* Leave room for the native date editor's own padding without clipping it. */
.talent-profile-workspace .sheet-field input[type="date"],
.talent-profile-workspace .workspace-record-editor input[type="date"] { padding-block: 4px; }
.talent-profile-workspace .sheet-field > span { min-height: var(--profile-control-height); padding-block: 5px; font-size: var(--profile-text-size); }
.talent-profile-workspace .form-actions {
  margin: var(--profile-row-gap) calc(-1 * var(--profile-gutter)) calc(-1 * var(--profile-gutter));
  padding: var(--profile-row-gap) var(--profile-gutter);
}
.talent-profile-workspace [data-profile-pane="history"] > .form-actions { margin: var(--profile-row-gap) 0 0; }
.talent-profile-workspace .form-actions .btn { flex-shrink: 0; min-height: var(--profile-control-height); padding-block: 5px; }
.talent-profile-workspace .workspace-draft-note {
  flex: 1 1 260px;
  min-width: 0;
  font-size: var(--profile-caption-size);
  font-weight: 400;
  line-height: 1.5;
}
@media (max-width: 760px), (pointer: coarse) {
  .app:has(.screen.active [data-subsection="talent-detail"].active) { --profile-control-height: 44px; }
  .app:has(.screen.active [data-subsection="talent-detail"].active) .top :is(button,.account-trigger) { min-height: 44px; }
}
